You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Alexis Midon <mi...@intalio.com> on 2008/10/18 01:14:30 UTC

How to engage a module for a ServiceClient with a service.xml file?

Hi all,

I'm trying to *invoke* a web service that requires some security settings.
So I need to engage Rampart.
I had no particular issues so far but I have one question regarding my
configuration.

Here are the details:
My server may interact with many different external services, using various
settings.
To be DRY, I have one main axis2.xml file that defines all common settings,
and eventually one service.xml per service.

I configure my ServiceClients with both files  with the following code:

                ConfigurationContext configContext = ... // based on the
main axis2.xml file
                InputStream ais = new
File("service.xml").toURI().toURL().openStream();
                ServiceBuilder builder = new ServiceBuilder(ais,
configContext, service);
                builder.populateService(builder.buildOM());

Because Rampart is not required by all the services I interact with, I've
tried to engage it in the service.xml only (see below). In vain.

So my questions are: is there a way to engage a module for  a given service
through a service.xml file? if so what am I missing?

Thanks in advance for your help!

Alexis


<service>
    <module ref="rampart" />

    <parameter name="OutflowSecurity">
      <action>
              ...
      </action>
    </parameter>
</service>

Re: How to engage a module for a ServiceClient with a service.xml file?

Posted by Alexis Midon <mi...@intalio.com>.
Actually, I was wrong. My test case was invalid.
Axis2 does *not* engage the module mentioned in the service.xml when loaded
this way:

                ConfigurationContext configContext = ... // based on the
main axis2.xml file
                InputStream ais = new
File("myservice.xml").toURI().toURL().openStream();
                ServiceBuilder builder = new ServiceBuilder(ais,
configContext, service);
                builder.populateService(builder.buildOM());

The ServiceBuilder will append the module to the list of modules hold by the
AxisService. But then this list is not accessed.
See method org.apache.axis2.description.AxisService#getModules

Any workaround?

Alexis


On Fri, Oct 17, 2008 at 6:31 PM, Alexis Midon <mi...@intalio.com> wrote:

> be lenient please, it's friday evening here ;)
> forget it, it works fine now.
> Thanks a lot for your answer Martin. problem solved.
>
> Alexis
>
>
>
> On Fri, Oct 17, 2008 at 6:20 PM, Martin Gainty <mg...@hotmail.com>wrote:
>
>>  Can anyone translate what the op is saying?..englisch only please!
>> Viel Gluck
>> Martin
>> ______________________________________________
>> Disclaimer and confidentiality note
>> Everything in this e-mail and any attachments relates to the official
>> business of Sender. This transmission is of a confidential nature and Sender
>> does not endorse distribution to any party other than intended recipient.
>> Sender does not necessarily endorse content contained within this
>> transmission.
>>
>>
>> ------------------------------
>> Date: Fri, 17 Oct 2008 18:04:26 -0700
>>
>> From: midon@intalio.com
>> To: axis-user@ws.apache.org
>> Subject: Re: How to engage a module for a ServiceClient with a service.xml
>> file?
>>
>> humm, looks weird to me because the parameter element is taken into
>> account even with no service name.
>> ok. will try with name attribute.
>>
>> Thanks
>>
>> Alexis
>>
>>
>> On Fri, Oct 17, 2008 at 5:39 PM, Martin Gainty <mg...@hotmail.com>wrote:
>>
>>  yes..the service needs the name attribute to be published by axis2
>>
>> Martin
>> ______________________________________________
>> Disclaimer and confidentiality note
>> Everything in this e-mail and any attachments relates to the official
>> business of Sender. This transmission is of a confidential nature and Sender
>> does not endorse distribution to any party other than intended recipient.
>> Sender does not necessarily endorse content contained within this
>> transmission.
>>
>>
>> ------------------------------
>> Date: Fri, 17 Oct 2008 17:21:17 -0700
>> From: midon@intalio.com
>> To: axis-user@ws.apache.org
>> Subject: Re: How to engage a module for a ServiceClient with a service.xml
>> file?
>>
>>
>> the only thinh I'm missing is the name atribute? is that what you mean?
>>
>> Thanks.
>>
>> Alexis
>>
>>
>> On Fri, Oct 17, 2008 at 5:16 PM, Martin Gainty <mg...@hotmail.com>wrote:
>>
>>  ./META-INF/services.xml
>>
>>  <service name="FuBarService">
>>       <module ref="module_name" />
>>
>> Martin
>> ______________________________________________
>> Disclaimer and confidentiality note
>> Everything in this e-mail and any attachments relates to the official
>> business of Sender. This transmission is of a confidential nature and Sender
>> does not endorse distribution to any party other than intended recipient.
>> Sender does not necessarily endorse content contained within this
>> transmission.
>>
>>
>> ------------------------------
>> Date: Fri, 17 Oct 2008 16:14:30 -0700
>> From: midon@intalio.com
>> To: axis-user@ws.apache.org
>> Subject: How to engage a module for a ServiceClient with a service.xml
>> file?
>>
>>
>> Hi all,
>>
>> I'm trying to *invoke* a web service that requires some security settings.
>> So I need to engage Rampart.
>> I had no particular issues so far but I have one question regarding my
>> configuration.
>>
>> Here are the details:
>> My server may interact with many different external services, using
>> various settings.
>> To be DRY, I have one main axis2.xml file that defines all common
>> settings, and eventually one service.xml per service.
>>
>> I configure my ServiceClients with both files  with the following code:
>>
>>                 ConfigurationContext configContext = ... // based on the
>> main axis2.xml file
>>                 InputStream ais = new
>> File("service.xml").toURI().toURL().openStream();
>>                 ServiceBuilder builder = new ServiceBuilder(ais,
>> configContext, service);
>>                 builder.populateService(builder.buildOM());
>>
>> Because Rampart is not required by all the services I interact with, I've
>> tried to engage it in the service.xml only (see below). In vain.
>>
>> So my questions are: is there a way to engage a module for  a given
>> service through a service.xml file? if so what am I missing?
>>
>> Thanks in advance for your help!
>>
>> Alexis
>>
>>
>> <service>
>>     <module ref="rampart" />
>>
>>     <parameter name="OutflowSecurity">
>>       <action>
>>               ...
>>       </action>
>>     </parameter>
>> </service>
>>
>> ------------------------------
>> You live life beyond your PC. So now Windows goes beyond your PC. See how<http://clk.atdmt.com/MRT/go/115298556/direct/01/>
>>
>>
>>
>> ------------------------------
>> You live life beyond your PC. So now Windows goes beyond your PC. See how<http://clk.atdmt.com/MRT/go/115298556/direct/01/>
>>
>>
>>
>> ------------------------------
>> Store, manage and share up to 5GB with Windows Live SkyDrive. Start
>> uploading now<http://skydrive.live.com/welcome.aspx?provision=1?ocid=TXT_TAGLM_WL_skydrive_102008>
>>
>
>

Re: How to engage a module for a ServiceClient with a service.xml file?

Posted by Alexis Midon <mi...@intalio.com>.
Actually, I was wrong. My test case was invalid.
Axis2 does *not* engage the module mentioned in the service.xml when loaded
this way:

                ConfigurationContext configContext = ... // based on the
main axis2.xml file
                InputStream ais = new File("myservice.xml").toURI().
toURL().openStream();
                ServiceBuilder builder = new ServiceBuilder(ais,
configContext, service);
                builder.populateService(builder.buildOM());

The ServiceBuilder will append the module to the list of modules hold by the
AxisService. But then this list is not accessed.
See method org.apache.axis2.description.AxisService#getModules

Any workaround?


Alexis


On Fri, Oct 17, 2008 at 6:31 PM, Alexis Midon <mi...@intalio.com> wrote:

> be lenient please, it's friday evening here ;)
> forget it, it works fine now.
> Thanks a lot for your answer Martin. problem solved.
>
> Alexis
>
>
>
> On Fri, Oct 17, 2008 at 6:20 PM, Martin Gainty <mg...@hotmail.com>wrote:
>
>>  Can anyone translate what the op is saying?..englisch only please!
>> Viel Gluck
>> Martin
>> ______________________________________________
>> Disclaimer and confidentiality note
>> Everything in this e-mail and any attachments relates to the official
>> business of Sender. This transmission is of a confidential nature and Sender
>> does not endorse distribution to any party other than intended recipient.
>> Sender does not necessarily endorse content contained within this
>> transmission.
>>
>>
>> ------------------------------
>> Date: Fri, 17 Oct 2008 18:04:26 -0700
>>
>> From: midon@intalio.com
>> To: axis-user@ws.apache.org
>> Subject: Re: How to engage a module for a ServiceClient with a service.xml
>> file?
>>
>> humm, looks weird to me because the parameter element is taken into
>> account even with no service name.
>> ok. will try with name attribute.
>>
>> Thanks
>>
>> Alexis
>>
>>
>> On Fri, Oct 17, 2008 at 5:39 PM, Martin Gainty <mg...@hotmail.com>wrote:
>>
>>  yes..the service needs the name attribute to be published by axis2
>>
>> Martin
>> ______________________________________________
>> Disclaimer and confidentiality note
>> Everything in this e-mail and any attachments relates to the official
>> business of Sender. This transmission is of a confidential nature and Sender
>> does not endorse distribution to any party other than intended recipient.
>> Sender does not necessarily endorse content contained within this
>> transmission.
>>
>>
>> ------------------------------
>> Date: Fri, 17 Oct 2008 17:21:17 -0700
>> From: midon@intalio.com
>> To: axis-user@ws.apache.org
>> Subject: Re: How to engage a module for a ServiceClient with a service.xml
>> file?
>>
>>
>> the only thinh I'm missing is the name atribute? is that what you mean?
>>
>> Thanks.
>>
>> Alexis
>>
>>
>> On Fri, Oct 17, 2008 at 5:16 PM, Martin Gainty <mg...@hotmail.com>wrote:
>>
>>  ./META-INF/services.xml
>>
>>  <service name="FuBarService">
>>       <module ref="module_name" />
>>
>> Martin
>> ______________________________________________
>> Disclaimer and confidentiality note
>> Everything in this e-mail and any attachments relates to the official
>> business of Sender. This transmission is of a confidential nature and Sender
>> does not endorse distribution to any party other than intended recipient.
>> Sender does not necessarily endorse content contained within this
>> transmission.
>>
>>
>> ------------------------------
>> Date: Fri, 17 Oct 2008 16:14:30 -0700
>> From: midon@intalio.com
>> To: axis-user@ws.apache.org
>> Subject: How to engage a module for a ServiceClient with a service.xml
>> file?
>>
>>
>> Hi all,
>>
>> I'm trying to *invoke* a web service that requires some security settings.
>> So I need to engage Rampart.
>> I had no particular issues so far but I have one question regarding my
>> configuration.
>>
>> Here are the details:
>> My server may interact with many different external services, using
>> various settings.
>> To be DRY, I have one main axis2.xml file that defines all common
>> settings, and eventually one service.xml per service.
>>
>> I configure my ServiceClients with both files  with the following code:
>>
>>                 ConfigurationContext configContext = ... // based on the
>> main axis2.xml file
>>                 InputStream ais = new
>> File("service.xml").toURI().toURL().openStream();
>>                 ServiceBuilder builder = new ServiceBuilder(ais,
>> configContext, service);
>>                 builder.populateService(builder.buildOM());
>>
>> Because Rampart is not required by all the services I interact with, I've
>> tried to engage it in the service.xml only (see below). In vain.
>>
>> So my questions are: is there a way to engage a module for  a given
>> service through a service.xml file? if so what am I missing?
>>
>> Thanks in advance for your help!
>>
>> Alexis
>>
>>
>> <service>
>>     <module ref="rampart" />
>>
>>     <parameter name="OutflowSecurity">
>>       <action>
>>               ...
>>       </action>
>>     </parameter>
>> </service>
>>
>> ------------------------------
>> You live life beyond your PC. So now Windows goes beyond your PC. See how<http://clk.atdmt.com/MRT/go/115298556/direct/01/>
>>
>>
>>
>> ------------------------------
>> You live life beyond your PC. So now Windows goes beyond your PC. See how<http://clk.atdmt.com/MRT/go/115298556/direct/01/>
>>
>>
>>
>> ------------------------------
>> Store, manage and share up to 5GB with Windows Live SkyDrive. Start
>> uploading now<http://skydrive.live.com/welcome.aspx?provision=1?ocid=TXT_TAGLM_WL_skydrive_102008>
>>
>
>

Re: How to engage a module for a ServiceClient with a service.xml file?

Posted by Alexis Midon <mi...@intalio.com>.
be lenient please, it's friday evening here ;)
forget it, it works fine now.
Thanks a lot for your answer Martin. problem solved.

Alexis


On Fri, Oct 17, 2008 at 6:20 PM, Martin Gainty <mg...@hotmail.com> wrote:

>  Can anyone translate what the op is saying?..englisch only please!
> Viel Gluck
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>
> ------------------------------
> Date: Fri, 17 Oct 2008 18:04:26 -0700
>
> From: midon@intalio.com
> To: axis-user@ws.apache.org
> Subject: Re: How to engage a module for a ServiceClient with a service.xml
> file?
>
> humm, looks weird to me because the parameter element is taken into account
> even with no service name.
> ok. will try with name attribute.
>
> Thanks
>
> Alexis
>
>
> On Fri, Oct 17, 2008 at 5:39 PM, Martin Gainty <mg...@hotmail.com>wrote:
>
>  yes..the service needs the name attribute to be published by axis2
>
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>
> ------------------------------
> Date: Fri, 17 Oct 2008 17:21:17 -0700
> From: midon@intalio.com
> To: axis-user@ws.apache.org
> Subject: Re: How to engage a module for a ServiceClient with a service.xml
> file?
>
>
> the only thinh I'm missing is the name atribute? is that what you mean?
>
> Thanks.
>
> Alexis
>
>
> On Fri, Oct 17, 2008 at 5:16 PM, Martin Gainty <mg...@hotmail.com>wrote:
>
>  ./META-INF/services.xml
>
>  <service name="FuBarService">
>       <module ref="module_name" />
>
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>
> ------------------------------
> Date: Fri, 17 Oct 2008 16:14:30 -0700
> From: midon@intalio.com
> To: axis-user@ws.apache.org
> Subject: How to engage a module for a ServiceClient with a service.xml
> file?
>
>
> Hi all,
>
> I'm trying to *invoke* a web service that requires some security settings.
> So I need to engage Rampart.
> I had no particular issues so far but I have one question regarding my
> configuration.
>
> Here are the details:
> My server may interact with many different external services, using various
> settings.
> To be DRY, I have one main axis2.xml file that defines all common settings,
> and eventually one service.xml per service.
>
> I configure my ServiceClients with both files  with the following code:
>
>                 ConfigurationContext configContext = ... // based on the
> main axis2.xml file
>                 InputStream ais = new
> File("service.xml").toURI().toURL().openStream();
>                 ServiceBuilder builder = new ServiceBuilder(ais,
> configContext, service);
>                 builder.populateService(builder.buildOM());
>
> Because Rampart is not required by all the services I interact with, I've
> tried to engage it in the service.xml only (see below). In vain.
>
> So my questions are: is there a way to engage a module for  a given service
> through a service.xml file? if so what am I missing?
>
> Thanks in advance for your help!
>
> Alexis
>
>
> <service>
>     <module ref="rampart" />
>
>     <parameter name="OutflowSecurity">
>       <action>
>               ...
>       </action>
>     </parameter>
> </service>
>
> ------------------------------
> You live life beyond your PC. So now Windows goes beyond your PC. See how<http://clk.atdmt.com/MRT/go/115298556/direct/01/>
>
>
>
> ------------------------------
> You live life beyond your PC. So now Windows goes beyond your PC. See how<http://clk.atdmt.com/MRT/go/115298556/direct/01/>
>
>
>
> ------------------------------
> Store, manage and share up to 5GB with Windows Live SkyDrive. Start
> uploading now<http://skydrive.live.com/welcome.aspx?provision=1?ocid=TXT_TAGLM_WL_skydrive_102008>
>

RE: How to engage a module for a ServiceClient with a service.xml file?

Posted by Martin Gainty <mg...@hotmail.com>.
Can anyone translate what the op is saying?..englisch only please!
Viel Gluck
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


Date: Fri, 17 Oct 2008 18:04:26 -0700
From: midon@intalio.com
To: axis-user@ws.apache.org
Subject: Re: How to engage a module for a ServiceClient with a service.xml file?

humm, looks weird to me because the parameter element is taken into account even with no service name.
ok. will try with name attribute.

Thanks
Alexis



On Fri, Oct 17, 2008 at 5:39 PM, Martin Gainty <mg...@hotmail.com> wrote:






yes..the service needs the name attribute to be published by axis2

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 



Date: Fri, 17 Oct 2008 17:21:17 -0700
From: midon@intalio.com
To: axis-user@ws.apache.org

Subject: Re: How to engage a module for a ServiceClient with a service.xml file?

the only thinh I'm missing is the name atribute? is that what you mean?


Thanks.
Alexis



On Fri, Oct 17, 2008 at 5:16 PM, Martin Gainty <mg...@hotmail.com> wrote:






./META-INF/services.xml

 <service name="FuBarService">
      <module ref="module_name" />

Martin 
______________________________________________ 
Disclaimer and confidentiality note 


Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 




Date: Fri, 17 Oct 2008 16:14:30 -0700
From: midon@intalio.com
To: axis-user@ws.apache.org


Subject: How to engage a module for a ServiceClient with a service.xml file?

Hi all,

I'm trying to *invoke* a web service that requires some security settings. So I need to engage Rampart.


I had no particular issues so far but I have one question regarding my configuration.


Here are the details:
My server may interact with many different external services, using various settings.
To be DRY, I have one main axis2.xml file that defines all common settings, and eventually one service.xml per service.




I configure my ServiceClients with both files  with the following code:

                ConfigurationContext configContext = ... // based on the main axis2.xml file
                InputStream ais = new File("service.xml").toURI().toURL().openStream();



                ServiceBuilder builder = new ServiceBuilder(ais, configContext, service);
                builder.populateService(builder.buildOM());
Because Rampart is not required by all the services I interact with, I've tried to engage it in the service.xml only (see below). In vain.




So my questions are: is there a way to engage a module for  a given service through a service.xml file? if so what am I missing?

Thanks in advance for your help!

Alexis


<service>
    <module ref="rampart" />



    
    <parameter name="OutflowSecurity">
      <action>
              ...
      </action>
    </parameter>
</service>



You live life beyond your PC. So now Windows goes beyond your PC. See how



You live life beyond your PC. So now Windows goes beyond your PC. See how



_________________________________________________________________
Store, manage and share up to 5GB with Windows Live SkyDrive.
http://skydrive.live.com/welcome.aspx?provision=1?ocid=TXT_TAGLM_WL_skydrive_102008

Re: How to engage a module for a ServiceClient with a service.xml file?

Posted by Alexis Midon <mi...@intalio.com>.
humm, looks weird to me because the parameter element is taken into account
even with no service name.
ok. will try with name attribute.

Thanks

Alexis


On Fri, Oct 17, 2008 at 5:39 PM, Martin Gainty <mg...@hotmail.com> wrote:

>  yes..the service needs the name attribute to be published by axis2
>
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>
> ------------------------------
> Date: Fri, 17 Oct 2008 17:21:17 -0700
> From: midon@intalio.com
> To: axis-user@ws.apache.org
> Subject: Re: How to engage a module for a ServiceClient with a service.xml
> file?
>
>
> the only thinh I'm missing is the name atribute? is that what you mean?
>
> Thanks.
>
> Alexis
>
>
> On Fri, Oct 17, 2008 at 5:16 PM, Martin Gainty <mg...@hotmail.com>wrote:
>
>  ./META-INF/services.xml
>
>  <service name="FuBarService">
>       <module ref="module_name" />
>
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>
> ------------------------------
> Date: Fri, 17 Oct 2008 16:14:30 -0700
> From: midon@intalio.com
> To: axis-user@ws.apache.org
> Subject: How to engage a module for a ServiceClient with a service.xml
> file?
>
>
> Hi all,
>
> I'm trying to *invoke* a web service that requires some security settings.
> So I need to engage Rampart.
> I had no particular issues so far but I have one question regarding my
> configuration.
>
> Here are the details:
> My server may interact with many different external services, using various
> settings.
> To be DRY, I have one main axis2.xml file that defines all common settings,
> and eventually one service.xml per service.
>
> I configure my ServiceClients with both files  with the following code:
>
>                 ConfigurationContext configContext = ... // based on the
> main axis2.xml file
>                 InputStream ais = new
> File("service.xml").toURI().toURL().openStream();
>                 ServiceBuilder builder = new ServiceBuilder(ais,
> configContext, service);
>                 builder.populateService(builder.buildOM());
>
> Because Rampart is not required by all the services I interact with, I've
> tried to engage it in the service.xml only (see below). In vain.
>
> So my questions are: is there a way to engage a module for  a given service
> through a service.xml file? if so what am I missing?
>
> Thanks in advance for your help!
>
> Alexis
>
>
> <service>
>     <module ref="rampart" />
>
>     <parameter name="OutflowSecurity">
>       <action>
>               ...
>       </action>
>     </parameter>
> </service>
>
> ------------------------------
> You live life beyond your PC. So now Windows goes beyond your PC. See how<http://clk.atdmt.com/MRT/go/115298556/direct/01/>
>
>
>
> ------------------------------
> You live life beyond your PC. So now Windows goes beyond your PC. See how<http://clk.atdmt.com/MRT/go/115298556/direct/01/>
>

RE: How to engage a module for a ServiceClient with a service.xml file?

Posted by Martin Gainty <mg...@hotmail.com>.
yes..the service needs the name attribute to be published by axis2

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


Date: Fri, 17 Oct 2008 17:21:17 -0700
From: midon@intalio.com
To: axis-user@ws.apache.org
Subject: Re: How to engage a module for a ServiceClient with a service.xml file?

the only thinh I'm missing is the name atribute? is that what you mean?

Thanks.
Alexis



On Fri, Oct 17, 2008 at 5:16 PM, Martin Gainty <mg...@hotmail.com> wrote:






./META-INF/services.xml

 <service name="FuBarService">
      <module ref="module_name" />

Martin 
______________________________________________ 
Disclaimer and confidentiality note 

Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 



Date: Fri, 17 Oct 2008 16:14:30 -0700
From: midon@intalio.com
To: axis-user@ws.apache.org

Subject: How to engage a module for a ServiceClient with a service.xml file?

Hi all,

I'm trying to *invoke* a web service that requires some security settings. So I need to engage Rampart.

I had no particular issues so far but I have one question regarding my configuration.


Here are the details:
My server may interact with many different external services, using various settings.
To be DRY, I have one main axis2.xml file that defines all common settings, and eventually one service.xml per service.



I configure my ServiceClients with both files  with the following code:

                ConfigurationContext configContext = ... // based on the main axis2.xml file
                InputStream ais = new File("service.xml").toURI().toURL().openStream();


                ServiceBuilder builder = new ServiceBuilder(ais, configContext, service);
                builder.populateService(builder.buildOM());
Because Rampart is not required by all the services I interact with, I've tried to engage it in the service.xml only (see below). In vain.



So my questions are: is there a way to engage a module for  a given service through a service.xml file? if so what am I missing?

Thanks in advance for your help!

Alexis


<service>
    <module ref="rampart" />


    
    <parameter name="OutflowSecurity">
      <action>
              ...
      </action>
    </parameter>
</service>



You live life beyond your PC. So now Windows goes beyond your PC. See how



_________________________________________________________________
You live life beyond your PC. So now Windows goes beyond your PC.
http://clk.atdmt.com/MRT/go/115298556/direct/01/

Re: How to engage a module for a ServiceClient with a service.xml file?

Posted by Alexis Midon <mi...@intalio.com>.
the only thinh I'm missing is the name atribute? is that what you mean?

Thanks.

Alexis


On Fri, Oct 17, 2008 at 5:16 PM, Martin Gainty <mg...@hotmail.com> wrote:

>  ./META-INF/services.xml
>
>  <service name="FuBarService">
>       <module ref="module_name" />
>
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>
> ------------------------------
> Date: Fri, 17 Oct 2008 16:14:30 -0700
> From: midon@intalio.com
> To: axis-user@ws.apache.org
> Subject: How to engage a module for a ServiceClient with a service.xml
> file?
>
>
> Hi all,
>
> I'm trying to *invoke* a web service that requires some security settings.
> So I need to engage Rampart.
> I had no particular issues so far but I have one question regarding my
> configuration.
>
> Here are the details:
> My server may interact with many different external services, using various
> settings.
> To be DRY, I have one main axis2.xml file that defines all common settings,
> and eventually one service.xml per service.
>
> I configure my ServiceClients with both files  with the following code:
>
>                 ConfigurationContext configContext = ... // based on the
> main axis2.xml file
>                 InputStream ais = new
> File("service.xml").toURI().toURL().openStream();
>                 ServiceBuilder builder = new ServiceBuilder(ais,
> configContext, service);
>                 builder.populateService(builder.buildOM());
>
> Because Rampart is not required by all the services I interact with, I've
> tried to engage it in the service.xml only (see below). In vain.
>
> So my questions are: is there a way to engage a module for  a given service
> through a service.xml file? if so what am I missing?
>
> Thanks in advance for your help!
>
> Alexis
>
>
> <service>
>     <module ref="rampart" />
>
>     <parameter name="OutflowSecurity">
>       <action>
>               ...
>       </action>
>     </parameter>
> </service>
>
> ------------------------------
> You live life beyond your PC. So now Windows goes beyond your PC. See how<http://clk.atdmt.com/MRT/go/115298556/direct/01/>
>

RE: How to engage a module for a ServiceClient with a service.xml file?

Posted by Martin Gainty <mg...@hotmail.com>.
./META-INF/services.xml

 <service name="FuBarService">
      <module ref="module_name" />

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


Date: Fri, 17 Oct 2008 16:14:30 -0700
From: midon@intalio.com
To: axis-user@ws.apache.org
Subject: How to engage a module for a ServiceClient with a service.xml file?

Hi all,

I'm trying to *invoke* a web service that requires some security settings. So I need to engage Rampart.
I had no particular issues so far but I have one question regarding my configuration.


Here are the details:
My server may interact with many different external services, using various settings.
To be DRY, I have one main axis2.xml file that defines all common settings, and eventually one service.xml per service.


I configure my ServiceClients with both files  with the following code:

                ConfigurationContext configContext = ... // based on the main axis2.xml file
                InputStream ais = new File("service.xml").toURI().toURL().openStream();

                ServiceBuilder builder = new ServiceBuilder(ais, configContext, service);
                builder.populateService(builder.buildOM());
Because Rampart is not required by all the services I interact with, I've tried to engage it in the service.xml only (see below). In vain.


So my questions are: is there a way to engage a module for  a given service through a service.xml file? if so what am I missing?

Thanks in advance for your help!

Alexis


<service>
    <module ref="rampart" />

    
    <parameter name="OutflowSecurity">
      <action>
              ...
      </action>
    </parameter>
</service>



_________________________________________________________________
You live life beyond your PC. So now Windows goes beyond your PC.
http://clk.atdmt.com/MRT/go/115298556/direct/01/