Problem with PHP and SOAP

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am having extreme difficulty calling SOAP from PHP. I'll try to

$wsdl =<URL location of WSDL file>  // valid entity

This contains the construct:
<xs:element name="GetPair">
                <xs:element minOccurs="1" maxOccurs="1" name="ratio"
                <xs:element minOccurs="1" maxOccurs="1"
name="tolerance" type="xs:int"/>
                <xs:element minOccurs="1" maxOccurs="1" name="teeth"

$sc = new Soap_Client($wsdl, true);

$params = array(new SOAP_Value('ratio', 'double', $target),
             new SOAP_Value('tolerance', 'int', (int) $tolerance),
             new SOAP_Value('teeth', 'int', (int) $pinion));

$ret = $sc->call('GetPair', $params, $namespace);

However, the call fails recursively, giving copious dump statements,
saying that it does not recognise ratio as a name.

Any ideas? I am at a loss. I can't help think that I am missing
something really obvious.


Re: Problem with PHP and SOAP

Is there a message defined as the input type?

You possibly may need to pass array('paramName' => $valArray) when
invoking the method.

Another option if you can do it in your environment is to try PHP5

On Feb 10, 11:36 am, wrote:
Quoted text here. Click to load it

Re: Problem with PHP and SOAP

On 10 Feb, 16:36, wrote:
Quoted text here. Click to load it

I tried the following construct, which eliminated the dump, but gave
me an error message when checking PEAR.

$sc = $WSDL->getProxy( );
$ret = $sc->GetPair($ratio, (int) $tolerance, (int) $pinion);

Could not deserialize Soap message

Site Timeline