[esb-java-user] HTTP-Header, HTTP STATUS
Hubert, Eric
eric.hubert at jamba.net
Tue May 13 01:31:06 PDT 2008
Hi Asankha,
thanks for your reply! Having some possiblity to access the HTTP status
code is unfortunately critical to our environment. We need this to
satisfy our logging requirements, but we can live with any programmatic
way to access this information from a custom mediator.
Regards,
Eric
________________________________
From: esb-java-user-bounces at wso2.org
[mailto:esb-java-user-bounces at wso2.org] On Behalf Of Asankha C. Perera
Sent: Tuesday, May 13, 2008 10:18 AM
To: esb-java-user at wso2.org
Subject: Re: [esb-java-user] HTTP-Header, HTTP STATUS
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/8c1e6e4d/attachment.htm
More information about the Esb-java-user
mailing list