• Welcome to the all-new iMore Forums! - We're still moving some things around, so you may see a few quirks here and there, but we're working on getting things fully completed as soon as possible. For now, take a look around, and if you run into any major issues, please let us know in this thread!

How to call a Web method in objective-c???


New member
Aug 2, 2010
Hi! All
I am new in iPhone development. I has been stuck up. I am trying to call a web method from an .asmx web service. I know it will return xml and I have to parse the xml.
But the problem is How can I call that method in Objective-c. I need to get login with a userName and password. I need to send those to the webservice and it will renturn me a value.
Please help me by telling how can I call a Web Method?
How can I give reference to the web service. :confused:

What I had done is....
Creates the objects and passed them in WSMethodInvocationRef like
 WSMethodInvocationRef soapReq = createSOAPRequest(url, method, namespace, params, paramOrder, reqHeaders);

but it is giving an error for WSMethodInvocationRef is undeclared.

I had tried to import <coreServices/CoreServices.h> but it is giving error too.
Please suggest a way by which I can Call a web Service and Pass parameter in web method and get the xml.

Thank you.


New member
Jul 14, 2010
I don't know how many devs are on this forum, but wouldn't this question be more appropriate in a iOS dev forum?