axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Subra Aswathanarayanan" <aswat...@gmail.com>
Subject Re: Setting HTTP headers
Date Fri, 09 Jan 2009 18:49:17 GMT
Thanks Dinesh. I will try ur suggestion and let you know the result.

On Fri, Jan 9, 2009 at 1:32 PM, Dinesh Premalal <xydinesh@gmail.com> wrote:

> Hi, Subra,
>
> "Subra Aswathanarayanan" <aswathsn@gmail.com> writes:
>
> > I just wanted to clarify my question. In a axis2c webservice, when
> responding
> > to the client with a soap response, is there a way one can set a standard
> http
> > header too?
>
> AFAIK, there is no decent method for doing this. I think, in SOAP engine
> point
> of view this is something out of its scope. It would rather a job of
> transport. However you could figure out a way for setting http
> headers. Here is something I did while ago for client side [1]. Hope It
> would work for server side too. I never try it on the server side though.
>
> <snip>
> axis2_http_header_t *axis2_header;
> axutil_property_t *header_property;
> const char *header = (char *) wsclient_options->value;
>
> axis2_header = axis2_http_header_create_by_str (env, header);
> axutil_array_list_add (header_list, env, (void *)axis2_header);
> header_property = axutil_property_create(env);
> if (header_property && header_list)
> {
>    axutil_property_set_value(header_property, env,
>                              header_list);
>    axutil_property_set_free_func (header_property, env,
>                                   axutil_array_list_free_void_arg);
>    axis2_options_set_property(options, env,
> AXIS2_TRANSPORT_HEADER_PROPERTY,
>                               header_property);
> }
> </snip>
>
>
> 1.
> https://wso2.org/svn/browse/wso2/trunk/wsf/c/wsclient/src/stub.c?view=markup
>

Mime
View raw message