tirenweb
tirenweb

Reputation: 31719

How to "convert" a php soap code to xml?

I have this code:

$soapClient = new SoapClient("https://soapserver.example.com/blahblah.asmx?wsdl");

// Prepare SoapHeader parameters
$sh_param = array(
                'Username'    =>    'username',
                'Password'    =>    'password');
$headers = new SoapHeader('http://soapserver.example.com/webservices', 'UserCredentials', $sh_param);

How can see the xml code of $headers?

Well, if maybe you don't understand me check this question out. As you can see the person who asks show a "soap code" and then shows the corresponding xml. That what I want, gets the corresponding xml code.

Regards

Javi

Upvotes: 0

Views: 741

Answers (1)

TiBeN
TiBeN

Reputation: 46

have you tried this function ? : $soapClient->__getLastRequestHeaders()

for this you need to active "trace" option like this :

$soapClient = new SoapClient("https://soapserver.example.com/blahblah.asmx?wsdl", array('trace' => 1));

Upvotes: 1

Related Questions