Click here to Skip to main content
11,720,562 members (70,229 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: 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 14-Aug-12 23:35pm
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 at 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
0 Sergey Alexandrovich Kryukov 2,129
1 OriginalGriff 884
2 F-ES Sitecore 640
3 Maciej Los 609
4 Richard MacCutchan 540


Advertise | Privacy | Mobile
Web02 | 2.8.150901.1 | Last Updated 15 Aug 2012
Copyright © CodeProject, 1999-2015
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