Click here to Skip to main content
12,767,637 members (52,274 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Mobile WCF iPhone
I have a REST webservice with Get method in which I'm passing a parameter and retrieving the results from SQL database .Now I have to consume that websevice in iPhone using XCode .My url is like
http://localhost:8732/IServices/RoleService/json/RolebyCPid/?companyId={23834B9B-88DF-4B72-AF0B7B152E23E124}&providerId={4257bc1a-3386-4464-9c74-0645ba1e08a4}
Now how to call this url and also how to pass parameters using Xcode?
Posted 15-Aug-12 0:35am
cutie1297

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

The problem lies in your URL: "localhost" is not accessible from your iPhone. First, make sure that you can connect to your webservice from other computers (you'll need a computer name or IP address - but not 127.0.0.1). Then connect your iPhone with your local network, and try to call the webservice from the browser. Then comes your coding in xcode.
  Permalink  
Comments
cutie1 15-Aug-12 6:55am
   
k I will update the webservice in server...Can u please tell me how can I use that particular url in iPhone

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 15 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100