<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright(C) OASIS(R) 2005,2010. All Rights Reserved. 
      OASIS trademark, IPR and other policies apply.  -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" 	
    targetNamespace="urn:switchyard-component-jca:config:2.0"
    xmlns:swyd="urn:switchyard-config:switchyard:2.0"
    xmlns:jca="urn:switchyard-component-jca:config:2.0"
    xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" 	elementFormDefault="qualified">

   <import namespace="urn:switchyard-config:switchyard:2.0"/>
   <import namespace="http://docs.oasis-open.org/ns/opencsa/sca/200912"/>

   <element name="binding.jca" type="jca:JCABinding" substitutionGroup="swyd:binding.switchyard" />
   <complexType name="JCABinding">
      <complexContent>
         <extension base="swyd:SwitchYardBindingType">
            <sequence>
               <element name="contextMapper" type="swyd:ContextMapperType"  minOccurs="0" maxOccurs="1"/>
               <element name="messageComposer" type="swyd:MessageComposerType" minOccurs="0" maxOccurs="1"/>
               <element name="outboundConnection" 
                        type="jca:JCAOutboundConnection" minOccurs="0" />
               <element name="inboundConnection" 
                        type="jca:JCAInboundConnection" minOccurs="0" />
               <element name="outboundInteraction" 
                        type="jca:JCAOutboundInteraction" minOccurs="0" />
               <element name="inboundInteraction" 
                        type="jca:JCAInboundInteraction" minOccurs="0" />
               <element name="property" type="jca:Property" minOccurs="0"
                        maxOccurs="unbounded"/>
               <element ref="sca:extensions" minOccurs="0" maxOccurs="1"/>
            </sequence>
         </extension>
      </complexContent>
   </complexType>

   <complexType name="JCAOutboundConnection">
      <sequence>
         <element name="resourceAdapter" type="jca:ResourceAdapter"
                  minOccurs="0" />
         <element name="connection" type="jca:Connection" />
      </sequence>
   </complexType>
   <complexType name="JCAInboundConnection">
      <sequence>
         <element name="resourceAdapter" type="jca:ResourceAdapter" />
         <element name="activationSpec" type="jca:ActivationSpec" />
      </sequence>
   </complexType>
   <complexType name="JCAOutboundInteraction">
      <sequence>
         <element name="connectionSpec" type="jca:ConnectionSpec"
                  minOccurs="0" />
         <element name="interactionSpec" type="jca:InteractionSpec"
                  minOccurs="0" />
         <element name="processor" type="jca:Processor" minOccurs="0" />
      </sequence>
   </complexType>
   <complexType name="JCAInboundInteraction">
      <sequence>
         <element name="listener" type="string" minOccurs="0" />
         <element name="endpoint" type="jca:Endpoint" minOccurs="0" />
         <element name="transacted" type="swyd:propBoolean" minOccurs="0" />
         <element name="batchCommit" type="jca:batchCommit" minOccurs="0"/>
      </sequence>
   </complexType>
   <complexType name="ResourceAdapter">
      <sequence>
         <element name="property" type="jca:Property" minOccurs="0"
                  maxOccurs="unbounded" />
      </sequence>
      <attribute name="name" type="string" use="optional" />
   </complexType>
   <complexType name="Connection">
      <sequence>
         <element name="property" type="jca:Property" minOccurs="0"
                  maxOccurs="unbounded" />
      </sequence>
      <attribute name="jndiName" type="anyURI" use="optional" />
   </complexType>
   <complexType name="ActivationSpec">
      <sequence>
         <element name="property" type="jca:Property" minOccurs="0"
                  maxOccurs="unbounded" />
      </sequence>
   </complexType>
   <complexType name="ConnectionSpec">
      <sequence>
         <element name="property" type="jca:Property" minOccurs="0"
                  maxOccurs="unbounded" />
      </sequence>
   </complexType>
   <complexType name="InteractionSpec">
      <sequence>
         <element name="property" type="jca:Property" minOccurs="0"
                  maxOccurs="unbounded" />
      </sequence>
   </complexType>
   <complexType name="Endpoint">
      <sequence>
         <element name="property" type="jca:Property" minOccurs="0"
                  maxOccurs="unbounded" />
      </sequence>
      <attribute name="type" type="string" use="required" />
   </complexType>
   <complexType name="batchCommit">
      <attribute name="batchSize" type="swyd:propInteger" use="required"/>
      <attribute name="batchTimeout" type="swyd:propInteger" use="required"/>
   </complexType>
   <complexType name="Processor">
      <sequence>
         <element name="property" type="jca:Property" minOccurs="0"
                  maxOccurs="unbounded" />
      </sequence>
      <attribute name="type" type="string" use="required" />
   </complexType>

    <complexType name="Property">
      <attribute name="name" type="NCName" use="required"/>
      <attribute name="value" type="anySimpleType" use="optional"/>
    </complexType>
    
</schema>
