SOAP response/Request then how to convert it in to PHP
Can any one guide me the way of coding in PHP?
Request
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header> <UserCredentials xmlns="http://LMWService/">
<userName>string</userName>
<password>string</password> </UserCredentials>
</soap:Header> <soap:Body> <LocSingleLocation xmlns="http://LMWService/">
<Msisdn>string</Msisdn> </LocSingleLocation>
</soap:Body> </soap:Envelope>
Response
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body> <GetLocationSingleResult xmlns="http://LMWService/">
<Msisdn>string</Msisdn>
<Lat>string</Lat> <Lon>string</Lon>
<Datetime>string</Datetime>
<Errcode>string</Errcode>
<Errdesc>string</Errdesc>
</GetLocationSingleResult> </soap:Body> </soap:Envelope>
How am I able to get POST, Host, Content-Type, Content-Length, SOAPAction regarding request/response the above ?
If you are using PHP's built in SOAP client, you can obtain all the http headers such as Content-Type, Content-Length, SOAPAction, etc. by using:
var_dump($soapclient->__getLastRequestHeaders());
and
var_dump($soapclient->__getLastResponseHeaders());
链接地址: http://www.djcxy.com/p/35306.html
上一篇: WS生成错误的名称空间URI