Send XML data to a server using PHP -


can please assist me send xml data server using php ?

here information

<?xml version="1.0" encoding="utf-8"?>     <soapenv:envelope      xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"          xmlns:soapenc="http://www.w3.org/2003/05/soap-encoding"          xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"         xmlns:xsd="http://www.w3.org/2001/xmlschema">           <soapenv:body>             <jobrequest xmlns="http://81.105.223.86:80/cni">               <sourcesystem>kvcars</sourcesystem>               <sourcepassword>ketchup96</sourcepassword>               <sourcejobid>*kv001*</sourcejobid>               <sourceaccount>cordic</sourceaccount>               <targetsystem>target1</targetsystem>               <lifetime>60</lifetime>               <drivernotes>please wait @ reception.</drivernotes>               <operatornotes>test job cni.</operatornotes>               <bookername>jane</bookername>               <bookerphone>01954233255</bookerphone>               <bookeremail>jane.test@cordic.com</bookeremail>               <stoplist>                 <stop>                   <order>1</order>                   <passenger>fara arani</passenger>                   <address>cordic ltd, 1 rowles way, swavesey, cambridge</address>                   <postcode>cb24 4ug</postcode>                   <contactphone>01954233255</contactphone>                   <contactonarrive>ring</contactonarrive>                 </stop>                 <stop>                   <order>2</order>                   <address>heathrow airport, terminal 4</address>                   <postcode>tw6 3ga</postcode>                 </stop>               </stoplist>               <attributelist>                 <attribute>executive</attribute>                 <attribute>professional</attribute>               </attributelist>             </jobrequest>           </soapenv:body>         </soapenv:envelope> 

here details should use sending messages test version of gateway can use develop system:

url= http://81.105.223.86:80/cni sourcesystem= kvcars sourcepassword= ketchup96 

you can use sourceaccount name, except blank. if use sourcejobtype=account, book account job, else mapped cash.

there test target system called target1 configured receive jobs. target systems has simulator running simulates fleet of vehicles (one of around 100 vehicles other around 50). simulated vehicles should accept , progress jobs sent them.

here details:

target1 url= http://86.17.13.109:81/webbooker account= *kv001*   (including asterisks) user= kvcars password= ketchup96 

$url = "http://86.17.13.109:81/webbooker";

    //setting curl parameters.     $ch = curl_init();     curl_setopt($ch, curlopt_url, $url); 

// following line compulsary add is: curl_setopt($ch, curlopt_postfields, "xmlrequest=" . $input_xml); curl_setopt($ch, curlopt_returntransfer, 1); curl_setopt($ch, curlopt_connecttimeout, 300); $data = curl_exec($ch); curl_close($ch);

    //convert xml result array     $array_data = json_decode(json_encode(simplexml_load_string($data)), true);      print_r('<pre>');     print_r($array_data);     print_r('</pre>'); 

reference send xml data server using php


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -