ID: 39515 Updated by: [EMAIL PROTECTED] Reported By: david at acz dot org -Status: Assigned +Status: Bogus Bug Type: SOAP related Operating System: SuSE Linux 9.3 PHP Version: 5.2.0 Assigned To: dmitry New Comment:
The wsdl file doesn't describe fault massage at all. ext/soap can handle only known attributes of known types, but wsdl says nothing about <keyword reason="foobar" value="hello"/> Previous Comments: ------------------------------------------------------------------------ [2006-11-15 20:10:43] david at acz dot org The service requires authentication, so unfortunately I cannot provide a complete example, but this is the WSDL and how I am using it: https://client.enhance.com/plm/services/CampaignWebService?wsdl $client = new SoapClient($wsdl, array("exceptions" => 0)); $x = (DETAILS ELIDED) $r = $client->addKeywords($x); if (is_soap_fault($r)) { // $r->detail is missing attributes } ------------------------------------------------------------------------ [2006-11-15 17:09:20] [EMAIL PROTECTED] XML attributes are handled only if they are properly described in WSDL file. Do you use any WSDL file? Can you post WSDL file and PHP code? ------------------------------------------------------------------------ [2006-11-14 21:25:25] david at acz dot org Description: ------------ Attributes from tags inside a SOAP fault detail are not returned in the SoapFault object. Below is a SOAP fault XML response and associated SoapFault object. Notice that the attributes for the "keyword" tag are missing. Reproduce code: --------------- <?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body> <soapenv:Fault> <faultcode xmlns:ns1="(ELIDED)">ns1:badKeywords</faultcode> <faultstring>error string here</faultstring> <detail> <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">test.example.com</ns2:hostname> <keyword reason="foobar" value="hello"/> </detail> </soapenv:Fault> </soapenv:Body></soapenv:Envelope> Expected result: ---------------- SoapFault Object ( [message:protected] => error string here [string:private] => [code:protected] => 0 [file:protected] => hello.php [line:protected] => 166 [trace:private] => Array (ELIDED) [faultstring] => error string here [faultcode] => ns1:badKeywords [detail] => stdClass Object ( [hostname] => test.example.com [keyword] => (ATTRIBUTES "reason" AND "value") ) ) Actual result: -------------- SoapFault Object ( [message:protected] => error string here [string:private] => [code:protected] => 0 [file:protected] => hello.php [line:protected] => 166 [trace:private] => Array (ELIDED) [faultstring] => error string here [faultcode] => ns1:badKeywords [detail] => stdClass Object ( [hostname] => test.example.com [keyword] => ) ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39515&edit=1