Solved - seems that PEAR::SOAP_WSDL can't handle complex parameter
elements so these parameters were being dropped. It'l be easier to
build PHP with SOAP than to attempt a hack.

Regards

Hamish

On Jul 2, 9:52 am, Hamish Campbell <[email protected]> wrote:
> Hey everyone,
>
> I'm running into trouble with PEAR::SOAP. I've created a simple
> wrapper for PHP's built-in SOAP client (SoapClient) for a specific
> service and it works flawlessly, but I've had to port the wrapper to
> handle the PEAR client for a server that is set up for PEAR::SOAP
> (Soap_Client) instead.
>
> By all accounts it should be simple - they're mostly equivalent and
> AFAIK the only difference I should need to make is to change the
> constructor slightly. The WDSL loads correctly but when I call a
> method the parameters are not being included in the request body.
>
> According to the PEAR manual, it should be the same as SoapClient:
>
>    $response = $soapclient->methodname( [ array parameters] );
>
> eg:
>
>    $this->mymethod(array('param1' => 'value1', 'param2' => 'value2'));
>
> However the soap request body is:
>
>    <SOAP-ENV:Body>
>       <ns1:mymethod/>
>    </SOAP-ENV:Body>
>
> The expected request body (as per the equivalent SoapClient wrapper)
> is:
>
>    <SOAP-ENV:Body>
>       <ns1:mymethod>
>          <param1>value1</param1>
>          <param2>value2</param2>
>       </ns1:mymethod>
>    </SOAP-ENV:Body>
>
> Clearly I'm missing something basic.. anyone know where the facepalm-
> inducing mistake I've made might be?
>
> Cheers
>
> Hamish

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to