开发者

SOAP and IOS Development

I am developing an IOS application, which uses web services (SOAP/WSDL). I have built it like this: I construct my soap message manually (using soapui) and I call it like this :

NSData *xmlData =  // a method to construct my soap xml (my xml is in resources folder of my application which I have generated with soapui)

NSURL *url = [NSURL URLWithString:@"https:myUrlWSDL"];
self.currentRequest = [ASI开发者_如何学PythonFormDataRequest requestWithURL:url];
[self.currentRequest appendPostData:xmlData];
[self.currentRequest setDelegate:self];
[self.currentRequest startAsynchronous];

This works fine.

My question is: Why do others programmers use soap clients like gSoap to call their web services? Why don't they use something simple like I have described? (it's not mine) Why are there so many soap clients & utilities?

Thanks for your answers.


When you start getting into WS-Security and other complexities with the services, it makes less and less sense to parse the SOAP requests/responses, figure out the encryption, etc., by writing it yourself. Especially if you have to support multiple platforms. Hence gSOAP is a C++ library that would work in Android and iOS that already does this.


You should have a look at Sudz-C clean source code from your web services.


the question is more philosophical, somebody might not know the method you used above or prefers something else... who knows and who cares?


I used http://easywsdl.com generator. It works perfect with my WS

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜