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

    <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
    <xsd:import namespace="http://www.springframework.org/schema/beans"
                schemaLocation="http://www.springframework.org/schema/beans"/>
    <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:import namespace="http://cxf.apache.org/core"
                schemaLocation="http://cxf.apache.org/schemas/core.xsd"/>

    <xsd:element name="connector" type="cxfConnectorType" substitutionGroup="mule:abstract-connector"/>
    <xsd:complexType name="cxfConnectorType">
      <xsd:complexContent>        
        <xsd:extension base="mule:connectorType">
           <xsd:attribute name="defaultFrontend" type="xsd:string" default="jaxws"/>
           <xsd:attribute name="configurationLocation" type="xsd:string"/>
        </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:group ref="endpointElements"/>
                <xsd:attributeGroup ref="inboundEndpointAttributes"/>
                <xsd:attributeGroup ref="commonEndpointAttributes"/>
            </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:group ref="endpointElements"/>
                <xsd:attributeGroup ref="outboundEndpointAttributes"/>
                <xsd:attributeGroup ref="commonEndpointAttributes"/>
            </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:group ref="endpointElements"/>
                <xsd:attributeGroup ref="inboundEndpointAttributes"/>
                <xsd:attributeGroup ref="outboundEndpointAttributes"/>
                <xsd:attributeGroup ref="commonEndpointAttributes"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
        
    <xsd:attributeGroup name="commonEndpointAttributes">
        <xsd:attribute name="mtomEnabled" type="xsd:boolean"/>
        <xsd:attribute name="wsdlLocation" type="xsd:string"/>
    </xsd:attributeGroup>
    
    <xsd:attributeGroup name="inboundEndpointAttributes">
        <xsd:attribute name="bridge" type="xsd:boolean"/>
        <xsd:attribute name="frontend" type="xsd:string"/>
        <xsd:attribute name="bindingUri" type="xsd:string"/>
        <xsd:attribute name="endpointName" type="xsd:string"/>
        <xsd:attribute name="serviceClass" type="xsd:string"/>
        <xsd:attribute name="serviceName" type="xsd:string"/>
    </xsd:attributeGroup>
    
    <xsd:group name="endpointElements">
        <xsd:sequence>
            <xsd:element name="databinding" type="databindingType" minOccurs="0"/>
            <xsd:element ref="features" minOccurs="0"/>
            <xsd:element name="inInterceptors" type="interceptors" minOccurs="0"/>
            <xsd:element name="inFaultInterceptors" type="interceptors" minOccurs="0"/>
            <xsd:element name="outInterceptors" type="interceptors" minOccurs="0"/>
            <xsd:element name="outFaultInterceptors" type="interceptors" minOccurs="0"/>
        </xsd:sequence>
    </xsd:group>
    
    <xsd:attributeGroup name="outboundEndpointAttributes">
        <xsd:attribute name="wsdlPort" type="xsd:string"/>
        <xsd:attribute name="clientClass" type="xsd:string"/>
        <xsd:attribute name="operation" type="xsd:string"/>
    </xsd:attributeGroup>
    
    <xsd:complexType name="databindingType">
        <xsd:sequence>
            <xsd:any minOccurs="0" maxOccurs="1" namespace="##any" processContents="lax"/>
        </xsd:sequence>
    </xsd:complexType>
    
    <xsd:complexType name="schemasType">
        <xsd:sequence>
            <xsd:element name="schemaLocation" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:element name="features">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:any minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:complexType name="interceptors">
        <xsd:sequence>
            <xsd:any minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>
    
    <xsd:complexType name="propertiesType">
        <xsd:sequence>
            <xsd:element ref="beans:entry" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>
    

</xsd:schema>
