我正在调用PHP
使用此代码创建的网络服务
SoapObject request = new SoapObject("getCustomerInfo", "getCustomerInfo");
request.addProperty("user_id", Info.userId);
request.addProperty("authToken", Info.authToken);
request.addProperty("request_id", Integer.toString(CUSTOMERACCOUNTINFO));
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new HttpTransportSE(soapURL);
httpTransport.debug=true;
try {
httpTransport.call(soap, envelope); //Throwing Exception here
System.out.println("dump state "+httpTransport.responseDump);
client.success((Object) envelope.getResponse());
}catch(NumberFormatException e){
e.printStackTrace();
System.out.println(" exception num format");
//client.error("NumberFormatException");
client.error(e.getLocalizedMessage());
}catch(XmlPullParserException xppe){
System.out.println(" exception pullparser");
//client.error("XmlPullParserException");
client.error(xppe.getLocalizedMessage());
}catch(IOException ioe){
System.out.println(" exception io"+ ioe.toString());
//client.error("IOException");
client.error(ioe.getLocalizedMessage());
}
并得到以下错误
12-31 10:52:03.024: W/System.err(2306): java.lang.NumberFormatException: Invalid int: ""
12-31 10:52:03.074: W/System.err(2306): at java.lang.Integer.invalidInt(Integer.java:138)
12-31 10:52:03.104: W/System.err(2306): at java.lang.Integer.parseInt(Integer.java:359)
12-31 10:52:03.124: W/System.err(2306): at java.lang.Integer.parseInt(Integer.java:332)
12-31 10:52:03.134: W/System.err(2306): at org.ksoap2.serialization.DM.readInstance(DM.java:39)
12-31 10:52:03.145: W/System.err(2306): at org.ksoap2.serialization.SoapSerializationEnvelope.readInstance(SoapSerializationEnvelope.java:406)
12-31 10:52:03.155: W/System.err(2306): at org.ksoap2.serialization.SoapSerializationEnvelope.read(SoapSerializationEnvelope.java:364)
12-31 10:52:03.174: W/System.err(2306): at org.ksoap2.serialization.SoapSerializationEnvelope.readUnknown(SoapSerializationEnvelope.java:233)
12-31 10:52:03.184: W/System.err(2306): at org.ksoap2.serialization.SoapSerializationEnvelope.read(SoapSerializationEnvelope.java:366)
12-31 10:52:03.194: W/System.err(2306): at org.ksoap2.serialization.SoapSerializationEnvelope.readVector(SoapSerializationEnvelope.java:287)
12-31 10:52:03.214: W/System.err(2306): at org.ksoap2.serialization.SoapSerializationEnvelope.readInstance(SoapSerializationEnvelope.java:432)
12-31 10:52:03.224: W/System.err(2306): at org.ksoap2.serialization.SoapSerializationEnvelope.read(SoapSerializationEnvelope.java:364)
12-31 10:52:03.234: W/System.err(2306): at org.ksoap2.serialization.SoapSerializationEnvelope.readUnknown(SoapSerializationEnvelope.java:233)
12-31 10:52:03.254: W/System.err(2306): at org.ksoap2.serialization.SoapSerializationEnvelope.read(SoapSerializationEnvelope.java:366)
12-31 10:52:03.264: W/System.err(2306): at org.ksoap2.serialization.SoapSerializationEnvelope.parseBody(SoapSerializationEnvelope.java:121)
12-31 10:52:03.274: W/System.err(2306): at org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:137)
12-31 10:52:03.284: W/System.err(2306): at org.ksoap2.transport.Transport.parseResponse(Transport.java:63)
12-31 10:52:03.294: W/System.err(2306): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:100)
12-31 10:52:03.334: W/System.err(2306): at android.os.AsyncTask$2.call(AsyncTask.java:287)
12-31 10:52:03.344: W/System.err(2306): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
12-31 10:52:03.364: W/System.err(2306): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
12-31 10:52:03.374: W/System.err(2306): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
12-31 10:52:03.384: W/System.err(2306): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
12-31 10:52:03.394: W/System.err(2306): at java.lang.Thread.run(Thread.java:856)