Security CXF客户端加密、解密和签名
我已经使用CXF3.0.0开发了Web服务客户端 当我向服务器发送WS-request时,我必须加密头和主体。以下是我的cxf-client.xml配置Security CXF客户端加密、解密和签名,security,cxf,Security,Cxf,我已经使用CXF3.0.0开发了Web服务客户端 当我向服务器发送WS-request时,我必须加密头和主体。以下是我的cxf-client.xml配置 <jaxws:client name="{http://batchtransfer.em.emm.ericsson.com}PushFromBankBindingPort" createdFromAPI="true"> <jaxws:properties> <entry k
<jaxws:client name="{http://batchtransfer.em.emm.ericsson.com}PushFromBankBindingPort" createdFromAPI="true">
<jaxws:properties>
<entry key="ws-security.callback-handler" value="com.ClientKeystorePasswordCallback"/>
<entry key="ws-security.encryption.properties" value="clientKeystore.properties"/>
<entry key="ws-security.signature.properties" value="clientKeystore.properties"/>
<entry key="ws-security.encryption.username" value="myservicekey"/>
</jaxws:properties>
</jaxws:client>
当我试着运行客户端时,我得到一个异常,说
原因:org.apache.cxf.ws.policy.PolicyException:安全
无法检测到配置。潜在原因:确保
jaxws:name属性值与端点端口匹配的客户端元素
以及ws-security.signature.properties元素定义
里面
下面是我的wsdl端口定义
<service name="PushFromBankBindingService">
<port binding="iso:PushFromBankBinding" name="PushFromBankBindingPort">
<soap:address location="http://127.0.0.1:9001/PushFromBankBindingPortImpl"/>
</port>
</service>
我把clientKeystore.properties放在正确的位置,密钥库密码也正确
但我不知道问题出在哪里。请帮助我不熟悉CXF,但为什么不使用SSL?尝试在HTTP层加密而不保护底层传输层充其量只能算是微不足道的。我也在使用SSL,尝试使用两个级别的安全传输级别和消息级别