着急快帮帮忙这个问题我一直不能解决
12-25 02:03:46.419: W/System.err(761): org.xmlpull.v1.XmlPullParserException: expected: END_TAG {http://schemas.}Body (position:END_TAG </{http://schemas.}soap:Fault>@1:331 in )package service;
import
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import org.xmlpull.v1.XmlPullParserException;
public class WebServiceDao {
// 名空间
private static final String NAMESPACE = "http://service.
// 网址
private static String URL = "http://192.168.5.119:8080/ihuws/cellocationWs";
// 方法名
private static final String METHOD_NAME = "getCelCommand";
// SOAPACTION
private static String SOAP_ACTION = "http://service.
public String getServiceString(String cs1, String cs2, String cs3) throws IOException, XmlPullParserException {
SoapObject rpc = new SoapObject(NAMESPACE, METHOD_NAME);
rpc.addProperty("opcode","123");
rpc.addProperty("pswd","123");
rpc.addProperty("imsi","123");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.bodyOut = rpc;
envelope.dotNet = true;
envelope.setOutputSoapObject(rpc);
HttpTransportSE ht = new HttpTransportSE(URL);
ht.debug = true;
ht.call(SOAP_ACTION, envelope);
SoapObject detail =(SoapObject) envelope.getResponse();
return detail.toString();
}
}
传参数就报错 不传 就能调用