Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Axis 2 web service response throws WstxEOFException: how to catch this exception  RSS feed

 
arpita mukherji
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Axis 2 web service vastly. We have our own validator to validate the input request xml and response back to the user with proper response xml. In case of validation failure the user get the user friendly message in SOAP output.

But we tried to post one empty XML to the web service link. We have received the following error in the response.


We want to make it a proper user friendly response. But the problem is, the error is responded back before it's hitting MessageReceiver class. I believe it's getting the error in transport phase of SOAP message.

  • What I should override to catch this exception ?
  • How to change it to the user friendly error message ?

  • Please help me to find out the solution.
     
    Sujeeth Pakala
    Ranch Hand
    Posts: 104
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Arpita,

    Usually your AXIS web service client will not allow you to sent the message (xml) not compliant to expected request message. However, for your exception. is it normal that your webservice client throws EOF exception because request message is empty.

    Can you also check the server logs? I think it should not have any error.
     
    arpita mukherji
    Greenhorn
    Posts: 4
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi,

    Thank you for your quick response. Here is the log:



  • As it is an Axis Fault, can I catch this exception, overriding the axisServletListner?


  • Can I catch this exception using any handler written in the transport phase?



  •  
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!