| <?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:cxf="http://camel.apache.org/schema/cxf" |
| xmlns:util="http://www.springframework.org/schema/util" |
| xsi:schemaLocation=" |
| http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd |
| http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd |
| http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd |
| http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd |
| "> |
| |
| <cxf:cxfEndpoint id="routerRelayEndpoint" |
| address="http://localhost:9000/HeaderService/" |
| serviceClass="org.apache.camel.component.cxf.soap.headers.HeaderTester" |
| endpointName="tns:SoapPortRelay" |
| serviceName="tns:HeaderService" |
| wsdlURL="soap_header.wsdl" |
| xmlns:tns="http://apache.org/camel/component/cxf/soap/headers"> |
| </cxf:cxfEndpoint> |
| |
| <cxf:cxfEndpoint id="routerRelayEndpointWithInsertion" |
| address="http://localhost:5000/HeaderService/" |
| serviceClass="org.apache.camel.component.cxf.soap.headers.HeaderTester" |
| endpointName="tns:SoapPortRelayWithInsertion" |
| serviceName="tns:HeaderService" |
| wsdlURL="soap_header.wsdl" |
| xmlns:tns="http://apache.org/camel/component/cxf/soap/headers"> |
| <cxf:inInterceptors> |
| <ref bean="logInbound"/> |
| </cxf:inInterceptors> |
| <cxf:outInterceptors> |
| <ref bean="logOutbound"/> |
| </cxf:outInterceptors> |
| </cxf:cxfEndpoint> |
| |
| <cxf:cxfEndpoint id="routerNoRelayEndpoint" |
| address="http://localhost:7000/HeaderService" |
| serviceClass="org.apache.camel.component.cxf.soap.headers.HeaderTester" |
| endpointName="tns:SoapPortNoRelay" |
| serviceName="tns:HeaderService" |
| wsdlURL="soap_header.wsdl" |
| xmlns:tns="http://apache.org/camel/component/cxf/soap/headers"> |
| <cxf:properties> |
| <!-- Set dataFormat to PAYLOAD so in-band message headers are dropped as well --> |
| <entry key="dataFormat" value="PAYLOAD"/> |
| </cxf:properties> |
| </cxf:cxfEndpoint> |
| |
| <cxf:cxfEndpoint id="routerNoRelayNoServiceClassEndpoint" |
| address="http://localhost:7002/HeaderService" |
| endpointName="tns:SoapPortNoRelay" |
| serviceName="tns:HeaderService" |
| wsdlURL="soap_header.wsdl" |
| xmlns:tns="http://apache.org/camel/component/cxf/soap/headers"> |
| <cxf:properties> |
| <entry key="dataFormat" value="PAYLOAD"/> |
| </cxf:properties> |
| </cxf:cxfEndpoint> |
| |
| <cxf:cxfEndpoint id="serviceRelayEndpoint" |
| address="http://localhost:9091/HeaderService/" |
| serviceClass="org.apache.camel.component.cxf.soap.headers.HeaderTester" |
| endpointName="tns:SoapPortRelay" |
| serviceName="tns:HeaderService" |
| wsdlURL="soap_header.wsdl" |
| xmlns:tns="http://apache.org/camel/component/cxf/soap/headers"> |
| </cxf:cxfEndpoint> |
| |
| <cxf:cxfEndpoint id="serviceRelayEndpointWithInsertion" |
| address="http://localhost:5091/HeaderService/" |
| serviceClass="org.apache.camel.component.cxf.soap.headers.HeaderTester" |
| endpointName="tns:SoapPortRelayWithInsertion" |
| serviceName="tns:HeaderService" |
| wsdlURL="soap_header.wsdl" |
| xmlns:tns="http://apache.org/camel/component/cxf/soap/headers"> |
| <cxf:inInterceptors> |
| <ref bean="logInbound"/> |
| </cxf:inInterceptors> |
| <cxf:outInterceptors> |
| <ref bean="logOutbound"/> |
| </cxf:outInterceptors> |
| </cxf:cxfEndpoint> |
| |
| <cxf:cxfEndpoint id="serviceNoRelayEndpoint" |
| address="http://localhost:7070/HeaderService/" |
| serviceClass="org.apache.camel.component.cxf.soap.headers.HeaderTester" |
| endpointName="tns:SoapPortNoRelay" |
| serviceName="tns:HeaderService" |
| wsdlURL="soap_header.wsdl" |
| xmlns:tns="http://apache.org/camel/component/cxf/soap/headers"> |
| <cxf:properties> |
| <!-- Set dataFormat to PAYLOAD so in-band message headers are dropped as well --> |
| <entry key="dataFormat" value="PAYLOAD"/> |
| </cxf:properties> |
| </cxf:cxfEndpoint> |
| |
| <cxf:cxfEndpoint id="serviceNoRelayNoServiceClassEndpoint" |
| address="http://localhost:7070/HeaderService/" |
| endpointName="tns:SoapPortNoRelay" |
| serviceName="tns:HeaderService" |
| wsdlURL="soap_header.wsdl" |
| xmlns:tns="http://apache.org/camel/component/cxf/soap/headers"> |
| <cxf:properties> |
| <entry key="dataFormat" value="PAYLOAD"/> |
| </cxf:properties> |
| </cxf:cxfEndpoint> |
| |
| <cxf:cxfEndpoint id="serviceExtraRelays" |
| address="http://localhost:6060/HeaderService/" |
| serviceClass="org.apache.camel.component.cxf.soap.headers.HeaderTester" |
| endpointName="tns:SoapPortCustomRelay" |
| serviceName="tns:HeaderService" |
| wsdlURL="soap_header.wsdl" |
| xmlns:tns="http://apache.org/camel/component/cxf/soap/headers"> |
| </cxf:cxfEndpoint> |
| |
| |
| <!-- START SNIPPET: dropAllMessageHeadersStrategy --> |
| <bean id="dropAllMessageHeadersStrategy" class="org.apache.camel.component.cxf.common.header.CxfHeaderFilterStrategy"> |
| |
| <!-- Set relayHeaders to false to drop all SOAP headers --> |
| <property name="relayHeaders" value="false"/> |
| |
| </bean> |
| <!-- END SNIPPET: dropAllMessageHeadersStrategy --> |
| |
| <!-- START SNIPPET: customMessageFilterStrategy --> |
| <bean id="customMessageFilterStrategy" class="org.apache.camel.component.cxf.common.header.CxfHeaderFilterStrategy"> |
| <property name="messageHeaderFilters"> |
| <list> |
| <!-- SoapMessageHeaderFilter is the built in filter. It can be removed by omitting it. --> |
| <bean class="org.apache.camel.component.cxf.common.header.SoapMessageHeaderFilter"/> |
| |
| <!-- Add custom filter here --> |
| <bean class="org.apache.camel.component.cxf.soap.headers.CustomHeaderFilter"/> |
| </list> |
| </property> |
| </bean> |
| <!-- END SNIPPET: customMessageFilterStrategy --> |
| |
| <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> |
| <route> |
| <from uri="cxf:bean:routerRelayEndpoint"/> |
| <to uri="cxf:bean:serviceRelayEndpoint"/> |
| </route> |
| <!-- START SNIPPET: processSoapHeaderRoute --> |
| <route> |
| <from uri="cxf:bean:routerRelayEndpointWithInsertion"/> |
| <process ref="InsertRequestOutHeaderProcessor" /> |
| <to uri="cxf:bean:serviceRelayEndpointWithInsertion"/> |
| <process ref="InsertResponseOutHeaderProcessor" /> |
| </route> |
| <!-- END SNIPPET: processSoapHeaderRoute --> |
| <route> |
| <from uri="direct:directProducer" /> |
| <to uri="cxf:bean:serviceRelayEndpoint" /> |
| </route> |
| <route> |
| <from uri="direct:relayProducer" /> |
| <to uri="cxf:bean:routerRelayEndpoint" /> |
| </route> |
| |
| <!-- START SNIPPET: noRelayRoute --> |
| <route> |
| <from uri="cxf:bean:routerNoRelayEndpoint?headerFilterStrategy=#dropAllMessageHeadersStrategy"/> |
| <to uri="cxf:bean:serviceNoRelayEndpoint?headerFilterStrategy=#dropAllMessageHeadersStrategy"/> |
| </route> |
| <!-- END SNIPPET: noRelayRoute --> |
| |
| <route> |
| <from uri="cxf:bean:routerNoRelayNoServiceClassEndpoint?headerFilterStrategy=#dropAllMessageHeadersStrategy"/> |
| <to uri="cxf:bean:serviceNoRelayNoServiceClassEndpoint?headerFilterStrategy=#dropAllMessageHeadersStrategy"/> |
| </route> |
| |
| <route> |
| <from uri="cxf:bean:serviceExtraRelays?headerFilterStrategy=#customMessageFilterStrategy"/> |
| <to uri="mock:result"/> |
| </route> |
| </camelContext> |
| |
| <bean id="InsertRequestOutHeaderProcessor" class="org.apache.camel.component.cxf.soap.headers.CxfMessageHeadersRelayTest$InsertRequestOutHeaderProcessor" /> |
| <bean id="InsertResponseOutHeaderProcessor" class="org.apache.camel.component.cxf.soap.headers.CxfMessageHeadersRelayTest$InsertResponseOutHeaderProcessor" /> |
| <bean id="logOutbound" class="org.apache.cxf.interceptor.LoggingOutInterceptor" /> |
| <bean id="logInbound" class="org.apache.cxf.interceptor.LoggingInInterceptor"/> |
| </beans> |