You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by heikki <tr...@gmail.com> on 2006/07/18 10:20:29 UTC
[Axis2] How to return response from handler
Hello,
I'm wondering if anyone could point me in the right direction to do the
following :
implementing a (non-SOAP) web service, I have an XSD that describes the
response messages. The case where errors have occurred, either during
validation or during processing in the SEI, are also described by the same
XSD.
Now, I have a Validation Handler that validates the incoming message. If the
message is found to be not valid, I want to create a response object that
conforms to my XSD, and send that back through the ServletResponse directly
from my Validation Handler. So I do NOT want to throw AxisFault or return
any SOAP fault or the like, nor continue to the SEI, but just return some
response message that I create inside the handler.
In a servlet filter this would be trivial, however I don't immediately see
how to do it in Axis2.
I tried looking up ServletResponse using the MessageContext and
HTTPConstants.MC_HTTP_SERVLETRESPONSE, but no such luck (it's null).
Does anyone have an idea how to do this ?
thank you,
Heikki Doeleman