Send XML with SOAP
I need to send SOAP data.
<vodh:VODHeader xmlns:vodh="http://www.example.com/soap/header/">
<vodh:info>getus开发者_运维知识库er</vodh:info>
<vodh:authentication>
<vodh:username>xxx</vodh:username>
<vodh:password>xxx</vodh:password>
</vodh:authentication>
</vodh:VODHeader>
<vodb:VODBody xmlns:vodb="http://www.example.com/soap/body/" version="1.0">
<vodb:idUser>65344</vodb:idUser>
<vodb:message>Lorem ipsum</vodb:message>
</vodb:VODBody>
I was using SoapClient to create an array and pass it as parameter but is well defined so?
$client = new nusoap_client($Urlserver,FALSE);
//$data_xml is the xml I mention in previous lines
$msg = $client->serializeEnvelope($data_xml);
$result=$client->send($msg, $Urlserver);
This is the correct way to send data or other method.
And soap responds with an ACK.
精彩评论