1

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 ?

3
  • 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=0 Commented Sep 26, 2014 at 13:35
  • still waiting to some one give me the proper answer? Commented Oct 8, 2014 at 7:30
  • 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. Commented Feb 15, 2016 at 16:21

1 Answer 1

0

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()); 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.