You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "Paibir, Ajay" <aj...@iona.com> on 2007/04/25 13:03:36 UTC

Configuring coloc as policy/feature.

Dan,

To configure coloc as a policy , a coloc assertion is required.
Now how can the similar thing be done using the feature stuff?
Any system tests which I can have a look at.

Ajay

RE: Configuring coloc as policy/feature.

Posted by "Paibir, Ajay" <aj...@iona.com>.
Thanks Dan,
Got the coloc systest working by adding in the interceptors through
Feature. I will aim for writing a custom  BeanDefinitionParser to get
something like <cxf:EnableColoc/>

Regards
Ajay


-----Original Message-----
From: Dan Diephouse [mailto:dan@envoisolutions.com] 
Sent: 25 April 2007 17:29
To: cxf-dev@incubator.apache.org
Subject: Re: Configuring coloc as policy/feature.

Hi Ajay,

I think the easiest thing would be to just configure a feature. Here's
the simplest feature around, the logging feature

http://fisheye6.cenqua.com/browse/celtixfire/trunk/rt/core/src/main/java
/org/apache/cxf/feature/LoggingFeature.java?r=531126

It just adds interceptors to the client/server. You can also override
initialize(Client, Bus) or initialize(Server, Bus) if you want to
customize those objects specifically instead of just their
InterceptorProvider:

http://fisheye6.cenqua.com/browse/celtixfire/trunk/api/src/main/java/org
/apache/cxf/feature/AbstractFeature.java

You can then plugin this in pretty easily via XML:

<jaxws:client>
  <jaxws:features>
     <bean class="org.apachce.cxf.binding.coloc.ColocFeature"/>
  </jaxws:features>
</jaxws:client>

Or if you're feeling ambitious you could write a BeanDefinitionParser
for it as well to get something like <cxf:coloc/>.

I think the system test that tests the features stuff is called
InlineAddressingPolicyTest. It also includes inline Policy references in
addition to its use of the logging feature.

Cheers,
- Dan

On 4/25/07, Paibir, Ajay <aj...@iona.com> wrote:
>
> Dan,
>
> To configure coloc as a policy , a coloc assertion is required.
> Now how can the similar thing be done using the feature stuff?
> Any system tests which I can have a look at.
>
> Ajay
>



--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Re: Configuring coloc as policy/feature.

Posted by Dan Diephouse <da...@envoisolutions.com>.
Hi Ajay,

I think the easiest thing would be to just configure a feature. Here's the
simplest feature around, the logging feature

http://fisheye6.cenqua.com/browse/celtixfire/trunk/rt/core/src/main/java/org/apache/cxf/feature/LoggingFeature.java?r=531126

It just adds interceptors to the client/server. You can also override
initialize(Client, Bus) or initialize(Server, Bus) if you want to customize
those objects specifically instead of just their InterceptorProvider:

http://fisheye6.cenqua.com/browse/celtixfire/trunk/api/src/main/java/org/apache/cxf/feature/AbstractFeature.java

You can then plugin this in pretty easily via XML:

<jaxws:client>
  <jaxws:features>
     <bean class="org.apachce.cxf.binding.coloc.ColocFeature"/>
  </jaxws:features>
</jaxws:client>

Or if you're feeling ambitious you could write a BeanDefinitionParser for it
as well to get something like <cxf:coloc/>.

I think the system test that tests the features stuff is called
InlineAddressingPolicyTest. It also includes inline Policy references in
addition to its use of the logging feature.

Cheers,
- Dan

On 4/25/07, Paibir, Ajay <aj...@iona.com> wrote:
>
> Dan,
>
> To configure coloc as a policy , a coloc assertion is required.
> Now how can the similar thing be done using the feature stuff?
> Any system tests which I can have a look at.
>
> Ajay
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog