开发者

PHP - how to create this SOAP XML request?

开发者 https://www.devze.com 2022-12-19 16:58 出处:网络
I\'m trying to figure out how to structure data properly in PHP in order to make a SOAP XML request like this:

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

0

精彩评论

暂无评论...
验证码 换一张
取 消