| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| <beans xmlns="http://www.springframework.org/schema/beans" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xmlns:jaxws="http://cxf.apache.org/jaxws" |
| xmlns:test="http://apache.org/hello_world_soap_http" |
| xmlns:cxf="http://camel.apache.org/schema/cxf" |
| xmlns:smx="http://servicemix.apache.org/camelEndpoint/" |
| xmlns:camel="http://camel.apache.org/schema/spring" |
| xsi:schemaLocation=" |
| http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd |
| http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd |
| http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd |
| http://servicemix.apache.org/camelEndpoint/ http://servicemix.apache.org/camelEndpoint/.xsd |
| http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd |
| "> |
| <import resource="classpath:META-INF/cxf/cxf.xml"/> |
| <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> |
| <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml"/> |
| <import resource="classpath:META-INF/cxf/cxf-extension-local.xml" /> |
| |
| <bean class="org.apache.camel.component.cxf.transport.CamelTransportFactory" lazy-init="true"> |
| <property name="bus" ref="cxf"/> |
| <property name="camelContext" ref="camel_context"/> |
| <property name="transportIds"> |
| <list> |
| <value>http://cxf.apache.org/transports/camel</value> |
| </list> |
| </property> |
| </bean> |
| |
| <camel:camelContext id="camel_context"> |
| </camel:camelContext> |
| |
| <cxf:cxfEndpoint id="routerEndpoint" name="test:TimestampSignEncrypt" address="camel://jetty:http://localhost:19000/SOAPServiceWSSecurity/TimestampSignEncrypt" serviceClass="org.apache.hello_world_soap_http.Greeter"> |
| <cxf:features> |
| <bean class="org.apache.cxf.feature.LoggingFeature"/> |
| </cxf:features> |
| <cxf:outInterceptors> |
| <bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/> |
| <ref bean="TimestampSignEncrypt_Response"/> |
| </cxf:outInterceptors> |
| <cxf:inInterceptors> |
| <ref bean="TimestampSignEncrypt_Request"/> |
| <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/> |
| </cxf:inInterceptors> |
| <cxf:properties> |
| <entry key="setDefaultBus" value="true"/> |
| </cxf:properties> |
| </cxf:cxfEndpoint> |
| |
| |
| <cxf:cxfEndpoint id="serviceEndpoint" address="local://smx/hello_world" |
| serviceClass="org.apache.hello_world_soap_http.Greeter"> |
| <cxf:properties> |
| <entry key="setDefaultBus" value="true"/> |
| </cxf:properties> |
| </cxf:cxfEndpoint> |
| |
| |
| <bean |
| class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor" |
| id="TimestampSignEncrypt_Response"> |
| <constructor-arg> |
| <map> |
| <entry key="action" value="Timestamp Signature Encrypt"/> |
| <entry key="user" value="bob"/> |
| <entry key="signaturePropFile" value="org/apache/servicemix/camel/ws/security/bob.properties"/> |
| <entry key="encryptionPropFile" value="org/apache/servicemix/camel/ws/security/alice.properties"/> |
| <entry key="encryptionUser" value="Alice"/> |
| <entry key="signatureKeyIdentifier" value="DirectReference"/> |
| <entry key="passwordCallbackClass" value="org.apache.servicemix.camel.nmr.ws.security.KeystorePasswordCallback"/> |
| <entry key="signatureParts" value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body"/> |
| <!-- --> |
| <!-- Recommendation: signatures should be encrypted --> |
| <!-- --> |
| <entry key="encryptionParts" value="{Element}{http://www.w3.org/2000/09/xmldsig#}Signature;{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body"/> |
| <!-- <entry key="encryptionKeyTransportAlgorithm" value="RSA15"/> --> |
| <entry key="encryptionSymAlgorithm" value="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/> |
| </map> |
| </constructor-arg> |
| </bean> |
| <bean |
| class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor" |
| id="TimestampSignEncrypt_Request"> |
| <constructor-arg> |
| <map> |
| <!-- Use this action order for local clients --> |
| <entry key="action" value="Timestamp Signature Encrypt"/> |
| <!-- Use this action spec for WCF clients |
| <entry key="action" value="Signature Encrypt Timestamp"/> |
| --> |
| <entry key="signaturePropFile" value="org/apache/servicemix/camel/ws/security/alice.properties"/> |
| <entry key="decryptionPropFile" value="org/apache/servicemix/camel/ws/security/bob.properties"/> |
| <entry key="passwordCallbackClass" value="org.apache.servicemix.camel.nmr.ws.security.KeystorePasswordCallback"/> |
| </map> |
| </constructor-arg> |
| </bean> |
| |
| </beans> |