Jump to content

Soap client


oboe

Recommended Posts

Hello All,

 

I'm working with a SOAP WSDL API for the first time, i need to send off some params to the server so it returns the data i'm after, i've read the SoapClient manual and looked at a few tutorials but I can't seem to work out how to actually send the data. I have been provided a sample XML document of how the request should be formatted which I have attached.

 

All I have worked out so far is how to run the client:

$client = new SoapClient($url); 

 

The request XML the server is looking for is as follows:

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<ARN_ReadRQ TransactionIdentifier="f8f766bb-87c0-42c0-83d5-29416b8477b7" TimeStamp="2007-07-31T14:33:52.1051647-07:00" EchoToken="Retrieve" Version="1.0" xmlns="http://www.domain.com/">
		<POS>
			<Source>
				<RequestorID ID="Username" MessagePassword="Password"/>
			</Source>
		</POS>
		<ReadRequests>
			<ReadRequest>
				<UniqueID ID="1020-322162" Type="14"/>
			</ReadRequest>
		</ReadRequests>
	</ARN_ReadRQ>
</s:Body>
</s:Envelope>

 

I am under the assumption this stuff goes in an array? If so how do I format it and how do I send it across?

 

Any help greatly appreciated,

 

Cheers.  :D

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.