如何在Xcode中调用Web服务 [英] how to call webservice in xcode
本文介绍了如何在Xcode中调用Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问题:如何在xcode中调用此 webservice
请尽快帮助我.......................
我在asp.net&中有网络服务
它的名称是 searching.asmx
&我的网址是 http://job-adda.com/searching.asmx
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
[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);
}
}
推荐答案
查看这些链接,您可能会有所了解
使用ASP.NET调用Web服务 [ ASP.NET Web服务 [
see these links you may get some idea
Calling Web Service using ASP.NET[^]
ASP.NET Web Service[^]
这篇关于如何在Xcode中调用Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文