Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用AES加密的CXF-WS-Security_Java_Cxf_Ws Security - Fatal编程技术网

Java 使用AES加密的CXF-WS-Security

Java 使用AES加密的CXF-WS-Security,java,cxf,ws-security,Java,Cxf,Ws Security,我可能会根据以下要求使用CXF框架实现Web服务: 用户名令牌 AES加密 在调用密钥之前,系统可能会将密钥传递给WS。我试图配置如下,但不工作 <bean id="logInBound" class="org.apache.cxf.interceptor.LoggingInInterceptor" /> <bean id="logOutBound" class="org.apache.cxf.interceptor.LoggingOutInterceptor" />

我可能会根据以下要求使用CXF框架实现Web服务:

  • 用户名令牌
  • AES加密
在调用密钥之前,系统可能会将密钥传递给WS。我试图配置如下,但不工作

<bean id="logInBound" class="org.apache.cxf.interceptor.LoggingInInterceptor" />
<bean id="logOutBound" class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
<jaxws:client id="helloClient" serviceClass="com.itiboss.facade.HelloWorld"        address="http://localhost:18080/spring-jpa/ws/HelloWorld">
    <jaxws:properties>
        <entry key="mtom-enabled" value="true"/>
    </jaxws:properties>
    <jaxws:inInterceptors>
        <ref bean="logInBound" />
    </jaxws:inInterceptors>
    <jaxws:outInterceptors>
        <ref bean="logOutBound" />
        <ref bean="outbound-security" />
    </jaxws:outInterceptors>
</jaxws:client>
<!-- WSS4JOutInterceptor for incorporating a UsernameToken in a SOAP --> 
<bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor" id="outbound-security">
    <constructor-arg>
        <map>
            <entry key="action" value="UsernameToken Encrypt"/>  
            <entry key="user" value="dummy"/>  
            <entry key="allowMTOM" value="true"/>  
            <entry key="encryptionSymAlgorithm" value="http://www.w3.org/2001/04/xmlenc#aes256-cbc"/>
            <!--entry key="passwordType" value="PasswordText"/-->                
            <entry key="passwordCallbackClass" value="com.itiboss.facade.ClientPasswordCallback"/>               
        </map>
    </constructor-arg>
</bean>