0

Right now I have below configuration for one of my WS endpoints.

<jaxws:endpoint id="myService" implementor="#myServiceImpl" address="/myService">
<jaxws:inInterceptors>
  <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />
  <ref bean="myServiceInterceptor"/>
</jaxws:inInterceptors>
 <jaxws:properties>
<entry key="ws-security.ut.validator" value-ref="myServiceUsernameTokenValidator"/>
<jaxws:properties>
</jaxws:endpoint>

 <bean id=" myServiceInterceptor " class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
   <constructor-arg>                              
     <map>
        <entry key="action" value="UsernameToken" />
        <entry key="passwordType" value="PasswordText" />
      </map>          
    </constructor-arg>
</ bean>

Now I want to move this bean="myServiceInterceptor" and custom userNameToken Validator config (jaxws:properties) to a separate jar (say A). So that any spring WS using that jar A , can leverage same interceptor and customUseranameToken functionality.

My questions:

1)  How do I setup/configure a generic webservice security interceptor rather than a cxf specific interceptor.
2)  How can I setup a common <jaxws:properties> that can be used by all the endpoints.

Thanks!

user620339
  • 851
  • 3
  • 20
  • 42

1 Answers1

0

MOST of the stuff could be configured at the Bus level and thus inherited by anything that uses that bus:

<cxf:bus>
   <cxf:inInterceptors>....
   <cxf:properties>....
</cxf:bus>
Daniel Kulp
  • 14,447
  • 4
  • 45
  • 37
  • Based on what you mentioned above, I believe that would work only for CXF based services. Let me put my objective this way: I want a generic Interceptor that can be leveraged by multiple web-services for UsernameToken authentication (be it CXF,Spring-WS or Axis based). – user620339 Dec 05 '11 at 21:15