1
votes

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 ?

1
some sample code I am already develop but I am not be able to develop this is there any one help me out - dropbox.com/sh/cb0owxww8ccuy2a/AACCCu9PeFYpBG1bdQwN-N64a?dl=0Prashant
still waiting to some one give me the proper answer?Prashant
You could try to set your request to get a XML response and, in your PHP data handling, use something like simplexml_load_file() and get data from a foreach for example.RPichioli

1 Answers

0
votes

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());