Tag: web services

How can I connect iPhone and web service and get XML data?

I know how to connect to web server using an iPhone but now I have to connect the iPhone to a web service. I don’t know how to do it and there is no demo or class available online. Does anyone have any ideas?

Objective-C: Best way to access REST API on your iphone

been wrestling with this for some time. I am trying to access a REST api on my iphone and came across the ASIHTTP framework that would assist me. So i did something like //call sites, so we can confirm username and password and site/sites NSURL *url = [NSURL URLWithString: urlbase]; ASIHTTPRequest *request = [[[ASIHTTPRequest alloc] […]

Consume WCF Web Service using Objective-C on iPhone

I am having a hard time consuming a very simple (Hello World) WCF web service in my iPhone app. From what I have read, you must manually create the request message then send it to the web service URL. I was able to accomplish this on a .asmx web service, but not with a WCF […]

how to get data which contains $ ` € and some Round Bullets using web service in Xcode

I am making a Business IOS application for iPhone. I am calling web service, it’s sends data in JSON Format.the response contains character Like $ and ‘ and € and some Round Bullets. when I am calling the web service while parsing data come their but before these characters data is present but after these […]

How to call a WSDL web service in iphone

How can i access a WSDL web service? Can any one give some code or tutorial for how to implement it on iphone.

sync core data with web server

I’m creating an app about birds. This app should also work in offline mode. So I decided to use Core Data. I plan to have 1 table with approximately 700 records. All the birds will be displayed in a table view. Workflow should be like this: User starts app Request is sent to server in […]

Handle XML parsed response in swift

Here is the code where I’ve sent a SOAP message to my Web Service, with my Integration key, Username and Password. I was able to get the response and parse it all the way down to foundCharacters. Now I need to store both elements found inside the parsed response, so I can use them later […]

iOS – calling Webservice and parsing JSON in Swift

I am using NSURLSession to call my own Webservice which returns JSON, works fine with this code: func getJSONFromDatabase(){ let url = NSURL(string: “http://www.myurl/mysqlapi.php”) let task = NSURLSession.sharedSession().dataTaskWithURL(url!) {(data, response, error) in self.json = NSString(data: data!, encoding: NSUTF8StringEncoding) print(self.json) } task.resume() } However, it seems that this Task is not executed in the right order, […]

How to connect to a web service using NSURLSession with Delegate methods?

I am taking a stab at connecting to web services in iOS and I am running into a lot of problems. I found a practice web service here – http://www.w3schools.com/webservices/tempconvert.asmx?op=CelsiusToFahrenheit I have written this code out so far let soapMessage = “<?xml version=\”1.0\” encoding=\”utf-8\”?>\n” “<soap:Envelope xmlns:xsi=\”http://www.w3.org/2001/XMLSchema-instance\” xmlns:xsd=\”http://www.w3.org/2001/XMLSchema\” xmlns:soap=\”http://schemas.xmlsoap.org/soap/envelope/\”>\n” “<soap:Body>\n” “<CelsiusToFahrenheit xmlns=\”http://www.w3schools.com/webservices/\”>\n” “<Celsius>50</Celsius>\n” “</CelsiusToFahrenheit>\n” “</soap:Body>\n” “</soap:Envelope>\n” […]

How can I define Content-type in Swift using NSURLSession

I want to set content-type in my below code to call web api. Content-type will be application/json; charset=utf-8 let url = NSURL(string: “http:/api/jobmanagement/PlusContactAuthentication?email=\(usr)&userPwd=\(pwdCode)”) println(“URL: \(url)”) let task = NSURLSession.sharedSession().dataTaskWithURL(url!) { (data, response, error) in println(NSString(data: data, encoding: NSUTF8StringEncoding)) } // task.setValue(<#value: AnyObject?#>, forKey: <#String#>) task.resume()