有没有官方的方法可以在不使用 ksoap 库的情况下从 Android 调用 dot net webservice,官方我的意思是 Android 团队推荐?
问问题
406 次
1 回答
0
String METHOD_NAME = "----------------" // change
String SOAP_ACTION = "---------------"; // change
String NAMESPACE = "----------"
String URL="------------";
SoapObject Request = new SoapObject(NAMESPACE,METHOD_NAME);
Request.addProperty(" "," ");
.
.
.
Object response;
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.encodingStyle = SoapEnvelope.ENC;
envelope.dotNet = true;
envelope.setOutputSoapObject(Request);
HttpTransportSE httptransport = new HttpTransportSE(URL); // HTTP call that URl
httptransport.debug=true;
httptransport.call(SOAP_ACTION,envelope); // change
response = envelope.getResponse();
System.out.println("The response is:\n\n "+response);
String resp=response.toString();
System.out.println(resp);
于 2013-05-29T12:05:29.673 回答