Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
QUESTION : how to call this webservice in xcode

plz help me as fast as possible.................


i have webservice in asp.net &

it's name is searching.asmx

& my url is http://job-adda.com/searching.asmx

C#
[WebMethod]
   public string searching1(int city,int badroom,Int64 min,Int64 maximum)
   {

       //DataTable dt = new DataTable();
       DataSet ds = new DataSet();
       SqlConnection cn;
       dataacc d;
       try
       {
           StringWriter st = new StringWriter();
           cn = new SqlConnection();
           d = new dataacc();
           cn = d.getconnection();
           SqlCommand cmd = new SqlCommand("searching", cn);
           cmd.CommandType = CommandType.StoredProcedure;
           cmd.Parameters.AddWithValue("@city", city);
           cmd.Parameters.AddWithValue("@badroom", badroom);
           cmd.Parameters.AddWithValue("@min", min);
           cmd.Parameters.AddWithValue("@maximum", maximum);
           cn.Open();
           SqlDataAdapter da = new SqlDataAdapter(cmd);
           da.Fill(ds);
           //new
           ds.WriteXml(st);
           cn.Close();
           //string  s= dt.Rows[0][0].ToString();
           return st.ToString();
       }
       catch (Exception ex)
       {
           throw new Exception(ex.Message);
       }
   }
Posted
Updated 29-May-12 19:27pm
v5

1 solution

see these links you may get some idea

Calling Web Service using ASP.NET[^]

ASP.NET Web Service[^]
 
Share this answer
 
Comments
divyesh007 30-May-12 1:30am    
no i want to call this webservice in xcode ..................

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