Trouble receiving an xml document inside the envelope

20 views
Skip to first unread message

Morten Holst

unread,
Oct 10, 2011, 7:48:52 AM10/10/11
to SudzC
Hi SudzC

I am very impressed with your WSDL code generator.

However, I am having a lot of trouble retrieving an xml response from
within the soap envelope.

When I enable logging, I can see that the soap envelope returned from
the web service looks right.

The comment above the generated service function states that the
returned value is of type CXMLNode, which is also correct.
When i cast the object to a CXMLNode, and call stringValue, or another
xml node function, I get an unrecognized selector:
-[__NSCFDictionary stringValue]: unrecognized selector sent to
instance
... and the object is apparently an NSCFDictionary.

Can anyone help me figuring out what the problem is?

The server function:

/* Returns CXMLNode*. */
- (SoapRequest*) GetRenderXML: (id <SoapDelegate>) handler
RequestXml: (NSString *) RequestXml
{
return [self GetRenderXML: handler action: nil RequestXml:
RequestXml];
}

- (SoapRequest*) GetRenderXML: (id) _target action: (SEL) _action
RequestXml: (NSString *) RequestXml
{
NSMutableArray* _params = [NSMutableArray array];

[_params addObject: [[[SoapParameter alloc] initWithValue:
RequestXml forName: @"RequestXml"] autorelease]];
NSString* _envelope = [Soap createEnvelope: @"GetRenderXML"
forNamespace: self.namespace withParameters: _params withHeaders:
self.headers];
SoapRequest* _request = [SoapRequest create: _target action: _action
service: self soapAction: @"http://tempuri.org/GetRenderXML" postData:
_envelope deserializeTo: nil];
[_request send];
return _request;
}

Best regards,
Morten

Morten Holst

unread,
Oct 10, 2011, 8:33:49 AM10/10/11
to SudzC
Another note...
When I do a "print-object element" from the connectionDidFinishLoading
line 167 in SoapRequest, I get the following node.

<CXMLElement 0x4c65850 [0x4c461b0] GetRenderXMLResponse
<GetRenderXMLResponse><GetRenderXMLResult><action type="screen"
id="mainmenu">...</action></GetRenderXMLResult></
GetRenderXMLResponse>>

I assume this is the cause of the error.

Best regards
Morten
Reply all
Reply to author
Forward
0 new messages