我想在我的Android程序中使用Web的CXF webservice设置,是否可以为两者使用相同的Web服务? log msg如下。谁能告诉我这是什么问题?
12-04 08:59:28.432: E/Trace(850): error opening trace file: No such file or directory (2)
12-04 08:59:29.285: E/dalvikvm(850): Could not find class 'org.jida.mns.web.ws.connector.WSConnector', referenced from method com.example.list.MainActivity.onCreate
12-04 08:59:29.332: E/AndroidRuntime(850): FATAL EXCEPTION: main
12-04 08:59:29.332: E/AndroidRuntime(850): java.lang.NoClassDefFoundError: org.cdac.nms.web.ws.connector.WSConnector
12-04 08:59:29.332: E/AndroidRuntime(850): at com.example.list.MainActivity.onCreate(MainActivity.java:49)
12-04 08:59:29.332: E/AndroidRuntime(850): at android.app.Activity.performCreate(Activity.java:5008)
12-04 08:59:29.332: E/AndroidRuntime(850): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
12-04 08:59:29.332: E/AndroidRuntime(850): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
12-04 08:59:29.332: E/AndroidRuntime(850): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
12-04 08:59:29.332: E/AndroidRuntime(850): at android.app.ActivityThread.access$600(ActivityThread.java:130)
12-04 08:59:29.332: E/AndroidRuntime(850): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
12-04 08:59:29.332: E/AndroidRuntime(850): at android.os.Handler.dispatchMessage(Handler.java:99)
12-04 08:59:29.332: E/AndroidRuntime(850): at android.os.Looper.loop(Looper.java:137)
12-04 08:59:29.332: E/AndroidRuntime(850): at android.app.ActivityThread.main(ActivityThread.java:4745)
12-04 08:59:29.332: E/AndroidRuntime(850): at java.lang.reflect.Method.invokeNative(Native Method)
12-04 08:59:29.332: E/AndroidRuntime(850): at java.lang.reflect.Method.invoke(Method.java:511)
12-04 08:59:29.332: E/AndroidRuntime(850): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
12-04 08:59:29.332: E/AndroidRuntime(850): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-04 08:59:29.332: E/AndroidRuntime(850): at dalvik.system.NativeStart.main(Native Method)
答案 0 :(得分:1)
我不能代表您的具体案例或堆栈跟踪。但至于使用cxf在android中构建你的WS客户端,它应该是可能的。
请参阅此项目http://code.google.com/p/android-ws-client/,该项目使用CXF在Android上构建客户端。