aspose file tools
The moose likes Web Services and the fly likes How to catch org.apache.axis2.AxisFault on server side Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "How to catch org.apache.axis2.AxisFault on server side" Watch "How to catch org.apache.axis2.AxisFault on server side" New topic
Author

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

Nghia Le
Greenhorn

Joined: Jan 24, 2011
Posts: 2
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.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
Did you try something like this -



Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Nghia Le
Greenhorn

Joined: Jan 24, 2011
Posts: 2
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to catch org.apache.axis2.AxisFault on server side
 
Similar Threads
Signature error while processing message
Getting error on sending chinese text
Exceptions in Web Service consumption
javax.xml.ws.WebServiceException: org.apache.axis2.AxisFault: Transport error: 403 Error: Forbidden
Communicating client interface actions to the server