File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Soap Handler question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Soap Handler question" Watch "Soap Handler question" New topic
Author

Soap Handler question

Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
Hi All,

I have written a soap handler for a web service I am calling. I have the log level set as fatal for handleFault method. How do I print the request message along with the fault message when a fault happens?

Thanks.

Be Humble... Be Nice.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
What about just logging it and the print that as you choose.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
Bosun Bello wrote:What about just logging it and the print that as you choose.


Hi,

Sorry, I did not understand. Currently I have the code as below. If you look at it, when there is a fault, logToSystemOut2 method is called and the fault (either inbound or outbound) is printed. I want to print the request messsage only if there is a fault. How can I do it?

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12836
    
    5
The problem is that by the time the error is generated, the actual request stream has been consumed by the parser and parser internals are pretty hard to get at.

Right off-hand I know of no way to get it back on the server side. You might use something like SOAPui or TCPMON on the client side to record ALL requests and later figure out which caused the error.

Bill
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
William Brogden wrote:The problem is that by the time the error is generated, the actual request stream has been consumed by the parser and parser internals are pretty hard to get at.

Right off-hand I know of no way to get it back on the server side. You might use something like SOAPui or TCPMON on the client side to record ALL requests and later figure out which caused the error.

Bill



Thanks for replying.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Soap Handler question