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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Asankha C. Perera
Sent: Tuesday, May 13, 2008 10:18 AM
To: [email protected]
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

_______________________________________________
Esb-java-user mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-user

Reply via email to