【发布时间】:2012-11-05 03:31:03
【问题描述】:
我创建了一个asp.net服务,代码如下:
namespace ArttechApps
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string getBoughtApps(String imei)
{
return "this is the string to return";// JAVA : SOAP
}
}
}
我需要一个调用此服务的 android 代码。 这是java代码: 公共静态无效连接(字符串网址) {
webServices ws=new webServices("getBoughtApps", "http://tempuri.org/", "http://localhost:12409/getApps.asmx");
ws.AddProperty("imei", "000000000000000", String.class);
String res="";
try
{
SoapObject respuesta = ws.CallWebService();
res=respuesta.toString();
Log.d("Response", res);
} catch (Exception e)
{
e.printStackTrace();
}
result=res;
}
这是安卓的代码。 [已编辑] 有人可以帮我做吗?
【问题讨论】:
标签: android asp.net soap ksoap