<?xml version="1.0" encoding="UTF-8"?>
<switchyard xmlns="urn:switchyard-config:switchyard:1.0" xmlns:bean="urn:switchyard-component-bean:config: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="soap-binding-rpc" targetNamespace="urn:switchyard-quickstart:soap-binding-rpc:1.0">
    <sca:service name="HelloWorldWS" promote="InternalRouter/HelloService">
      <sca:interface.wsdl interface="HelloWorldWS.wsdl#wsdl.porttype(HelloWorld)"/>
      <soap:binding.soap>
        <soap:messageComposer class="org.switchyard.quickstarts.soap.binding.rpc.CustomComposer"/>
        <soap:wsdl>HelloWorldWS.wsdl</soap:wsdl>
        <soap:contextPath>soap-binding-rpc</soap:contextPath>
        <soap:socketAddr>:${jettyPort}</soap:socketAddr>
      </soap:binding.soap>
    </sca:service>
    <sca:component name="InternalRouter">
      <camel:implementation.camel>
        <camel:xml path="META-INF/route.xml"/>
      </camel:implementation.camel>
      <sca:service name="HelloService">
        <interface.esb inputType="java:org.switchyard.quickstarts.soap.binding.rpc.SayHello" outputType="java:java.lang.String"/>
      </sca:service>
      <sca:reference name="HelloWorldWSExternal">
        <interface.esb inputType="java:org.switchyard.quickstarts.soap.binding.rpc.SayHello" outputType="java:java.lang.String"/>
      </sca:reference>
    </sca:component>
    <sca:reference name="HelloWorldWSExternal" multiplicity="0..1" promote="InternalRouter/HelloWorldWSExternal">
      <sca:interface.wsdl interface="HelloWorldWS-External.wsdl#wsdl.porttype(HelloWorld)"/>
      <soap:binding.soap>
        <soap:contextMapper/>
        <soap:wsdl>HelloWorldWS.wsdl</soap:wsdl>
        <soap:wsdlPort>HelloWorldPort</soap:wsdlPort>
        <soap:endpointAddress>http://localhost:${jettyPort}/external/HelloWorldWSService</soap:endpointAddress>
      </soap:binding.soap>
    </sca:reference>
    <sca:component name="HelloWorldServiceBean">
      <bean:implementation.bean class="org.switchyard.quickstarts.soap.binding.rpc.HelloWorldServiceBean"/>
      <sca:service name="HelloWorldService">
        <sca:interface.java interface="org.switchyard.quickstarts.soap.binding.rpc.HelloWorldService"/>
      </sca:service>
    </sca:component>
    <sca:service name="HelloWorldExternal" promote="HelloWorldServiceBean/HelloWorldService">
      <sca:interface.wsdl interface="HelloWorldWS-External.wsdl#wsdl.porttype(HelloWorld)"/>
      <soap:binding.soap>
        <soap:contextMapper/>
        <soap:wsdl>HelloWorldWS-External.wsdl</soap:wsdl>
        <soap:contextPath>external</soap:contextPath>
        <soap:socketAddr>:${jettyPort}</soap:socketAddr>
      </soap:binding.soap>
    </sca:service>
  </sca:composite>
  <domain>
    <properties>
      <property name="jettyPort" value="${org.switchyard.component.http.standalone.port:8080}"/>
    </properties>
  </domain>
</switchyard>
