我正在尝试使用ksoap2项目将Android与SOAP连接起来。之前我编写了一些项目,他们的工作正确。
WSDL文件:http://pastebin.com/AjX08eFE
我使用SoapUI检查了它 - 它正在工作。
我的片段Java代码:http://pastebin.com/dQzu9VPM 当然,ksoap2库.jar被添加到项目中。
当我运行app时,我收到消息:
07-01 23:57:29.193: E/MYAPP(7214): SoapFault - faultcode: 'SOAP-ENV:Server' faultstring: 'Procedure 'getNameWithAge' not present' faultactor: 'null' detail: null
07-01 23:57:29.193: E/MYAPP(7214): at org.ksoap2.serialization.SoapSerializationEnvelope.parseBody(SoapSerializationEnvelope.java:137)
07-01 23:57:29.193: E/MYAPP(7214): at org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:140)
07-01 23:57:29.193: E/MYAPP(7214): at org.ksoap2.transport.Transport.parseResponse(Transport.java:129)
07-01 23:57:29.193: E/MYAPP(7214): at org.ksoap2.transport.HttpTransportSE.parseResponse(HttpTransportSE.java:301)
07-01 23:57:29.193: E/MYAPP(7214): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:274)
07-01 23:57:29.193: E/MYAPP(7214): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:118)
07-01 23:57:29.193: E/MYAPP(7214): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:113)
07-01 23:57:29.193: E/MYAPP(7214): at eu.webnitro.nrpdfqrcodescanner.MainActivity$1.onClick(MainActivity.java:135)
07-01 23:57:29.193: E/MYAPP(7214): at android.view.View.performClick(View.java:4781)
07-01 23:57:29.193: E/MYAPP(7214): at android.view.View$PerformClick.run(View.java:19873)
07-01 23:57:29.193: E/MYAPP(7214): at android.os.Handler.handleCallback(Handler.java:739)
07-01 23:57:29.193: E/MYAPP(7214): at android.os.Handler.dispatchMessage(Handler.java:95)
07-01 23:57:29.193: E/MYAPP(7214): at android.os.Looper.loop(Looper.java:135)
07-01 23:57:29.193: E/MYAPP(7214): at android.app.ActivityThread.main(ActivityThread.java:5289)
07-01 23:57:29.193: E/MYAPP(7214): at java.lang.reflect.Method.invoke(Native Method)
07-01 23:57:29.193: E/MYAPP(7214): at java.lang.reflect.Method.invoke(Method.java:372)
07-01 23:57:29.193: E/MYAPP(7214): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
07-01 23:57:29.193: E/MYAPP(7214): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
07-02 00:12:05.433: I/Timeline(7214): Timeline: Activity_idle id: android.os.BinderProxy@1b4ca974 time:3247127
我尝试了各种选项,并收到各种消息。我不知道如何解决它。