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?
"Opportunities multiply as they are seized." - Sun Tzu
--- On Sun, 10/12/08, Supun Kamburugamuva <[EMAIL PROTECTED]> wrote:
> From: Supun Kamburugamuva <[EMAIL PROTECTED]>
> Subject: Re: Accessing Services.xml from within a running service?
> To: "Apache AXIS C User List" <[email protected]>, [EMAIL PROTECTED]
> 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
> <[EMAIL PROTECTED]> 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:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
>
>
> --
> Software Engineer, WSO2 Inc
> http://wso2.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]