Shun87 / wsdl2objc

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

Response XML parsing needs to be aware of a ( possible ) missing namespace in the body #79

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The line 

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

pretty much assumes that both bodyNode->ns and cur->ns are "there". Well, on my 
systems, ( 
both sl, xcode 3.1.. ) the whole thing fails when confrontend with a wellformed 
and 100% valid 
response. the solution was to add an additional condition to the if... 

 else if (!(bodyNode->ns == nil) && xmlStrEqual(bodyNode->ns->prefix, cur->ns->prefix) && 
                                                                         xmlStrEqual(bodyNode->name, (const xmlChar *) "Fault")) 

so yes, basically this is a patch. 

Original issue reported on code.google.com by m.haarm...@gmail.com on 30 Mar 2010 at 1:07

GoogleCodeExporter commented 8 years ago
The code crashes since it uses xmlParseMemory parser which also recognizes 
blanks and newlines as valid xml 
elements.
I have changed the parser to xmlReadMemory with XML_PARSE_NOBLANKS flag set and 
the crash is gone.
You can find the patch in the attachment.

regards

Original comment by pmilosev on 20 May 2010 at 1:11

Attachments:

GoogleCodeExporter commented 8 years ago
Patch by pmilosev is in trunk. Please test, thanks.

Original comment by hasse...@gmail.com on 15 Jul 2010 at 8:36

GoogleCodeExporter commented 8 years ago
Hi,
I'm new in the iphone development, and the wsdl2objc is amazing.
I have this issue, so must I have 2 options :
1)I change the generated code of wsdl2objc ; but I will need to change it all 
times
2)I apply the patch.
But I don't know how to apply it, and I don't want to make a mistake that will 
break my wsdl2objc.
Must I double clic on the .patch file? will it update my wsdl2objc program ??

thanks for your help.

Original comment by tibla...@gmail.com on 17 Mar 2011 at 10:27