2个回答
展开全部
使用Ksoup.jar包可以实现webservice的调用
参考代码:
String result = null;
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.bodyOut = soapObject;
String endPoint = 地址后缀//如WebService/AppService.asmx
HttpTransportSE transportSE = new HttpTransportSE(endPoint);
SoapObject object = null;
transportSE.call(地址 + soapObject.getName(),
envelope);
object = (SoapObject) envelope.bodyIn;
result = object.getProperty(0).toString();
参考代码:
String result = null;
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.bodyOut = soapObject;
String endPoint = 地址后缀//如WebService/AppService.asmx
HttpTransportSE transportSE = new HttpTransportSE(endPoint);
SoapObject object = null;
transportSE.call(地址 + soapObject.getName(),
envelope);
object = (SoapObject) envelope.bodyIn;
result = object.getProperty(0).toString();
2013-06-19
展开全部
真正对数据库数据进行操作的都还是webservice,
把android工程看成是网页就可以了,网页向服务器发送请求,然后服务器响应.具体android链接服务器用什么语句,只要你理解了原理,光靠猜也猜到了.
不要忘记android-webservice-mysql之间的关系就可以了.思路要清晰.
URL加载要访问的路径,然后用HttpURLConnection接收url的openConnection,
然后就是各种流包装来包装去,
没了.
把android工程看成是网页就可以了,网页向服务器发送请求,然后服务器响应.具体android链接服务器用什么语句,只要你理解了原理,光靠猜也猜到了.
不要忘记android-webservice-mysql之间的关系就可以了.思路要清晰.
URL加载要访问的路径,然后用HttpURLConnection接收url的openConnection,
然后就是各种流包装来包装去,
没了.
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询