[esb-java-user] HTTP-Header, HTTP STATUS
Asankha C. Perera
asankha at wso2.com
Tue May 13 01:17:44 PDT 2008
Hi Eric
>
> Is there a possibility to retrieve the whole transport (HTTP) header
> inside a custom mediator (not only a specified property via XPath
> function)?
>
Yes, you can receive all the HTTP headers as a Map, from the axis2
message context, by looking up for the property using the key:
[org.apache.axis2.context.]MessageContext.TRANSPORT_HEADERS
To get the underlying Axis2 message context from a Synapse message
context, you can do:
Axis2MessageContext axis2smc = (Axis2MessageContext) synCtx;
org.apache.axis2.context.MessageContext axis2MessageCtx =
axis2smc.getAxis2MessageContext();
> How to retrieve the HTTP Status code of a message response inside a
> custom mediator?
>
Unfortunately, this has not been made available from the HTTP/s
transport, although its trivial to have set it.. Is this critical to
your environment? If yes, we can make this available with a patch, as we
have now officially frozen the Synapse code unless for blockers.
asankha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wso2.org/pipermail/esb-java-user/attachments/20080513/a4139dc9/attachment-0001.htm
More information about the Esb-java-user
mailing list