开发者

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

开发者 https://www.devze.com 2023-03-05 13:09 出处:网络
I have this code: $soapClient = new SoapClient(\"https://soapserver.exampl开发者_开发知识库e.com/blahblah.asmx?wsdl\");

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));
0

精彩评论

暂无评论...
验证码 换一张
取 消