| <?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" |
| xmlns:camel="http://cxf.apache.org/transports/camel" |
| xsi:schemaLocation=" |
| http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd |
| http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd |
| http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd |
| http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd |
| http://cxf.apache.org/transports/camel http://cxf.apache.org/transports/camel.xsd |
| "> |
| |
| <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> |
| |
| <import resource="classpath:META-INF/cxf/camel/cxf-extension-camel.xml" /> |
| |
| <!-- START SNIPPET: beanDefinition --> |
| <util:list id="customerServiceBean"> |
| <bean class="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService" /> |
| </util:list> |
| |
| <bean class="org.apache.camel.wsdl_first.PersonImpl" id="jaxwsBean" /> |
| |
| <!-- END SNIPPET: beanDefinition --> |
| |
| <cxf:cxfEndpoint id="routerEndpoint" |
| address="http://localhost:${CXFTestSupport.port1}/CxfBeanTest/PersonService/" serviceClass="org.apache.camel.wsdl_first.Person" |
| endpointName="person:soap" serviceName="person:PersonService" wsdlURL="person.wsdl" |
| xmlns:person="http://camel.apache.org/wsdl-first"> |
| </cxf:cxfEndpoint> |
| |
| <cxf:cxfEndpoint id="serviceEndpoint" |
| address="camel://direct:camel.apache.org.wsdl-first.PersonService" serviceClass="org.apache.camel.wsdl_first.Person" |
| endpointName="person:soap3" serviceName="person:PersonService" |
| wsdlURL="person.wsdl" |
| xmlns:person="http://camel.apache.org/wsdl-first"> |
| </cxf:cxfEndpoint> |
| |
| <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> |
| <endpoint id="ep1" uri="jetty:http://localhost:${CxfBeanTest.1}/?matchOnUriPrefix=true"/> |
| <endpoint id="ep2" uri="jetty:http://localhost:${CxfBeanTest.2}/?matchOnUriPrefix=true"/> |
| |
| <route> |
| <from uri="cxf:bean:routerEndpoint?dataFormat=PAYLOAD" /> |
| <to uri="cxf:bean:serviceEndpoint?dataFormat=PAYLOAD" /> |
| </route> |
| <!-- START SNIPPET: routeDefinition --> |
| <route> |
| <from ref="ep1" /> |
| <to uri="cxfbean:customerServiceBean" /> |
| <to uri="mock:endpointA" /> |
| </route> |
| <!-- END SNIPPET: routeDefinition --> |
| <route> |
| <from uri="ep2" /> |
| <to uri="cxfbean:jaxwsBean" /> |
| </route> |
| <!-- Provide an RS route for the purposes of testing that providers are added --> |
| <route> |
| <from uri="direct:start" /> |
| <to uri="cxfbean:customerServiceBean?providers=#provider1,#provider2" /> |
| </route> |
| </camelContext> |
| |
| <!-- A couple of beans to declare as providers - |
| they can be an object of any kind for the purposes of our test. --> |
| <bean id="provider1" class="java.lang.String" /> |
| <bean id="provider2" class="java.lang.String" /> |
| |
| <camel:conduit name="{http://camel.apache.org/wsdl-first}soap3.camel-conduit"> |
| <camelContext id="PersonServiceClientContext" xmlns="http://camel.apache.org/schema/spring"> |
| <route> |
| <from uri="direct:camel.apache.org.wsdl-first.PersonService"/> |
| <to uri="cxfbean:jaxwsBean"/> |
| </route> |
| </camelContext> |
| </camel:conduit> |
| |
| </beans> |