Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 83694 invoked from network); 12 Mar 2009 06:10:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Mar 2009 06:10:32 -0000 Received: (qmail 30926 invoked by uid 500); 12 Mar 2009 06:10:31 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 30912 invoked by uid 500); 12 Mar 2009 06:10:31 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 30903 invoked by uid 99); 12 Mar 2009 06:10:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Mar 2009 23:10:30 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [209.191.125.180] (HELO n11c.bullet.mail.mud.yahoo.com) (209.191.125.180) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 12 Mar 2009 06:10:19 +0000 Received: from [68.142.194.243] by n11.bullet.mail.mud.yahoo.com with NNFMP; 12 Mar 2009 06:09:57 -0000 Received: from [68.142.201.251] by t1.bullet.mud.yahoo.com with NNFMP; 12 Mar 2009 06:09:57 -0000 Received: from [127.0.0.1] by omp412.mail.mud.yahoo.com with NNFMP; 12 Mar 2009 06:09:57 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 371747.19206.bm@omp412.mail.mud.yahoo.com Received: (qmail 45712 invoked by uid 60001); 12 Mar 2009 06:09:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1236838196; bh=7zFYa7qLkgeMg5rqU2I4iAAIbzusxOy5l83R1hwUKQg=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=iMCSfTd+poFajCXLjWDsDuZYr6JmBn9kaQhQ3UIftw+SrL/RmIikiIbIsCRxwfxsr2HW2k9EPUi2LylPP/03MZs0CW60XvJ7m7pzaUIcwvs812Ur4vzl0MYTeXDNqOW8WIU/Xt7pC7QsKNwhBaBpGHO9Tvhz4IS/mwDI7CW1fIE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=vm8bm5lZdmedSFgv35YscfyxEnJrJOVglCjZGfgFnIos7dAVeMpEz0Zzc1WavOSi1QigXnDOgJ+Mqt/nXSOz/HhaNe1pdZKfOtOtReKiKJMy+Oar3N5QQfqGAdI7wzXqhhGAWm//FXT3ULixwjCrMrR+ZFAemAgZT5T1eYvk7Fg=; Message-ID: <910788.45439.qm@web46413.mail.sp1.yahoo.com> X-YMail-OSG: C5MLBZkVM1nmebBZuxnYOhiNJNE8QHF3B4B5aVIqRWCqDO1U1cDO60q5oe.CNbZ4UcoZuMqysdAk7OnssJ_OVX7knhZgmG40PG1AcR3qLQa3FSe.du0i10mqlRkqawDTNoGDZL1csOS89ce7dY.xvf5SBIUre6i6akySSNEKv8mK1Y5qmBbQTp1BkOGxHXsMXf3XrfqbQMSsQBmbyms7AOQC49aglvb7DPBMfITAusKrgLFDDJfi2yn_uM34qfVe Received: from [204.50.113.28] by web46413.mail.sp1.yahoo.com via HTTP; Wed, 11 Mar 2009 23:09:56 PDT X-Mailer: YahooMailClassic/5.1.19 YahooMailWebService/0.7.289.1 Date: Wed, 11 Mar 2009 23:09:56 -0700 (PDT) From: Raymond Zhou Subject: Re: How do I know ws-security is enabled programmatically? To: Apache AXIS C User List MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-2087551606-1236838196=:45439" X-Virus-Checked: Checked by ClamAV on apache.org --0-2087551606-1236838196=:45439 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi Supun, =A0 Can you please point me to how I could get axis2_conf_ctx from svc_client? = =A0It doesn't seem possible.=20 =A0 I find out another way though, from axis2_conf.h, you have the following in= terface: =A0 AXIS2_EXTERN axis2_conf_t *AXIS2_CALL axis2_conf_create(const axutil_env_t = * env); =A0 So you can create one axis2_conf_t, then in this same inferface, you have: =A0 AXIS2_EXTERN axis2_bool_t AXIS2_CALL axis2_conf_is_engaged(axis2_conf_t * c= onf, const axutil_env_t * env, const axutil_qname_t * module_name); =A0 You can now figure out if rampart is engaged, is this a right approach? The= drawback is that If service client already create one axis2_conf_t, this w= ay create the same structure twice. =A0 Thanks! Ray --- On Tue, 3/10/09, Supun Kamburugamuva wrote: From: Supun Kamburugamuva Subject: Re: How do I know ws-security is enabled programmatically? To: "Apache AXIS C User List" Date: Tuesday, March 10, 2009, 4:01 AM When you create the svc_client you create the axis2_conf_ctx. This holds al= l the axis2 configurations. You can access the axis2_conf_ctx from svc_clie= nt and you can access the axis2_conf_t from axis2_conf_ctx_t. axis2_conf_t = contains the list of all the engaged modules.=20 Have a look at conf.c file. Supun. On Tue, Mar 10, 2009 at 8:41 AM, Raymond Zhou wrote: Hi Manjula, =A0 Maybe my=A0writing is a bit confusing, my=A0question is not really about se= tting the policy file programmatically, my question is about how I know the= ws-security is enabled=A0=A0programmatically (which means that the rampart= /c module is engaged in axis2/c configuration file). I need to know this be= cause my client code need to support both ws-security enabled and ws-securi= ty disabled (the normal case), so that in the case of no ws-security I don'= t have to read the policy file and set any ws-securit related parameters pr= ogrammatically. =A0 Thanks! Ray --- On Tue, 3/10/09, Manjula Peiris wrote: From: Manjula Peiris Subject: Re: How do I know ws-security is enabled programmatically? To: "Apache AXIS C User List" Date: Tuesday, March 10, 2009, 3:12 AM when you engage rampart there should be a policy to construct the message. Please see Rampart/c samples for more info. On Mon, 2009-03-09 at 00:20 -0700, Raymond Zhou wrote: >=20 > A quick question. I am using rampart/c to provide ws-security for a > web service client application. How do I know ws-security is enabled > programmatically? I understand that in order to use ws-security I need > to do something in the configuration file axis2.xml and I also need to > put rampart/c as a module. But I also need to set the security policy > into the web service client object programmatically, right? Then I > need to know whether or not ws-security is enabled, and if not, I > don't need to set the policy (there is none actually) into the ws > client object.=20 >=20 > Thanks! > Ray >=20 --=20 Software Engineer, WSO2 Inc http://wso2.org supunk.blogspot.com =0A=0A=0A --0-2087551606-1236838196=:45439 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
=0A=0A --0-2087551606-1236838196=:45439--
Hi Supun,
 
Can you please point me to how I could get axis2_conf_ctx from svc_cli= ent?  It doesn't seem possible.
 
I find out another way though, from axis2_conf.h, you have the followi= ng interface:
 
AXIS2_EXTERN axis2_conf_t *AXIS2_CALL axis2_conf_create(const axutil_env_t * env);
 
So you can create one axis2_conf_t, then in this same inferface, you h= ave:
 
AXIS2_EXTERN axis2_bool_t AXIS2_CALL axis2_conf_is_engaged(axis2_conf_= t * conf, const= axutil_env_t * env, const axutil_qname_t * module_name);
 
You can now figure out if rampart is engaged, is this a= right approach? The drawback is that If service client already create one = axis2_conf_t, this way create the same structure twice.
 
Thanks!
Ray


--- On Tue, 3/10/09, Supun Kamburugamuva <supun06@gma= il.com> wrote:

From: Supun Kamburugamuva <supun06@gmail.com&g= t;
Subject: Re: How do I know ws-security is enabled programmatically?To: "Apache AXIS C User List" <axis-c-user@ws.apache.org>
Date: = Tuesday, March 10, 2009, 4:01 AM

When you create the svc_client you create the axis2= _conf_ctx. This holds all the axis2 configurations. You can access the axis= 2_conf_ctx from svc_client and you can access the axis2_conf_t from axis2_c= onf_ctx_t. axis2_conf_t contains the list of all the engaged modules.
<= BR>Have a look at conf.c file.

Supun.

On Tue, Mar 10, 2009 at 8:41 AM, Raymond Zhou <raywang999@yahoo.com> wrote:
Hi Manjula,
 
Maybe my writing is a bit confusing, my question is not real= ly about setting the policy file programmatically, my question is about how= I know the ws-security is enabled  programmatically (which means= that the rampart/c module is engaged in axis2/c configuration file). I nee= d to know this because my client code need to support both ws-security enab= led and ws-security disabled (the normal case), so that in the case of no w= s-security I don't have to read the policy file and set any ws-securit rela= ted parameters programmatically.
 
Thanks!
Ray

--- On Tue, 3/10/09, Manjula Peiris <manjula@wso2.com= > wrote:

From: Manjula Peiris <manjula@wso2.com>
Sub= ject: Re: How do I know ws-security is enabled programmatically?
To: "Ap= ache AXIS C User List" <axis-c-user@ws.apache.org>
= Date: Tuesday, March 10, 2009, 3:12 AM


when you engage rampart there should be a policy to construct the
m= essage. Please see Rampart/c samples for more info.

On Mon, 2009-03-= 09 at 00:20 -0700, Raymond Zhou wrote:
>
> A quick question. I= am using rampart/c to provide ws-security for a
> web service client= application. How do I know ws-security is enabled
> programmatically= ? I understand that in order to use ws-security I need
> to do someth= ing in the configuration file axis2.xml and I also need to
> put ramp= art/c as a module. But I also need to set the security policy
> into = the web service client object programmatically, right? Then I
> need = to know whether or not ws-security is enabled, and if not, I
> don't = need to set the policy (there is none actually) into the ws
> client = object.
>
> Thanks!
> Ray
>





--
Software Engineer, WSO2 Inchttp://wso2.or= g
supunk.blogspot.com