• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Returning response to client from handler

 
Ranch Hand
Posts: 167
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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;

}
 
It's exactly the same and completely different as this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic