php - Send XML with SOAP

202

I need to send SOAP data.

<vodh:VODHeader xmlns:vodh="http://www.example.com/soap/header/">
   <vodh:info>getuser</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.

People are also looking for solutions to the problem: php - Cannot connect to remote MySql Server in Kohana

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.