How to "convert" a php soap code to xml?
I have this code:
$soapClient = new SoapClient("https://soapserver.exampl开发者_开发知识库e.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
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));
精彩评论