One Star

[resolved] Simple Camel CXF Proxy Route

Hi Community,
here's sample for a simple camel cxf route :
###################################################################################
<?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.
-->
<!-- START SNIPPET: e1 -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:cxf="http://camel.apache.org/schema/cxf"
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://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<!-- needed cxf imports -->
<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" />
<!-- this is the CXF webservice we use as front end -->
<cxf:cxfEndpoint id="getCRMInformation" address="http://localhost:9080/services"
endpointName="serviceNS:CRMServiceProvider" serviceName="serviceNS:CRMServiceProvider"
wsdlURL="etc/CRMService.wsdl" xmlns:serviceNS="http://services.talend.org/CRMService" />
<jaxws:client id="crmServiceClient" xmlns:serviceNS="http://services.talend.org/CRMService"
serviceClass="org.talend.services.crmservice.CRMService" serviceName="serviceNS:CRMServiceProvider"
endpointName="serviceNS:CRMServiceProvider" address="http://localhost:8080/CRMServiceProvider">
</jaxws:client>
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="cxf:bean:getCRMInformation?dataFormat=POJO" />
<bean ref="crmServiceClient" method="getCRMInformation" />
</route>
</camelContext>
</beans>
###################################################################################

This route is based on the talend esb 4.0 getting started CRMService example. It can be extended with Service Locator or Service Activity Monitoring.
... and with dynamic routing or other camel eip pattern also ;-)
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] Simple Camel CXF Proxy Route

Hi rlaly, it would be great if you could post how we can do this by gui. I mean the "Route Builder Perspective" of the talend esb studio.
May be you can demonstrate it with your post or may be with this tutorial http://camel.apache.org/cxf-proxy-example.html at the camel site. I'm yet not really familiar with talend esb, talend esb studio, camel, ... but i thought that i can use the "route builder" perspective of the talend esb studio to design camel eip routes. From the gui will be Java DSL Code generated but your post shows Spring DSL? So you didn't use the talend esb studio?
thanks
1 REPLY
One Star

Re: [resolved] Simple Camel CXF Proxy Route

Hi rlaly, it would be great if you could post how we can do this by gui. I mean the "Route Builder Perspective" of the talend esb studio.
May be you can demonstrate it with your post or may be with this tutorial http://camel.apache.org/cxf-proxy-example.html at the camel site. I'm yet not really familiar with talend esb, talend esb studio, camel, ... but i thought that i can use the "route builder" perspective of the talend esb studio to design camel eip routes. From the gui will be Java DSL Code generated but your post shows Spring DSL? So you didn't use the talend esb studio?
thanks