Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Returning response to client from handler  RSS feed

 
Kudret Serin
Ranch Hand
Posts: 167
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am developing a web service using Axis2 and have a question about handlers and message flow.
I implemented a handler, and in some cases I would like to give response to client without any further processing.
(throwing an AxisFault with a message would be an option but I do not want to do this because I want to return a specific xml)
(or I do not want to return InvocationResponse.ABORT because it just stops and does not return anything to client)
What is the way of returning response to client without going to MessageReceivers?

Thanks in advance,
Kudret
 
eaton rifles
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this

public InvocationResponse invoke(MessageContext mctx) throws AxisFault
{
...

MessageContext faultContext = AxisEngine.createFaultMessageContext(mctx, new AxisFault( "message to display" );
AxisEngine.sendFault(faultContext);
return InvocationResponse.ABORT;

}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!