axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manjula Peiris <manj...@wso2.com>
Subject Re: Accessing Services.xml from within a running service?
Date Fri, 17 Oct 2008 03:33:04 GMT

On Thu, 2008-10-16 at 09:15 -0700, Tony Hoyt wrote:
> Okay, I see the fact that I can create an axis2_msg_ctx_t object using the following
function...
>     AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
>     axis2_msg_ctx_create(
>         const axutil_env_t * env,
>         struct axis2_conf_ctx *conf_ctx,
>         struct axis2_transport_in_desc *transport_in_desc,
>         struct axis2_transport_out_desc *transport_out_desc);
> 
> Then get the axis2_svc object...
> 
>     AXIS2_EXTERN struct axis2_svc *AXIS2_CALL
>     axis2_msg_ctx_get_svc(
>         const axis2_msg_ctx_t * msg_ctx,
>         const axutil_env_t * env);
> 
> Then aquire the parameter I want....
> 
>     AXIS2_EXTERN axutil_param_t *AXIS2_CALL
>     axis2_svc_get_param(
>         const axis2_svc_t * svc,
>         const axutil_env_t * env,
>         const axis2_char_t * name);
> 
> And finally extract the value there with this function...
> 
>     AXIS2_EXTERN void *AXIS2_CALL
>     axutil_param_get_value(
>         struct axutil_param *param,
>         const axutil_env_t * env);
> 
> But, I'm a little confused how do I build the axis2_msg_ctx_t object.  It looks like
I need a axis2_conf_ctx object and other information.  But, where does that all come from?
> 

You don't need to create it from your service. It is passed in to your
service invoke method in the service skeleton.



> "Opportunities multiply as they are seized." - Sun Tzu
> 
> 
> --- On Sun, 10/12/08, Supun Kamburugamuva <supun06@gmail.com> wrote:
> 
> > From: Supun Kamburugamuva <supun06@gmail.com>
> > Subject: Re: Accessing Services.xml from within a running service?
> > To: "Apache AXIS C User List" <axis-c-user@ws.apache.org>, gmtonyhoyt@yahoo.com
> > Date: Sunday, October 12, 2008, 12:51 AM
> > Hi Tony,
> > 
> > The values in the services.xml are stored as parameters in
> > the axis2_svc_t.
> > You can fetch the current axis2_svc_t from the msg_ctx_t.
> > Then you can use
> > that to extract the parameters from the services.xml.The
> > custom entries are
> > stored as axutil_param_t in the axis2_svc_t. Please note
> > that you can only
> > put custom entries to the services.xml as
> > "parameter" values.
> > 
> > Supun.
> > 
> > On Fri, Oct 10, 2008 at 12:47 AM, Tony Hoyt
> > <gmtonyhoyt@yahoo.com> wrote:
> > 
> > > I've been toying with Axis2/C lately in an attempt
> > to prototype it for a
> > > possible service but, I've hit a non-critical
> > snag.
> > >
> > > I wish to use the services.xml file to contain some
> > custom parameters, but
> > > I haven't found a way to access that information
> > within a running service.
> > >  I don't wish to load the data manually unless
> > I'm forced to.  I initially
> > > was under the impression I could just ask Axis2 to
> > give me the information.
> > >
> > > Searching the net and nonamely, this mailing list,
> > I've seen at least one
> > > post that pointed towards the following headers
> > >
> > > 1. axis2_svc_ctx.h
> > > 2. axis2_svc.h
> > >
> > > And while they seem to contain the objects I would use
> > to access the data,
> > > new instances of the objects don't seem to
> > natively contain the data.  Can
> > > anyone provide a simple example of how this is
> > supposed to be done?  Thanks.
> > >
> > >  Tony
> > >
> > >
> > > "Opportunities multiply as they are seized."
> > - Sun Tzu
> > >
> > >
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > axis-c-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail:
> > axis-c-user-help@ws.apache.org
> > >
> > >
> > 
> > 
> > -- 
> > Software Engineer, WSO2 Inc
> > http://wso2.org
> 
> 
>       
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message