当出现 ClassCastException "Interceptor has thrown exception, unwinding now",并且出现在访问类implements CallbackHandler接口的时候,主要问题是
WSS4J的配置写错导致的,通常是passwordCallbackRef这个KEY 写错导致!
<bean id="wss4jInInterceptor" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
<constructor-arg>
<map>
<entry key="action" value="UsernameToken" />
<entry key="passwordType" value="PasswordText" />
<entry key="passwordCallbackRef">
<ref bean="wsServerAuthHandler" />
</entry>
</map>
</constructor-arg>
</bean>
client端的配置:
<bean id="helloClient" class="com.cigna.cmc.test.service.HelloWorld"
factory-bean="helloClientFactory" factory-method="create" />
<bean id="helloClientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
<property name="serviceClass" value="com.cigna.cmc.test.service.HelloWorld" />
<property name="address"
value="http://localhost:8080/CFXDemoServer/HelloWorld" />
<property name="outInterceptors">
<list>
<bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" />
<ref bean="wss4jOutConfiguration" />
</list>
</property>
</bean>
<bean id="wss4jOutConfiguration" class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
<property name="properties">
<map>
<entry key="action" value="UsernameToken" />
<entry key="user" value="fisher" />
<entry key="passwordType" value="PasswordText" />
<entry>
<key>
<value>passwordCallbackRef</value>
</key>
<ref bean="passwordCallback" />
</entry>
</map>
</property>
</bean>
分享到:
相关推荐
postman interceptor
Postman-Interceptor下载
InterCeptor
详细介绍struts2 interceptor
通过代理和反射实现一个Interceptor框架
Struts2拦截器(Interceptor) Struts2拦截器(Interceptor)
包含postman的chrome插件,postman-interceptor插件,离线安装,即可使用
postman 和 postman interceptor。亲测可用,里边有说明博客
logging-interceptor-3.14.4的jar包,用于okhttp网络拦截器
免费Postman和Postman interceptor压缩包,Postman为文件夹,直接选择扩展程序中的 加载已解压的扩展程序 ,选择解压后的postman文件夹即可,postman-interceptor为crx文件,直接拖入到chrome://extensions/中即可
Postman-Interceptor_v0.2.20 .Postman Interceptor必须和Postman联合使用。
postman-interceptor插件作为 postman插件的辅助插件,可以共享浏览器的session
一个用于修改 ajax 请求响应的 chrome 扩展,修改ajax请求数据
postman以及interceptor,离线安装。。。。。。。。。。
postman+postman interceptor插件,下载后修改文件后缀为.zip,然后离线加载就可以了
STRUTS2:拦截器Interceptor
利用反射和动态代理机制实现自定义拦截器Interceptor http://blog.csdn.net/alanchen520/article/details/34087833
Interceptor.zip
web调试最好用的插件,带匹配的interceptor插件,且有验证可用的安装文档
Postman是chrome的一款插件,用于做接口请求测试,无论是前端,后台还是测试人员,都可以用postman来测试接口,用起来非常方便。希望可以对你有所帮助。