Reputation: 10344
I'm learning how to consume web services for a student project using the iPhone.
The top answer from How to access SOAP services from iPhone suggested using http://code.google.com/p/wsdl2objc/ to consume services.
However, I've tried using http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl for the WSDL, but it crashes the application.
Any thoughts? I'm not sure if the problem is with the WSDL or with the application.
Upvotes: 2
Views: 1950
Reputation: 12201
Using wsdl2objc can be relied only when your requests and responses will have simple types. When I used wsdl2objc for a service which had complex request types and responses, I came to know this.
I am planning to use gSOAP for this.
Upvotes: 0
Reputation: 5435
it will generate Obj c soap client. here u can get example and documentation of your webservice if u giving your wsdl url
Upvotes: 4
Reputation: 299265
My experience with wsdl2objc
is that it is immature at best. Apple's solutions (WSMethodInvocation
and its kin) are little better despite their age. I wish there were some easy answer for you, but when you get down with it, my experience is you have two options:
Hand write the SOAP calls. For simple services this is possible, and it is actually my preferred solution if I can get away with it.
Wrap gSOAP-generated code in ObjC++.
Your best option of course is to find a way to avoid SOAP and use a REST interface if you can possibly get one.
If you're experienced in SOAP, then you may want to help out the wsdl2objc
framework. They have a laudable goal. I haven't tried out the 0.6 release they put out this week. Maybe it's much better now. If you're trying the 0.5 release, maybe try again.
I know you're a student, so your needs are different. As a professional, I avoid SOAP in Cocoa like the plague, and fall back to gSOAP when I can't avoid it. Luckily REST is becoming increasingly popular, so I usually can dodge the bullet one more time.
Upvotes: 3