<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.E-MailFormatvorlage17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=white lang=DE link=blue vlink=purple>

<div class=Section1>

<div>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>Hi Asankha,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
lang=EN-GB style='font-size:12.0pt'>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.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
lang=EN-GB style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
lang=EN-GB style='font-size:12.0pt'>Regards,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
lang=EN-GB style='font-size:12.0pt'>&nbsp;&nbsp; Eric<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
lang=EN-GB style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
color=black face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 color=black face=Tahoma><span lang=EN-GB
style='font-size:10.0pt;font-family:Tahoma;color:windowtext;font-weight:bold'>From:</span></font></b><font
size=2 color=black face=Tahoma><span lang=EN-GB style='font-size:10.0pt;
font-family:Tahoma;color:windowtext'> esb-java-user-bounces@wso2.org
[mailto:esb-java-user-bounces@wso2.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b>Asankha C. Per</span></font><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:windowtext'>era<br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, May 13, 2008 10:18
AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">esb-java-user@wso2.org</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [esb-java-user]
HTTP-Header, HTTP STATUS</span></font><font color=black><span style='color:
windowtext'><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>Hi Eric<br>
<br>
<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=2 color=black face=Arial><span lang=EN-GB style='font-size:10.0pt;
font-family:Arial'>Is there a possibility to retrieve the whole transport
(HTTP) header inside a custom mediator (not only a specified property via XPath
function)?</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>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<br>
<br>
To get the underlying Axis2 message context from a Synapse message context, you
can do:<br>
<br>
Axis2MessageContext axis2smc = (Axis2MessageContext) synCtx;<br>
org.apache.axis2.context.MessageContext axis2MessageCtx =
axis2smc.getAxis2MessageContext();<br>
<br>
<br>
<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=2 color=black face=Arial><span lang=EN-GB style='font-size:10.0pt;
font-family:Arial'><u1:p></u1:p>How to retrieve the HTTP Status code of a
message response inside a custom mediator?</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>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.<br>
<br>
asankha<o:p></o:p></span></font></p>

</div>

</div>

</body>

</html>