<?xml version="1.0" encoding="UTF-8"?>
<sy:switchyard xmlns:bean="urn:switchyard-component-bean:config:2.0" xmlns:camel="urn:switchyard-component-camel:config:2.0" xmlns:sap="urn:switchyard-component-camel-sap:config:2.0" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:sy="urn:switchyard-config:switchyard:2.0" xmlns:trfm="urn:switchyard-config:transform:2.0" name="switchyard-camel-sap-binding" targetNamespace="urn:org.switchyard.quickstarts:switchyard-camel-sap-binding:2.0.1-redhat-SNAPSHOT">
  <sca:composite name="switchyard-camel-sap-binding" targetNamespace="urn:org.switchyard.quickstarts:switchyard-camel-sap-binding:2.0.1-redhat-SNAPSHOT">
    <sca:component name="FlightBookingService">
      <camel:implementation.camel>
        <camel:xml path="route-flight-booking.xml"/>
      </camel:implementation.camel>
      <sca:service name="FlightBookingService">
        <sca:interface.java interface="org.switchyard.quickstarts.camel.sap.binding.FlightBookingService"/>
      </sca:service>
      <sca:reference name="FlightConnectionInfoService">
        <sca:interface.java interface="org.switchyard.quickstarts.camel.sap.binding.FlightConnectionInfoService"/>
      </sca:reference>
      <sca:reference name="FlightCustomerInfoService">
        <sca:interface.java interface="org.switchyard.quickstarts.camel.sap.binding.FlightCustomerInfoService"/>
      </sca:reference>
      <sca:reference name="PassengerInfoService">
        <sca:interface.java interface="org.switchyard.quickstarts.camel.sap.binding.PassengerInfoService"/>
      </sca:reference>
      <sca:reference name="CreateFlightTripService">
        <sca:interface.java interface="org.switchyard.quickstarts.camel.sap.binding.CreateFlightTripService"/>
      </sca:reference>
    </sca:component>
    <sca:component name="FlightConnectionInfoService">
      <camel:implementation.camel>
        <camel:xml path="route-flight-connection-info.xml"/>
      </camel:implementation.camel>
      <sca:service name="FlightConnectionInfoService">
        <sca:interface.java interface="org.switchyard.quickstarts.camel.sap.binding.FlightConnectionInfoService"/>
      </sca:service>
      <sca:reference name="GetFlightConnectionListService">
        <sca:interface.java interface="org.switchyard.quickstarts.camel.sap.binding.GetFlightConnectionListService"/>
      </sca:reference>
      <sca:reference name="GetFlightConnectionDetailService">
        <sca:interface.java interface="org.switchyard.quickstarts.camel.sap.binding.GetFlightConnectionDetailService"/>
      </sca:reference>
    </sca:component>
    <sca:service name="FlightBookingService" promote="FlightBookingService/FlightBookingService">
      <sca:interface.java interface="org.switchyard.quickstarts.camel.sap.binding.FlightBookingPromotedService"/>
      <sap:binding.sap name="FlightBookingServiceBinding">
        <sap:srfc-server>
          <sap:serverName>nplServer</sap:serverName>
          <sap:rfcName>BOOK_FLIGHT</sap:rfcName>
        </sap:srfc-server>
      </sap:binding.sap>
    </sca:service>
    <sca:component name="PassengerInfoService">
      <bean:implementation.bean class="org.switchyard.quickstarts.camel.sap.binding.PassengerInfoServiceBean"/>
      <sca:service name="PassengerInfoService">
        <sca:interface.java interface="org.switchyard.quickstarts.camel.sap.binding.PassengerInfoService"/>
      </sca:service>
    </sca:component>
    <sca:reference name="GetFlightConnectionListService" promote="FlightConnectionInfoService/GetFlightConnectionListService" multiplicity="0..1">
      <sca:interface.java interface="org.switchyard.quickstarts.camel.sap.binding.GetFlightConnectionListService"/>
      <sap:binding.sap name="GetFlightConnectionListReferenceBinding">
        <sap:messageComposer class="org.switchyard.quickstarts.camel.sap.binding.composer.GetFlightConnectionListMessageComposer"/>
        <sap:srfc-destination>
          <sap:destinationName>nplDest</sap:destinationName>
          <sap:rfcName>BAPI_FLCONN_GETLIST</sap:rfcName>
        </sap:srfc-destination>
      </sap:binding.sap>
    </sca:reference>
    <sca:reference name="GetFlightConnectionDetailService" promote="FlightConnectionInfoService/GetFlightConnectionDetailService" multiplicity="0..1">
      <sca:interface.java interface="org.switchyard.quickstarts.camel.sap.binding.GetFlightConnectionDetailService"/>
      <sap:binding.sap name="GetFlightConnectionDetailReferenceBinding">
        <sap:messageComposer class="org.switchyard.quickstarts.camel.sap.binding.composer.GetFlightConnectionDetailMessageComposer"/>
        <sap:srfc-destination>
          <sap:destinationName>nplDest</sap:destinationName>
          <sap:rfcName>BAPI_FLCONN_GETDETAIL</sap:rfcName>
        </sap:srfc-destination>
      </sap:binding.sap>
    </sca:reference>
    <sca:reference name="FlightCustomerInfoService" promote="FlightBookingService/FlightCustomerInfoService" multiplicity="0..1">
      <sca:interface.java interface="org.switchyard.quickstarts.camel.sap.binding.FlightCustomerInfoService"/>
      <sap:binding.sap name="FlightCustomerInfoReferenceBinding">
        <sap:messageComposer class="org.switchyard.quickstarts.camel.sap.binding.composer.FlightCustomerInfoMessageComposer"/>
        <sap:srfc-destination>
          <sap:destinationName>nplDest</sap:destinationName>
          <sap:rfcName>BAPI_FLCUST_GETLIST</sap:rfcName>
        </sap:srfc-destination>
      </sap:binding.sap>
    </sca:reference>
    <sca:reference name="CreateFlightTripService" promote="FlightBookingService/CreateFlightTripService" multiplicity="0..1">
      <sap:binding.sap name="CreateFlightTripReferenceBinding">
        <sap:messageComposer class="org.switchyard.quickstarts.camel.sap.binding.composer.CreateFlightTripMessageComposer"/>
        <sap:srfc-destination>
          <sap:destinationName>nplDest</sap:destinationName>
          <sap:rfcName>BAPI_FLTRIP_CREATE</sap:rfcName>
          <sap:transacted>true</sap:transacted>
        </sap:srfc-destination>
      </sap:binding.sap>
    </sca:reference>
  </sca:composite>
  <sy:transforms xmlns:trfm="urn:switchyard-config:transform:2.0">
    <trfm:transform.jaxb contextPath="org.switchyard.quickstarts.camel.sap.binding.jaxb" from="java:org.switchyard.quickstarts.camel.sap.binding.jaxb.BookFlightResponse" to="{http://sap.fusesource.org/rfc/nplServer/BOOK_FLIGHT}Response"/>
    <trfm:transform.jaxb contextPath="org.switchyard.quickstarts.camel.sap.binding.jaxb" from="{http://sap.fusesource.org/rfc/nplServer/BOOK_FLIGHT}Request" to="java:org.switchyard.quickstarts.camel.sap.binding.jaxb.BookFlightRequest"/>
  </sy:transforms>
</sy:switchyard>
