Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

jax-ws handler causing exception

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am still getting exception with your handler. I should also mention I am using was7. Exception trace in SystemOut as follows:
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any ideas? LogicalHandler is working fine for me. Just a problem with SOAPHandler
 
vik ar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
I have always wanted to have a neighbor just like you - Fred Rogers. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic