axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amila Suriarachchi <amilasuriarach...@gmail.com>
Subject Re: Axis2--How to access custom http headers from axis2 client
Date Sat, 02 Jan 2010 02:27:58 GMT
On Mon, Dec 21, 2009 at 11:22 PM, santhosh kotte <santhoshkotte@yahoo.com>wrote:

> Hi guyz...
>
> I have added my own http headers in the axis service.
>
> MessageContext rmc
> =MessageContext.getCurrentMessageContext().getOperationContext().getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
>       List<Header> headers = new ArrayList();
>       headers.add(new Header("http_header1","value1"));
>       headers.add(new Header("http_header2","value2"));
>       rmc.setProperty(HTTPConstants.HTTP_HEADERS, headers);
>

axis2 sets the transport headers like this.
msgContext.setProperty(MessageContext.TRANSPORT_HEADERS, transportHeaders);

try to get the values back from this property

have a look at here[1] too.

thanks,
Amila.

[1]
http://amilachinthaka.blogspot.com/2008/11/accessing-axis2-information-at-client.html

>
> I could see them through tcpmon in the response .
>
> But I need a way to access these in client code.
>
> Is there a way to do it?
>
> ------------------------------
> The INTERNET now has a personality. YOURS! See your Yahoo! Homepage<http://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/>
> .
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Mime
View raw message