arishanapalli / wsdl2objc

Automatically exported from code.google.com/p/wsdl2objc
MIT License
0 stars 0 forks source link

SoapFault check is hardcoded to the namespace "soap" #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  If a fault is returned with a different namespace than "soap" like 
"soapenv" then the fault will 
not be created and an empty bodyParts will be returned. 
. 

What is the expected output?
It should use the namespace of the document in checking for a namespace.

What do you see instead?
It checks the hardcoded value of "soap". For example:  in Binding_M.template

else if (   xmlStrEqual(bodyNode->ns->prefix, (const xmlChar *) "soap") &&      

                xmlStrEqual(bodyNode->name, (const xmlChar *) "Fault")) 
{
    SOAPFault *bodyObject = [SOAPFault deserializeNode:bodyNode]; ....
}

Could change
   (const xmlChar*)"soap"            to 
   cur->ns->prefix to get

else if (   xmlStrEqual(bodyNode->ns->prefix, cur->ns->prefix) &&               

                xmlStrEqual(bodyNode->name, (const xmlChar *) "Fault")) 
{
    SOAPFault *bodyObject = [SOAPFault deserializeNode:bodyNode]; ....
}

My Soap response with fault message and namespace of sopaenv:
 <?xml version='1.0' encoding='UTF-8'?> 
     <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">         
     <soapenv:Header/> 
     <soapenv:Body> 
         <soapenv:Fault>
             <faultcode>soapenv:Receiver</faultcode>
             <faultstring>Err fault occurred</faultstring> 
             <detail/> 
         </soapenv:Fault>
     </soapenv:Body> 
</soapenv:Envelope>

Original issue reported on code.google.com by mr.coo...@gmail.com on 6 Aug 2009 at 7:50

GoogleCodeExporter commented 9 years ago
Fixed and updated to support SOAP 1.2 in the iPhone branch version.
Please verify.

Original comment by hasse...@gmail.com on 4 Sep 2009 at 1:19