<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema xmlns="http://www.mulesource.org/schema/mule/vm/2.0"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:mule="http://www.mulesource.org/schema/mule/core/2.0"
            targetNamespace="http://www.mulesource.org/schema/mule/vm/2.0"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified">

    <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
    <xsd:import namespace="http://www.mulesource.org/schema/mule/core/2.0" 
                schemaLocation="http://www.mulesource.org/schema/mule/core/2.0/mule.xsd" />

    <xsd:element name="connector" type="vmConnectorType" substitutionGroup="mule:abstract-connector"/>
    <xsd:complexType name="vmConnectorType">
        <xsd:complexContent>
            <xsd:extension base="mule:connectorType">
                <xsd:sequence>
                    <xsd:element name="queueProfile" type="mule:queueProfileType" minOccurs="0"/>
                </xsd:sequence>
                <xsd:attribute name="queueEvents" type="mule:substitutableBoolean">
                    <xsd:annotation>
                        <xsd:documentation>
                            Determines if queues should be set up for listeners on the connector.
                            If this is false the connector simply forwards events to components via the Mule server.
                            If it is set then the queues are configured using the queuing profile.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="queueTimeout" type="xsd:positiveInteger"/>
            </xsd:extension>
        </xsd:complexContent>
   </xsd:complexType>
 
    <xsd:element name="inbound-endpoint" type="inboundEndpointType" substitutionGroup="mule:abstract-inbound-endpoint"/>
    <xsd:complexType name="inboundEndpointType">
        <xsd:complexContent>
            <xsd:extension base="mule:inboundEndpointType">
                <xsd:attributeGroup ref="addressAttributes"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:element name="outbound-endpoint" type="outboundEndpointType" substitutionGroup="mule:abstract-outbound-endpoint"/>
    <xsd:complexType name="outboundEndpointType">
        <xsd:complexContent>
            <xsd:extension base="mule:outboundEndpointType">
                <xsd:attributeGroup ref="addressAttributes"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:element name="endpoint" type="globalEndpointType" substitutionGroup="mule:abstract-global-endpoint"/>
    <xsd:complexType name="globalEndpointType">
        <xsd:complexContent>
            <xsd:extension base="mule:globalEndpointType">
                <xsd:attributeGroup ref="addressAttributes"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:attributeGroup name="addressAttributes">
        <xsd:attribute name="path" type="xsd:string"/>
    </xsd:attributeGroup>

</xsd:schema>
