[英]Configure a common webservice interceptor and usernameTokenValidator compatible with Spring-WS and CXF
Right now I have below configuration for one of my WS endpoints. 现在,我对我的WS端点之一进行了以下配置。
<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) . 现在,我想将此bean =“ myServiceInterceptor”和自定义userNameToken Validator配置(jaxws:properties)移动到单独的jar中(例如A) 。 So that any spring WS using that jar A , can leverage same interceptor and customUseranameToken functionality.
这样,使用该jar A的任何spring WS都可以利用相同的拦截器和customUseranameToken功能。
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! 谢谢!
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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.