-1

ok there is no real way to connect to soap within ios5... sadly enough.

I cant really believe that things that take 3 lines of code in php,

$client = new SoapClient("scramble.wsdl");
print($mirror = $client->sendAndGetString("hello_world"));

need 366 lines of code in objective c? And that on a device that has one of the biggest number of ria's and web apps. Kind of disappointing -

Are there any new libraries I am not aware of?

If I talk to our web developer team they maybe switch to another service type that is more supported by IOS.

What would be a alternative then?

Thanks

mogio
  • 843
  • 2
  • 7
  • 18
  • There are numerous ways to connect to SOAP on the iOS, just look at the related questions here for a hint. In general, the iOS SDK is a little lower level than, say, PHP or Python. – Krumelur Jul 14 '12 at 13:41
  • I found ways to load everything as xml... this cant be right. Also it was 2 years old. Could you give me a link to an working example. Do you know libraries? thanks – mogio Jul 14 '12 at 13:51
  • See this question: [How to access SOAP services from iPhone](http://stackoverflow.com/questions/204465/how-to-access-soap-services-from-iphone) – Krumelur Jul 14 '12 at 15:32

2 Answers2

0

The difference between dynamically typed languages such as PHP and statically typed languages such as Objective-C regarding RPC protocols is that while dynamic languages typically allows you to wrap "any" service in run-time by reflecting out their metadata (e.g. WSDL), statically typed languages normally requires a code generation step before the compilation phase.

Two popular code generators seem to be wsdl2objc and sudz-c. See also this question.

Regarding alternatives, I have good experience using both JSON and XML-RPC, as well as the more schema-oriented Thrift and Protocol Buffers (ObjC).

Community
  • 1
  • 1
Krumelur
  • 31,081
  • 7
  • 77
  • 119
  • Thanks Krumelur. The link you mentioned above I actually already had known. I tried wsdl2objc and sudz-c. both create a big chunk of classes. Which arent working out off the box anyway. The whole SOAP thing really shouldnt be used on iPhone. Most of the blog threads I have checked out today went nowhere. Solutions aren't really usable to my opinion. I will try json plus php logic on the server side as it looks a bit more nativ usable by ios. – mogio Jul 14 '12 at 15:50
0

I've written several tutorials about using SOAP services in iOS with Wsdl2Objc: http://brismith66.blogspot.com/search/label/iPhone%20Development

brismith
  • 696
  • 3
  • 18