I'm trying to figure out how to structure data properly in PHP in order to make a SOAP XML request like this:
<typ:saveRequest locationName="example.com">
<typ:开发者_如何学Cdatatype owner="ME" class="OPEN">
<typ:order>1</typ:order>
<typ:datavalue>random@example.com</typ:datavalue>
</typ:datatype>
</typ:saveRequest>
The PHP function looks like this:
$this->soapclient->saveRecord($dataparams);
How do I structure $dataparams to fit the above saveRequest? ie, something like:
$dataparams= array(
'locationName' => $domain,
...
);
In case you still need help with this:
$dataparams= array(
'datatype' => array('order' => 1, 'datavalue' => 'random@example.com',
);
then run
$this->soapclient->saveRequest($dataparams);
This should do it, in case I understood correctly. I am not sure about the location / owner / class but at least this could give you a starting point.
Use NuSOAP library for this that I find good.
An introduction is here http://www.scottnichol.com/nusoapintro.htm#hw
精彩评论