careldegoede / android-ws-client

Automatically exported from code.google.com/p/android-ws-client
0 stars 0 forks source link

java.lang.NullPointerException #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Generate the stub classes using this tool.
2. Send a call to web method.

What is the expected output? What do you see instead?
Call fails with exception:

W/System.err(  832): java.lang.NullPointerException
W/System.err(  832):    at 
org.jinouts.ws.WSInvocationHandler.getWrapperResultName(WSInvocationHandler.java
:109)
W/System.err(  832):    at 
org.jinouts.ws.WSInvocationHandler.invoke(WSInvocationHandler.java:95)
W/System.err(  832):    at $Proxy0.lookupCityState(Native Method)
W/System.err(  832):    at 
com.tmobile.webservice.RequestTask.sendRequest(RequestTask.java:67)
W/System.err(  832):    at 
com.tmobile.webservice.RequestTask.doInBackground(RequestTask.java:35)
W/System.err(  832):    at 
com.tmobile.webservice.RequestTask.doInBackground(RequestTask.java:1)
W/System.err(  832):    at android.os.AsyncTask$2.call(AsyncTask.java:264)
W/System.err(  832):    at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
W/System.err(  832):    at 
java.util.concurrent.FutureTask.run(FutureTask.java:137)
W/System.err(  832):    at 
android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
W/System.err(  832):    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/System.err(  832):    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W/System.err(  832):    at java.lang.Thread.run(Thread.java:856)

What version of the product are you using? On what operating system?
Product version: androidWSClientGenDist-1.2.0 & apache-cxf-2.6.1
Running on emulator (android ver 4.0) on mac  
10.6.6
(NOTE: Stubs are generated on windows machine)

Please provide any additional information below.

Original issue reported on code.google.com by grv...@gmail.com on 23 Jul 2012 at 10:23

GoogleCodeExporter commented 8 years ago
Found out the reason, the generated code was missing annotation 
"@ResponseWrapper(....)", after adding code started working. Seems to be bug in 
the library.

Original comment by grv...@gmail.com on 1 Aug 2012 at 6:37

GoogleCodeExporter commented 8 years ago
Hi, can you please be more specific about how to correct this issue? I am 
experiencing the very same problem. Thanks!

Original comment by micamo...@gmail.com on 2 Oct 2012 at 3:35

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
In your public 'interface XXX_PortType', there would be a interface method. In 
my example below is 'my_method'.
There are two classes. One is ObjectRequest, the other is ResponseType. They 
are the wrappers. In my case, I had to put the full package name of the class 
rather than the simple class name.

public interface blahblah_PortType{

    @WebResult(name = "RegistryResponse", targetNamespace = "xx", partName = "body")
    @Action(input = "some_input", output = "some_output")
    @WebMethod(operationName = "a_operation", action = "an_action")
    @Generated(comments ="", value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = "2013-07-21T18:27:35.651+09:00")
    @RequestWrapper(className = "your.package.name.ObjectsRequest")
    @ResponseWrapper(className = "your.package.name.ResponseType")
    public ResponseType 
    my_method(
        @WebParam(partName = "body", name = "ObjectsRequest", targetNamespace = "xx") ObjectsRequest body);
...
...
...

Original comment by ejoo...@irm.kr on 23 Aug 2013 at 3:30