使用CXF STS服务和STS客户端我收到错误
Jul 06, 2014 3:52:02 PM org.apache.cxf.ws.addressing.soap.MAPCodec restoreExchange WARNING: Response message does not contain WS-Addressing properties. Not correlating response.
Jul 06, 2014 3:52:02 PM org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor handleMessage
WARNING: Request does not contain Security header, but it's a fault.
Jul 06, 2014 3:52:03 PM org.apache.cxf.ws.addressing.ContextUtils retrieveMAPs
WARNING: WS-Addressing - failed to retrieve Message Addressing Properties from context
Exception in thread "main" org.apache.cxf.binding.soap.SoapFault: The signature or decryption was invalid
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:84)
我的配置如下
<jaxws:client serviceClass="com.securityintegration.checkservice.servicelayer.SecurityIntegrationLayerPort"
xmlns:tns="http://com/securityintegration/checkservice/servicelayer"
id="securityIntegrationClient"
wsdlLocation="classpath:META-INF/api/checkservice.wsdl"
endpointName="tns:securityIntegrationLayerServiceSOAP"
serviceName="tns:securityIntegrationLayerService"
address="http://localhost:8080/CheckService/services/SecurityIntegrationService">
<!-- KEYSTORE PROPERTIES CLIENT -->
<jaxws:properties>
<entry key="ws-security.sts.client" value-ref="default.sts-client"/>
</jaxws:properties>
<jaxws:inInterceptors>
<bean class="org.apache.cxf.interceptor.LoggingInInterceptor" />
</jaxws:inInterceptors>
<jaxws:outInterceptors>
<bean class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
</jaxws:outInterceptors>
</jaxws:client>
<bean class="org.apache.cxf.ws.security.trust.STSClient"
name="default.sts-client">
<constructor-arg ref="cxf" />
<property name="wsdlLocation" value="http://localhost:8080/StsService/services/STS?wsdl" />
<property name="serviceName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService" />
<property name="endpointName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}STS_Port" />
<property name="properties">
<map>
<entry key="ws-security.username" value="alice" />
<entry key="ws-security.callback-handler" value-ref="keystorePasswordCallback" />
<entry key="ws-security.encryption.properties" value-ref="keystoreProperties" />
<entry key="ws-security.encryption.username" value="${wss.stsKeystoreAlias}" />
</map>
</property>
</bean>
我正在关注https://web-gmazza.rhcloud.com/blog/entry/cxf-sts-tutorial的教程,本地STS WSDL网址http://localhost:8080/StsService/services/STS?wsdl
正常工作。请提出一些意见