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.
source to share
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.
source to share