是否有官方方式从Android调用dot net webservice而不使用ksoap库,官方我的意思是Android团队推荐?
答案 0 :(得分: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);