php soapclient to xml request
$client = new SoapClient(null, array('location' => "http://www.xxx.com/demo/webservice/wsHotel.sh",'uri' => "http://www.xxx.com/demo/", 'encoding' =>"ISO-8859-9"));
$parm['login'] = "UserName";
$parm['pass'] = "Pass";
$parm['agency_code'] = "AgencyCode";
$parm['letters'] = "Germany";
$inf = ($client->__soapCall("destinationListByLetterV2",array($parm)));`
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<ns1:destinationListByLetterV2 xmlns:ns1="urn:http://www.xxx.com/demo/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<params xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Array" ns2:arrayType="xsd:string[4]">
<item xsi:type="xsd:string">UserName</开发者_Python百科item>
<item xsi:type="xsd:string">Pass</item>
<item xsi:type="xsd:string">AgencyCode</item>
<item xsi:type="xsd:string">Germany</item>
</params>
</ns1:destinationListByLetterV2>
</soap:Body>
</soap:Envelope>
missing parameter problem? How to soapclient request to xml request?
$parm['login'] = "UserName";
$parm['pass'] = "Pass";
$parm['agency_code'] = "AgencyCode";
$parm['letters'] = "Germany";
Then you can call it like this:
$result = $client->destinationListByLetterV2($parm);
精彩评论