You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Hatim Daginawala <Ha...@argodata.com> on 2008/07/10 22:38:32 UTC

Cannot retrieve http headers in 1.4

Hi All,

 

I am using following calls to retrieve HTTP headers from the response
and axis2_msg_ctx_get_property returns NULL

 

This works in AXIS2/C 1.3 but not in AXIS2/C 1.4, has anything changed? 

 

Any help will be appreciated.

 

Thank you.

 

 

op_client = axis2_svc_client_get_op_client(svc_client, env);

 

msg_ctx = (axis2_msg_ctx_t *) axis2_op_client_get_msg_ctx (op_client,
env, AXIS2_WSDL_MESSAGE_LABEL_OUT);

 

client_property = (axutil_property_t *)axis2_msg_ctx_get_property(
msg_ctx, env, AXIS2_HTTP_CLIENT);

 

client = (axis2_http_client_t *)axutil_property_get_value (
client_property, env);

 

response = axis2_http_client_get_response (client, env);

 

list = axis2_http_simple_response_get_headers (response, env);

 



---------------------------------------------------
Confidentiality Notice:  This electronic mail transmission is confidential, 
may be privileged and should be read or retained only by the intended
recipient.  If you have received this transmission in error, please
immediately notify the sender and delete it from your system.

RE: Cannot retrieve http headers in 1.4

Posted by Hatim Daginawala <Ha...@argodata.com>.
Thanks Supun, I appreciate it.

 

I will give it a go.

 

________________________________

From: Supun Kamburugamuva [mailto:supun06@gmail.com] 
Sent: Wednesday, July 16, 2008 6:14 AM
To: Apache AXIS C User List
Subject: Re: Cannot retrieve http headers in 1.4

 

Hi Hatim,

First sorry for the late reply.

The way that you try to acquire the headers is not supported now.
Instead there is a direct method in message context that give the list
of headers. Your code up to getting the message context is correct. Then
you need to call the method

list = axis2_msg_ctx_get_http_output_headers(msg_ctx, env);

This will give the list of http headers. (axutil_array_list_t containing
pointers to axis2_http_header_t structures)

Regards,
Supun..

On Fri, Jul 11, 2008 at 1:38 AM, Hatim Daginawala
<Ha...@argodata.com> wrote:

Hi All,

 

I am using following calls to retrieve HTTP headers from the response
and axis2_msg_ctx_get_property returns NULL

 

This works in AXIS2/C 1.3 but not in AXIS2/C 1.4, has anything changed? 

 

Any help will be appreciated.

 

Thank you.

 

 

op_client = axis2_svc_client_get_op_client(svc_client, env);

 

msg_ctx = (axis2_msg_ctx_t *) axis2_op_client_get_msg_ctx (op_client,
env, AXIS2_WSDL_MESSAGE_LABEL_OUT);

 

client_property = (axutil_property_t *)axis2_msg_ctx_get_property(
msg_ctx, env, AXIS2_HTTP_CLIENT);

 

client = (axis2_http_client_t *)axutil_property_get_value (
client_property, env);

 

response = axis2_http_client_get_response (client, env);

 

list = axis2_http_simple_response_get_headers (response, env);

 

________________________________

---------------------------------------------------
Confidentiality Notice: This electronic mail transmission is
confidential, 
may be privileged and should be read or retained only by the intended
recipient. If you have received this transmission in error, please
immediately notify the sender and delete it from your system. 

 



---------------------------------------------------
Confidentiality Notice:  This electronic mail transmission is confidential, 
may be privileged and should be read or retained only by the intended
recipient.  If you have received this transmission in error, please
immediately notify the sender and delete it from your system.

RE: Cannot retrieve http headers in 1.4

Posted by Hatim Daginawala <Ha...@argodata.com>.
I tried this approach and it doesn't work with lib-curl. Is there a
different way to get http headers with lib-curl transport?

 

I have also tried with 1.5 with the same results.


Thanks for you help.

 

________________________________

From: Supun Kamburugamuva [mailto:supun06@gmail.com] 
Sent: Wednesday, July 16, 2008 6:14 AM
To: Apache AXIS C User List
Subject: Re: Cannot retrieve http headers in 1.4

 

Hi Hatim,

First sorry for the late reply.

The way that you try to acquire the headers is not supported now.
Instead there is a direct method in message context that give the list
of headers. Your code up to getting the message context is correct. Then
you need to call the method

list = axis2_msg_ctx_get_http_output_headers(msg_ctx, env);

This will give the list of http headers. (axutil_array_list_t containing
pointers to axis2_http_header_t structures)

Regards,
Supun..

On Fri, Jul 11, 2008 at 1:38 AM, Hatim Daginawala
<Ha...@argodata.com> wrote:

Hi All,

 

I am using following calls to retrieve HTTP headers from the response
and axis2_msg_ctx_get_property returns NULL

 

This works in AXIS2/C 1.3 but not in AXIS2/C 1.4, has anything changed? 

 

Any help will be appreciated.

 

Thank you.

 

 

op_client = axis2_svc_client_get_op_client(svc_client, env);

 

msg_ctx = (axis2_msg_ctx_t *) axis2_op_client_get_msg_ctx (op_client,
env, AXIS2_WSDL_MESSAGE_LABEL_OUT);

 

client_property = (axutil_property_t *)axis2_msg_ctx_get_property(
msg_ctx, env, AXIS2_HTTP_CLIENT);

 

client = (axis2_http_client_t *)axutil_property_get_value (
client_property, env);

 

response = axis2_http_client_get_response (client, env);

 

list = axis2_http_simple_response_get_headers (response, env);

 

________________________________

---------------------------------------------------
Confidentiality Notice: This electronic mail transmission is
confidential, 
may be privileged and should be read or retained only by the intended
recipient. If you have received this transmission in error, please
immediately notify the sender and delete it from your system. 

 



---------------------------------------------------
Confidentiality Notice:  This electronic mail transmission is confidential, 
may be privileged and should be read or retained only by the intended
recipient.  If you have received this transmission in error, please
immediately notify the sender and delete it from your system.

Re: Cannot retrieve http headers in 1.4

Posted by Supun Kamburugamuva <su...@gmail.com>.
Hi Hatim,

First sorry for the late reply.

The way that you try to acquire the headers is not supported now. Instead
there is a direct method in message context that give the list of headers.
Your code up to getting the message context is correct. Then you need to
call the method

list = axis2_msg_ctx_get_http_output_headers(msg_ctx, env);

This will give the list of http headers. (axutil_array_list_t containing
pointers to axis2_http_header_t structures)

Regards,
Supun..

On Fri, Jul 11, 2008 at 1:38 AM, Hatim Daginawala <
Hatim.Daginawala@argodata.com> wrote:

>  Hi All,
>
>
>
> I am using following calls to retrieve HTTP headers from the response and
> axis2_msg_ctx_get_property returns NULL
>
>
>
> This works in AXIS2/C 1.3 but not in AXIS2/C 1.4, has anything changed?
>
>
>
> Any help will be appreciated.
>
>
>
> Thank you.
>
>
>
>
>
> op_client = axis2_svc_client_get_op_client(svc_client, env);
>
>
>
> msg_ctx = (axis2_msg_ctx_t *) axis2_op_client_get_msg_ctx (op_client, env,
> AXIS2_WSDL_MESSAGE_LABEL_OUT);
>
>
>
> client_property = (axutil_property_t *)axis2_msg_ctx_get_property( msg_ctx,
> env, AXIS2_HTTP_CLIENT);
>
>
>
> client = (axis2_http_client_t *)axutil_property_get_value (
> client_property, env);
>
>
>
> response = axis2_http_client_get_response (client, env);
>
>
>
> list = axis2_http_simple_response_get_headers (response, env);
>
>
>
> ------------------------------
> ---------------------------------------------------
> Confidentiality Notice: This electronic mail transmission is confidential,
> may be privileged and should be read or retained only by the intended
> recipient. If you have received this transmission in error, please
> immediately notify the sender and delete it from your system.
>