<?xml version="1.0" encoding="UTF-8"?>
<switchyard xmlns="urn:switchyard-config:switchyard:1.0" xmlns:camel="urn:switchyard-component-camel:config:1.0" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:soap="urn:switchyard-component-soap:config:1.0">
  <sca:composite name="camel-soap-proxy" targetNamespace="urn:switchyard-quickstart:camel-soap-proxy:1.0">
    <sca:service name="PromotedProxyService" promote="ProxyService/ProxyService">
      <soap:binding.soap>
        <soap:contextMapper/>
        <soap:wsdl>META-INF/ReverseService.wsdl</soap:wsdl>
        <soap:contextPath>proxy</soap:contextPath>
        <soap:socketAddr>:${jettyPort}</soap:socketAddr>
      </soap:binding.soap>
    </sca:service>
    <sca:reference name="ReverseService" multiplicity="0..1" promote="ProxyService/ReverseService">
      <soap:binding.soap>
        <soap:contextMapper/>
        <soap:wsdl>META-INF/ReverseService.wsdl</soap:wsdl>
        <soap:endpointAddress>http://localhost:${jettyPort}/ReverseService</soap:endpointAddress>
      </soap:binding.soap>
    </sca:reference>
    <sca:component name="ProxyService">
      <camel:implementation.camel>
        <camel:xml path="META-INF/route.xml"/>
      </camel:implementation.camel>
      <sca:service name="ProxyService">
        <sca:interface.wsdl interface="META-INF/ReverseService.wsdl#wsdl.porttype(ReverseService)"/>
      </sca:service>
      <sca:reference name="ReverseService">
        <sca:interface.wsdl interface="META-INF/ReverseService.wsdl#wsdl.porttype(ReverseService)"/>
      </sca:reference>
    </sca:component>
  </sca:composite>
  <domain>
    <properties>
      <property name="jettyPort" value="${org.switchyard.component.http.standalone.port:8080}"/>
    </properties>
  </domain>
</switchyard>
