KanikaVarma / sudzc

Automatically exported from code.google.com/p/sudzc
0 stars 0 forks source link

always returns (null) using ARC #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Whenever I try to consume any webservice using ARC
2. The NSLog (@"%@", response) the SoapRequest.m class, show return envelop 
correctly but the return is always (null)
3.

What is the expected output? What do you see instead?
The result of the envelope containing the return, but I get (null).

What version of the product are you using? On what operating system?
MAC OS X 10.7.2

Please provide any additional information below.
I tested several different webservices and always the same error occurs.

Original issue reported on code.google.com by junior.s...@gmail.com on 2 Feb 2012 at 5:00

GoogleCodeExporter commented 9 years ago
I ran into the same issue.

I modified soap.m

// Gets the node from another node by name.
+ (CXMLNode*) getNode: (CXMLNode*) element withName: (NSString*) name {
    for(CXMLNode* child in [element children]) {
/*
 * in my case the getNode checks for "Body" but the [child name] returns "soapenv:Body"
 * extention of (http://code.google.com/p/sudzc/issues/detail?id=34)
 *
 * I have changed the [[child name] isEqual: name] with [[child name] hasSuffix:: name] 
 *
 *      if([child respondsToSelector:@selector(name)] && [[child name] isEqual: name]) {
 */
        if([child respondsToSelector:@selector(name)] && [[child name] hasSuffix:: name]) {
            return (CXMLNode*)child;
        }
    }
    for(CXMLNode* child in [element children]) {
        CXMLNode* el = [Soap getNode: (CXMLElement*)child withName: name];
        if(el != nil) { return el; }
    }
    return nil;
}

Original comment by notesro...@gmail.com on 5 Feb 2012 at 1:59

GoogleCodeExporter commented 9 years ago
Ran into same issue too, additional Informations:

- IIS Server 7.0 on Vista
- Webservices running on .Net Framework 2.0
- Soap response as attached file

the issue is apperently solved modifying Soap.m as described by user 
notesro..., but I didn't try other webservices.

Original comment by pgiacom...@gmail.com on 10 Feb 2012 at 8:30

Attachments:

GoogleCodeExporter commented 9 years ago
Using the above approach, I was able to solve the issue, however I am still not 
getting the expected data..

Original comment by ankur.dh...@sourcebits.com on 17 Apr 2012 at 9:38

GoogleCodeExporter commented 9 years ago
this code really works .... :)

Original comment by vyomthak...@gmail.com on 26 May 2012 at 11:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Code really works, both for simple calls, and for calls composed of complex 
messages

Original comment by morten.s...@gmail.com on 18 Jul 2012 at 5:45

GoogleCodeExporter commented 9 years ago
In my case it was an .Net web service (WCF) and I had to use s:Body: Found out 
by printing the CXML document:

CXMLNode* test = [doc rootElement];
NSLog(@"%@",test);
Here I got this:

<CXMLElement 0x68c1a50 [0x68c1b10] s:Envelope <s:Envelope 
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><**s:Body**><GetUserIDRespon
se 
xmlns="http://tempuri.org/"><GetUserIDResult>8</GetUserIDResult></GetUserIDRespo
nse></s:Body></s:Envelope>>
Thanks to previous posts I was able to find it out and posted the complete 
answer again on my blog: 
http://www.dailycode.info/Blog/post/2012/08/07/SUDZC-webservices-always-return-0
-(WCF-web-service-and-IOS-client).aspx

Original comment by mark.der...@gmail.com on 8 Aug 2012 at 11:42

GoogleCodeExporter commented 9 years ago
great jot, it works :)

Original comment by aro...@gmail.com on 24 Oct 2012 at 9:13

GoogleCodeExporter commented 9 years ago
Wow man.... Works fine.. Thank you very Much!! :)

Original comment by gmnthb...@gmail.com on 25 Oct 2012 at 12:41

GoogleCodeExporter commented 9 years ago
Thank you, notesro.

this fixed my problem, working with a Axis2 Webservice. I still get only the 
first  item of en String Array, but this is another issue i think.

Original comment by The.Stef...@gmail.com on 25 Nov 2012 at 2:46

GoogleCodeExporter commented 9 years ago
i am getting only the first item too :(

Original comment by kennet...@gmail.com on 18 Dec 2012 at 4:57

GoogleCodeExporter commented 9 years ago
Hi, i found the solution for the "only the first item problem" here:

http://code.google.com/p/sudzc/issues/detail?id=19&q=array

Original comment by The.Stef...@gmail.com on 18 Dec 2012 at 9:07