Avatar billede fredand Forsker
07. juli 2015 - 08:37 Der er 2 kommentarer

Exception from client or from server

Hello Guys!

We got two system, A and B. System A calls B with a webservice-request.
And sometimes we get a WebServiceException/NullpointerException.

I hope you could help me understand from where this exception is arised.

javax.xml.ws.WebServiceException: java.lang.NullPointerException
                            at org.jboss.ws.core.jaxws.JAXBDeserializer.handleUnmarshallException(JAXBDeserializer.java:110)
                            at org.jboss.ws.core.jaxws.JAXBDeserializer.deserialize(JAXBDeserializer.java:78)
                            at org.jboss.ws.core.binding.DeserializerSupport.deserialize(DeserializerSupport.java:58)
                            at org.jboss.ws.core.soap.XMLContent.unmarshallObjectContents(XMLContent.java:179)
                            at org.jboss.ws.core.soap.XMLContent.transitionTo(XMLContent.java:96)
                            at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:140)
                            at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElementDoc.java:85)
                            at org.jboss.ws.core.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:172)
                            at org.jboss.ws.core.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:261)
                            at org.jboss.ws.core.EndpointInvocation.getReturnValue(EndpointInvocation.java:195)
                            at org.jboss.ws.core.CommonClient.syncOutputParams(CommonClient.java:503)
                            at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:389)
                            at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:231)
                            at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:162)
                            at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:148)
                            at $Proxy739.getV7Info(Unknown Source)
                            at se.company.system.a.SystemSI.getTheInfo(SystemSI.java:119)

...but from where did it get thrown?
My guess is that when the response get received at system A there is some deserializing taken place inside jboss and all this happens at the client-side. Because there is something wrong with the response, perhaps system B does no validation,

Or could it be thrown from the server, since it says "$Proxy":
...
at $Proxy739.getV7Info(Unknown Source)


Best regards
Fredrik
Avatar billede arne_v Ekspert
07. juli 2015 - 16:40 #1
To me it looks like the client code is throwing the NPE when parsing the XML for the return value.

Suggestions:

1) check that both client stub and server are uptodate and in synch with WSDL

2) check that the class of the return object is robust and can handle missing data
Avatar billede fredand Forsker
08. juli 2015 - 10:26 #2
Thanks alot Arne!

I will take your suggestions to my colleagues in our other system and ask if we could investigate it further!

I will get back with what we find! But I guess it will take some time since it is summer.

Best regards
Fredrik
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester