2

这是我的日志:

 08-25 15:01:59.184: W/System.err(25671): java.io.IOException: HTTP request failed, HTTP status: 500
08-25 15:01:59.204: W/System.err(25671):    at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:195)
08-25 15:01:59.204: W/System.err(25671):    at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:116)
08-25 15:01:59.204: W/System.err(25671):    at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:111)
08-25 15:01:59.204: W/System.err(25671):    at com.example.utility.SoapInvoke.SoapRequestForGetCardTrackData(SoapInvoke.java:110)
08-25 15:01:59.204: W/System.err(25671):    at com.example.example.Reader$4.onClick(TagReader.java:285)
08-25 15:01:59.204: W/System.err(25671):    at android.view.View.performClick(View.java:4211)
08-25 15:01:59.204: W/System.err(25671):    at android.view.View$PerformClick.run(View.java:17267)
08-25 15:01:59.204: W/System.err(25671):    at android.os.Handler.handleCallback(Handler.java:615)
08-25 15:01:59.204: W/System.err(25671):    at android.os.Handler.dispatchMessage(Handler.java:92)
08-25 15:01:59.204: W/System.err(25671):    at android.os.Looper.loop(Looper.java:137)
08-25 15:01:59.209: W/System.err(25671):    at android.app.ActivityThread.main(ActivityThread.java:4898)
08-25 15:01:59.209: W/System.err(25671):    at java.lang.reflect.Method.invokeNative(Native Method)
08-25 15:01:59.209: W/System.err(25671):    at java.lang.reflect.Method.invoke(Method.java:511)
08-25 15:01:59.209: W/System.err(25671):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
08-25 15:01:59.209: W/System.err(25671):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
08-25 15:01:59.209: W/System.err(25671):    at dalvik.system.NativeStart.main(Native Method)

这是我的代码

    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

    SoapObject subObjeCT = new SoapObject(NAMESPACE, SUB_METHOD);

    request.addSoapObject(subObjeCT);

    subObjeCT.addProperty("arg0", "val");
    subObjeCT.addProperty("arg1", "val");
    subObjeCT.addProperty("arg2", "val");

    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.setOutputSoapObject(request);


    System.out.println("Request soap "+request.toString());

    envelope.dotNet = true;


    try {

    HttpTransportSE httpTransport = new HttpTransportSE(URL);

    httpTransport.call(SOAP_ACTION, envelope);

    SoapObject result = (SoapObject)envelope.bodyIn;

    Log.i("DID I GOT ANY RESULT?", result.toString());

    if(result != null)
        return result;

    } catch (Exception e) {

        e.printStackTrace();
        Log.i("SOAP REQUEST", "ERROR PLEASE DO PROPER CODING :P");

    }

    return null;

我无法弄清楚问题所在。我正在使用 ksoap2-android-assembly-3.0.0-jar-with-dependencies.jar 文件。出于某种原因,我无法共享 wsdl 文件。如果你能用这些数据告诉我解决方案将会很有帮助

4

0 回答 0