Re: Consume Webservice in java
weetat wrote:
Hi all , I need to call method from webservice that I have created.
The webservice is deployed in jboss 4.0.4 and the webservice is simple
Hello test.
However , when i tried to call method , it gave error below:
I am new in webservice . Anyone have any ideas or suggestion is much
appreciated. Thanks
serialization error: serialization error:
java.lang.NullPointerException
at
com.sun.xml.rpc.encoding.DynamicInternalTypeMappingRegistry.getSerializer(DynamicInternalTypeMappingRegistry.java:
196)
at
com.sun.xml.rpc.encoding.literal.LiteralResponseSerializer.initialize(LiteralResponseSerializer.java:
230)
at
com.sun.xml.rpc.client.dii.BasicCall.createRpcLiteralResponseSerializer(BasicCall.java:
757)
at
com.sun.xml.rpc.client.dii.BasicCall.getResponseDeserializer(BasicCall.java:
690)
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:
486)
at com.test.client.TestWebService.main(TestWebService.java:45)
This is the web service client code:
[snip]
Based on the error it doesn't have anything to do with web services
specifically. This is a basic null pointer exception that can occur
anywhere in Java. What are you doing on line 196 in the
DynamicInternalTypeMappingRegistry.java class? That's where the null
pointer is being referenced. If that isn't your class (since it's in a
package from sun) then you need to trace the source of the null pointer
into one of your classes.....such as line 45 in TestWebService.java.