You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Nair, Anushree" <an...@hp.com> on 2009/02/13 08:54:46 UTC
Values of message context are not persisting
Hello,
In order to support Sessions I added a parameter << axis2_char_t* Session_ID>> in the message context structure described in the file msg_ctx.c and msg_ctx.h.
I also added the corresponding set and get functions to read this parameter.
Now I want to set the Session_ID in Session_In_Handler and read these later in the message receiver.
For doing this, before setting the property I make the msg_ctx keep alive by using the command
status = axis2_msg_ctx_set_keep_alive(msg_ctx, env, 1);
Now when I read the msg_ctx in my message receiver, I am able to read the message context original parameters like axis2_svc_grp_ctx, axis2_svc_grp_ctx_id, etc successfully but
I the parameter that I have added (Session_ID) gives me a garbage value.
Can somebody please instruct me what I am doing wrong. I need some assistance here urgently.
Thanx,
Shivam.
Re: Values of message context are not persisting
Posted by pankaj singh <pa...@gmail.com>.
Hi Anushree,
This is Pankaj Singh. I was facing the exact problem when i was not
allocating the memory for Sesson_ID value.
take the *axis2_char_t* allocate memory for it and assigne it to Session_ID.
*
**
Thanks
Pankaj Singh
2009/2/13 Nair, Anushree <an...@hp.com>
> Hello,
>
>
>
> In order to support Sessions I added a parameter *<< axis2_char_t*
> Session_ID>>* in the message context structure described in the file *msg_ctx.c
> and msg_ctx.h*.
>
>
>
> I also added the corresponding set and get functions to read this
> parameter.
>
>
>
> Now I want to set *the Session_ID* in *Session_In_Handler* and read
> these later in the message receiver.
>
>
>
> For doing this, before setting the property I make the msg_ctx keep alive
> by using the command
>
>
>
> *status = axis2_msg_ctx_set_keep_alive(msg_ctx, env, 1);*
>
>
>
> Now when I read the msg_ctx in my message receiver, I am able to read the
> message context original parameters like *axis2_svc_grp_ctx,
> axis2_svc_grp_ctx_id*, etc successfully but
>
>
>
> I the parameter that I have added (Session_ID) gives me a garbage value.
>
>
>
> Can somebody please instruct me what I am doing wrong. I need some
> assistance here urgently.
>
>
>
> Thanx,
>
> Shivam.
>
>
>
Re: Values of message context are not persisting
Posted by Samisa Abeysinghe <sa...@wso2.com>.
Uthaiyashankar wrote:
> Hi,
>
> Can you provide more details? Are you using simple axis server or
> http? Which version of Axis2/C you are using? Give the code segment
> which is storing and retrieving.
Ideally, please raise a Jira issue with all these info.
Samisa...
Re: Values of message context are not persisting
Posted by Uthaiyashankar <sh...@wso2.com>.
Hi,
Can you provide more details? Are you using simple axis server or http?
Which version of Axis2/C you are using? Give the code segment which is
storing and retrieving.
Regards,
Shankar
On Fri, Feb 13, 2009 at 1:24 PM, Nair, Anushree <an...@hp.com>wrote:
> Hello,
>
>
>
> In order to support Sessions I added a parameter *<< axis2_char_t*
> Session_ID>>* in the message context structure described in the file *msg_ctx.c
> and msg_ctx.h*.
>
>
>
> I also added the corresponding set and get functions to read this
> parameter.
>
>
>
> Now I want to set *the Session_ID* in *Session_In_Handler* and read
> these later in the message receiver.
>
>
>
> For doing this, before setting the property I make the msg_ctx keep alive
> by using the command
>
>
>
> *status = axis2_msg_ctx_set_keep_alive(msg_ctx, env, 1);*
>
>
>
> Now when I read the msg_ctx in my message receiver, I am able to read the
> message context original parameters like *axis2_svc_grp_ctx,
> axis2_svc_grp_ctx_id*, etc successfully but
>
>
>
> I the parameter that I have added (Session_ID) gives me a garbage value.
>
>
>
> Can somebody please instruct me what I am doing wrong. I need some
> assistance here urgently.
>
>
>
> Thanx,
>
> Shivam.
>
>
>
--
S.Uthaiyashankar
Software Architect
WSO2 Inc.
http://wso2.com/ - "The Open Source SOA Company"