Re: [SOAP] PEAR::SOAP SOAP_Fault not working or not documented

From: Date: Sun, 09 Mar 2003 20:13:48 +0000
Subject: Re: [SOAP] PEAR::SOAP SOAP_Fault not working or not documented
References: 1  Groups: php.soap 
Request: Send a blank email to php-soap+get-458@lists.php.net to get a copy of this message
Two more questions: 1. For a PHP PEAR::SOAP client, is $ret = $soapclient->something ... if (is_object($ret) && get_class($ret) == 'soap_fault') { ... the proper way to test for a fault coming back from the call, or is there something simpler?
if (PEAR::isError($ret)) { // $ret is a soap_fault object // soap_fault subclasses the PEAR Error class. }
2. With your correction above, Java Apache Axis clients are now interpreting faults correctly. But Perl SOAP::Lite clients are still not; they give a diagnostic and then the full XML fault packet: [jls@oshea perl]$ perl hello2-php.pl foo Unrecognized type '{http://www.w3.org/2001/XMLSchema}QName' <faultcode xsi:type="xsd:QName">SOAP-ENV:12345</faultcode>
Do you know what the "Unrecognized type '{http://www.w3.org/2001/XMLSchema}QName'" diagnostic is about? Is this a known interop problem?
Probably that SOAP-ENV:12345 is not a valid SOAP faultcode. Take a look at the SOAP spec, only a few codes are valid, and they mean very specific things. You should probably only be using either SOAP-ENV:Client or SOAP-ENV:Server. Shane

« previous php.soap (#458) next »