views:

320

answers:

2

Hi!

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:datatype owner="ME" class="OPEN">
        <typ:order>1</typ:order>
        <typ:datavalue>[email protected]</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,
    ...
);
A: 

Use NuSOAP library for this that I find good.

An introduction is here http://www.scottnichol.com/nusoapintro.htm#hw

pMan
Hi pMan - thanks for responding, but I dont want to use another library just because I can't figure out how to access this one properly... Thanks anyway!
Steve
A: 

In case you still need help with this:

$dataparams= array(
    'datatype' => array('order' => 1, 'datavalue' => '[email protected]',
);

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.

Andrei Gabreanu