Advertisement
Guest User

Untitled

a guest
Jun 17th, 2014
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.86 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
  3.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.     xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
  5.     xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
  6.     xsi:schemaLocation="
  7.            http://www.osgi.org/xmlns/blueprint/v1.0.0
  8.            http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
  9.            http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
  10.            http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
  11.            http://camel.apache.org/schema/blueprint
  12.            http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
  13.            http://camel.apache.org/schema/blueprint/cxf
  14.            http://camel.apache.org/schema/blueprint/cxf/camel-cxf.xsd">
  15.  
  16.     <bean id="calculatePayloadProcessor" class="org.example.calculatorws.camel.processor.CalculatePayloadProcessor" />
  17.    
  18.     <cxf:cxfEndpoint id="calculatorWS" wsdlURL="calculatorWS.wsdl" address="/calculatorWS"/>
  19.    
  20.     <camelContext id="camel" xmlns="http://camel.apache.org/schema/blueprint">
  21.  
  22.         <dataFormats>
  23.             <jaxb id="jaxbFormat" prettyPrint="true" contextPath="org.example.calculatorws"/>
  24.         </dataFormats>
  25.        
  26.         <route>
  27.             <from uri="cxf:bean:calculatorWS?dataFormat=PAYLOAD"/>
  28.             <log message="Request Body ${in.body}"/>
  29.             <log message="Request Headers ${in.headers}"/>
  30.             <choice>
  31.                 <when>
  32.                     <simple>${in.header.operationName} == 'calculate'</simple>
  33.                     <unmarshal ref="jaxbFormat"/>
  34.                     <to uri="bean:calculatePayloadProcessor"/>
  35.                     <log message="Response Body ${in.body}"/>
  36.                     <log message="Response Headers ${in.headers}"/>
  37.                     <transform>
  38.                         <simple><![CDATA[${in.body}]]></simple>
  39.                     </transform>
  40.                 </when>
  41.             </choice>
  42.         </route>
  43.     </camelContext>
  44.    
  45. </blueprint>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement