Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.13.0

Bug #1927 SOAP-ENC:arrayType="Struct[] without namespace in SOAP_Fault SOAP-0.8RC3
Submitted: 2004-07-20 10:38 UTC Modified: 2008-07-14 09:58 UTC
From: tilman dot baumann at pyramid dot de Assigned: yunosh
Status: Closed Package: SOAP
PHP Version: 4.3.6 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2004-07-20 10:38 UTC] tilman dot baumann at pyramid dot de
Description: ------------ The way how SOAP_Fault builds the <detail/> element seens to be not correct. It uses a xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="Struct[7]" element. Im not 100% sure if that is really no right. But i agree with the message of my client (SOAP::Lite perl) that Struct[] has no namespace. I think here should be a namespace set. I tryed to give a plain string as $detail at the construction of SOAP_Fault. But that confuses php verry hard. ;) <SOAP-ENV:Fault> <faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode> <faultstring xsi:type="xsd:string">MESSAGE</faultstring> <faultactor xsi:type="xsd:anyURI"></faultactor> <detail xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="Struct[7]" SOAP-ENC:offset="[0]"> PS: the tatatype xsi:string for faultcode is hacked for my buggy perl client which can not handle QName elements. Don't get confused by that. Reproduce code: --------------- return new SOAP_Fault('MESSAGE', 'Client', '', 'bla'); Expected result: ---------------- Maybe <detail xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:Struct[7]" SOAP-ENC:offset="[0]"> ? Don't know. Actual result: -------------- <SOAP-ENV:Fault> <faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode> <faultstring xsi:type="xsd:string">MESSAGE</faultstring> <faultactor xsi:type="xsd:anyURI"></faultactor> <detail xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="Struct[7]" SOAP-ENC:offset="[0]"> ...

Comments

 [2004-10-21 10:30 UTC] robert at accettura dot com
This is a blocker for a project I'm working on. Any known workaround until PEAR::SOAP is updated would be appreciated.
 [2004-10-24 22:08 UTC] mir at datanom dot net
Hi, I think I have solved the bug:-) Try this patch: --- /tmp/SOAP-0.8RC3/Base.php 2004-01-17 15:22:58.000000000 +0100 +++ /usr/share/php/SOAP/Base.php 2004-10-25 05:00:08.000000000 +0200 @@ -478,15 +478,16 @@ $xmlout_offset = " SOAP-ENC:offset=\"[0]\""; if (!$arrayType) { $numtypes = count($array_types); - if ($numtypes == 1) $arrayType = array_type; // using anyType is more interoperable if ($array_type == 'Struct') { $array_type = ''; } else if ($array_type == 'Array') { $arrayType = 'anyType'; $array_type_prefix = 'xsd'; - } else + } else { + if ($numtypes == 1) $arrayType = $array_type; if (!$arrayType) $arrayType = $array_type; + } } } if (!$arrayType || $numtypes > 1) { Regards, Michael
 [2007-01-21 19:58 UTC] yunosh (Jan Schneider)
If this is still an issue, please open a new bug report. This one has been rendered useless due to the spam.
 [2007-05-05 17:09 UTC] cellog (Greg Beaver)
all spam has been deleted, sorry for the inconvenience
 [2008-07-04 19:04 UTC] yunosh (Jan Schneider)
A unit test has been added to CVS. xsd: is not the correct prefix since Struct is not an XML-Schema type, but but a SOAP-Encoding type.
 [2008-07-14 09:58 UTC] yunosh (Jan Schneider)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.