| Author |
jax-ws handler causing exception
|
vik ar
Ranch Hand
Joined: Jul 31, 2009
Posts: 104
|
|
Hi I have developed a jax-ws app. When I fire off a SOAP message it goes into the endpoint impl fine. However when I introduce a handler, I fire off the same SOAP and I can debug through the handleMessage() method but after it returns true it throws the exception below. It doesnt go to the endpoint impl and it doesnt go to the handlefault() method. Any ideas?
<faultcode>soapenv:Server</faultcode>
<faultstring>javax.xml.bind.UnmarshalException
- with linked exception:
[java.lang.NullPointerException]</faultstring>
|
 |
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2193
|
|
Hi!
It sounds like you do something wrong in your handler. It is difficult to tell exactly what, since you haven't included the code of the handler.
Below is the code of a JAX-WS handler that logs SOAP messages, showing how a handler can be implemented:
Try to use the above handler with your service and/or client. If you still get an exception, there is something else wrong.
Best wishes!
|
 |
vik ar
Ranch Hand
Joined: Jul 31, 2009
Posts: 104
|
|
I am still getting exception with your handler. I should also mention I am using was7. Exception trace in SystemOut as follows:
|
 |
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2193
|
|
Hi!
Ah, WAS... Sadly(?) I do not have any experience of WAS.
I have only tested my handler with the JAX-WS reference implementation (Metro) in GlassFish.
Best wishes!
|
 |
vik ar
Ranch Hand
Joined: Jul 31, 2009
Posts: 104
|
|
|
Any ideas? LogicalHandler is working fine for me. Just a problem with SOAPHandler
|
 |
vik ar
Ranch Hand
Joined: Jul 31, 2009
Posts: 104
|
|
|
i have found what is causing the exception. one of the elements in my soap has an attribute as follows: <person id="-1"/>. when i remove the attribute the message gets to the endpoint impl fine. Any ideas?
|
 |
 |
|
|
subject: jax-ws handler causing exception
|
|
|