• 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

How to catch org.apache.axis2.AxisFault on server side

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I used the top-down approach to generate Web Services using Eclipse. In the skeleton code, I need to be able to detect response status to the client request. I don't know how to do this. e.g, if response to client is successful, update client record on the server side. If response failed, do nothing. How can I detect Socket exception passed down from HttpServlet to org.apache.axis2. Thank you.
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you try something like this -

 
Nghia Le
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I should have been more specific on my question. The invokeBusinessLogic method in the generated MessageReceiverInputOutput class is called by the axis library. The invokeBusinessLogic method calls the method in the generated Skeleton class. Everything is fined in the return from the Skeleton method and invokeBusinessLogic. The problem is when axis returns the response back to the HTTPServlet and the servlet detects SoketIO error. I tried putting the following code in the finally block of the invokeBusinessLogic but it is not working. I am looking for something almost like a callback to detect response to the client and then perform action based on the status of the response to the client.

finally{
if(newMsgContext.isFault()){
//Any update to database or sending msg, only if there is no fault then perform opertion System.out.println("Fault detected in SOAP response");
}

Thank you so much for your time.
reply
    Bookmark Topic Watch Topic
  • New Topic