IPhone - calling SOAP services

I am learning how to use web services for a student project using an iPhone.

The top answer from How to access SOAP services from iPhone suggested using http://code.google.com/p/wsdl2objc/ to consume the services.

However, I tried using http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl for WSDL, but it crashes the application.

Any thoughts? I'm not sure if the issue is WSDL or application related.

+2


source to share


3 answers


My experience with it wsdl2objc

is that it is immature at best. Apple solutions ( WSMethodInvocation

and its siblings) are marginally better despite their age. I want you to have an easy answer, but when you get past that, my experience is that you have two options:

  • Manual recording of SOAP calls. For simple services, this is possible, and is actually my preferred solution if I can handle it.

  • Wrap the gSOAP- generated code in ObjC ++.

Your best bet is to find a way to avoid SOAP and use a REST interface if you can get it.



If you have experience with SOAP, you may need help with the structure wsdl2objc

. They have a laudable goal. I have not tried the 0.6 release they released this week. Maybe it's much better now. If you try release 0.5, please try again.

I know that you are a student, so your needs are different. As a pro, I avoid SOAP in Cocoa like the plague and fall back to gSOAP when I can't avoid it. Fortunately, REST is becoming more and more popular, so I can usually dodge the bullet one more time.

+3


source


http://sudzc.com/



it will generate Obj with soap client. here you can get an example and documentation of your web service if you give the url wsdl

+4


source


Using wsdl2objc can only be used when your requests and responses are of simple types. When I used wsdl2objc for a service that had complex request and response types, I found out about this.

I am planning on using gSOAP for this.

0


source







All Articles