Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CSS
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

1 solution

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.
 
Share this answer
 
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900