SOAP响应/请求,然后如何将其转换为PHP

任何人都可以引导我用PHP编码的方式吗?

请求

<?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 /”>
<用户名>字符串</用户名>
<密码>字符串</密码> </ UserCredentials>
</ soap:Header> <soap:Body> <LocSingleLocation xmlns =“http:// LMWService /”>
<Msisdn> string </ Msisdn> </ LocSingleLocation>
</ soap:Body> </ soap:Envelope>

响应

<?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>字符串</ MSISDN>
<Lat> string </ Lat> <Lon> string </ Lon>
<日期时间>字符串</日期时间>
<ERRCODE>字符串</ ERRCODE>
<Errdesc>字符串</ Errdesc>
</ GetLocationSingleResult> </ soap:Body> </ soap:Envelope>

我如何能够获得有关请求/响应的POST,主机,内容类型,内容长度,SOAPAction以上内容?


如果您使用的是PHP内置的SOAP客户端,则可以使用以下方法获取所有http标头,如Content-Type,Content-Length,SOAPAction等等:

var_dump($soapclient->__getLastRequestHeaders());

var_dump($soapclient->__getLastResponseHeaders());
链接地址: http://www.djcxy.com/p/35305.html

上一篇: SOAP response/Request then how to convert it in to PHP

下一篇: How to do shortest path algorithm for unweighted graph?