Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trigger handleFault method in jax-rpc message handler

David Wright
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I've got a set of JAX-RPC document-literal web-services, along with a basic message handler, all running in JBoss. I'm having trouble triggering the handleFault method upon the message handler when an exception is thrown within my web-service code.

I've currently configured things (before adding the handler) so that an XML document (that details the error) is serialized into the SOAPFaultException Detail object that gets generated by JBoss when I throw my custom fault (as defined in the WSDL etc).

I want to manipulate this error document prior to it going back to the client - and so I added a handler. It works fine with handleRequest, but I cannot get it to trigger the handleFault method? Does the exception I throw HAVE to be a SOAPFaultException in order for the handler to trigger (as apposed to my custom exception defined in the WSDL etc)?

What has to be characteristic of the exception thrown in order for the handleFault method on the handler to be triggered?

What I want is for me to throw an exception containing my serialized error XML, which then passed into the handleFault method of the handler. Does anyone have any tips as to how I can do this?

Thanks for your help,
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic