Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
CSS
Hi,

I have created a wcf service to insert data in my sql server DB.

here is the URL used :
41.142.251.142/JsonWcfService/GetEmployees.svc/json/InsertEmployee/val1/val2/val3.


so when I want to consume this web service inside my xcode 5, I used the following:

I created a form with ( firstName.text, lastName.text,address.text, and button to insert data ) 

in my ViewController.m:

I declared the webservice URL as follow :
 #define BaseWcfURL [NSURL URLWithString: @"http://41.142.251.142/JsonWcfService/GetEmployees.svc/json/InsertEmployee/{id1}/{id2}/{id3}"]

so in my button action to insert the data, I added this command to recuperate all the text fields values :

NSstring *str= [BaseWcfUrl stringByAppendFormat:@"InsertEmployee/@/@/@", firstName.text,lastName.text,address.text];


but the issue here is the str string always return Nil, and the textfield are nil as values! ????

I don't Know why, I entered the value but I cannot recuperate them ?!!
Posted

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