We help IT Professionals succeed at work.

Accessing WCF service from iPhone

Jai S
Jai S used Ask the Experts™
on
I want to access a WCF service created in .net to be accessed via an iphone app. I currently know the end points of the service(svc file) and can access it via a browser...can you provide a sample code on how to access this svc file via iphone app using objective C
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2011

Commented:
Top Expert 2011

Commented:
Jai STech Arch

Author

Commented:
Hi dj,

Thanks. The problem i have is this, one of the parameters for a web method is a class object called OragSearchCritirea, which is defined inside my service...how do i pass this parameter to the svc when calling from iphone ?
Top Expert 2011

Commented:
check this tool
wsdl2objc -Generates Objective-C (Cocoa) code from a WSDL for calling SOAP services
http://code.google.com/p/wsdl2objc/
Jai STech Arch

Author

Commented:
too many errors when i generate code with that and use it...is there any other way of passing a class object to the soap message ???
Top Expert 2011

Commented:
also try anoher tool for code generator
http://www.sudzc.com/Default.aspx

another way if you can to  change to JSON/REST  WCF SERVICE or it already exists
http://knowledgebaseworld.blogspot.com/2010/06/calling-wcf-service-from-iphone.html
Top Expert 2011
Commented:
Jai STech Arch

Author

Commented:
hi dj, thanks for the information...
have used soapUI to get the request XML structure and have passed it through HTTP request to the web service and was able to get proper response. cool link that you have provided was extremely helpful...