• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
     
    Ranch Hand
    Posts: 104
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • 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?



  •  
    PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic