Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sudzc with iOS 5 and ARC

I've been trying to get a webservices working using Sudzc. Whenever I convert my WSDL to obj-c without automatic reference counting it works just fine. The problem is, we are building all our applications in iOS 5 now and all our code uses ARC. Sudzc now also allows you to create a bundle with ARC enabled but when I run this code it always returns null.

I tried debugging the Sudzc code and it does receive a correct xml response back from the service. Somewhere something is lost in translation. I tried converting the working Sudzc code without ARC into code with ARC enabled but as soon as I've fixed all errors it returns null again.

Did anyone encounter this and know what is going wrong? Would save me loads of time not having to debug the whole Sudzc code by myself.

like image 212
Twan Avatar asked Dec 27 '11 14:12

Twan


2 Answers

In my case (SUDZC with ARC for IOS), I have replaced the folowing code in SoapRequest.m file;

CXMLNode* element = [[Soap getNode: [doc rootElement] withName:@"Body"] childAtIndex:0];

with

CXMLNode* element = [[Soap getNode: [doc rootElement] withName:@"soap:Body"] childAtIndex:0];

Somehow the respective function is searching for the root element with name "Body". After inspecting the soap envelope it is easy to see the root element's name is "soap:Body".

like image 146
ilyasd Avatar answered Oct 16 '22 08:10

ilyasd


My webService was create in Java with Axis Eclipse.

FOR ARC I use : "soapenv:Body"

And in the file SoapObject.m I add

#import "Soap.h"
#import "SoapObject.h"
like image 32
Anthone Avatar answered Oct 16 '22 08:10

Anthone