Jump to content

SoapClient xml help


imanewbe

Recommended Posts

I am working with a soap client.

What I need to do is create the xml

 

<soapenv:Body>
<req:FareSearchRQ>
	<req:Date req:Qualifier="DEPARTURE">2013-12-07</req:Date>
</req:FareSearchRQ>
</soapenv:Body>

but I am having trouble.

I can either get

 <req:Date>2013-12-07</req:Date>

or

<req:Date req:Qualifier="DEPARTURE"/>

 

In my php code to get this I create an array with like this

$params = array(
'FareSearchRQ' => array(
	"Date" => array("Qualifier" => "DEPARTURE")
)
); //This creates the first

$params = array(
'FareSearchRQ' => array(
	"Date" => "2013-12-07"
)
); //This creates the second

 

How would I create an array to create the xml shown above?

Link to comment
https://forums.phpfreaks.com/topic/273881-soapclient-xml-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.