<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:mule="http://www.mulesoft.org/schema/mule/core" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://www.mulesoft.org/schema/mule/as2">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace"></xs:import>
  <xs:import schemaLocation="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" namespace="http://www.springframework.org/schema/beans"></xs:import>
  <xs:import schemaLocation="http://www.mulesoft.org/schema/mule/core/current/mule.xsd" namespace="http://www.mulesoft.org/schema/mule/core"></xs:import>
  <xs:import schemaLocation="http://www.mulesoft.org/schema/mule/devkit/current/mule-devkit.xsd" namespace="http://www.mulesoft.org/schema/mule/devkit"></xs:import>
  <xs:simpleType name="integerType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:integer"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="decimalType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:decimal"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="floatType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:float"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="doubleType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:double"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="dateTimeType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:dateTime"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="longType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:long"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="byteType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:byte"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="booleanType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:boolean"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="anyUriType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:anyURI"></xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="charType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:minLength value="1"></xs:minLength>
          <xs:maxLength value="1"></xs:maxLength>
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="(\#\[[^\]]+\]|\$\{[^\}]+\})"></xs:pattern>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:complexType name="XmlType">
    <xs:sequence>
      <xs:any maxOccurs="unbounded" minOccurs="0" processContents="lax"></xs:any>
    </xs:sequence>
    <xs:attribute name="ref" use="optional" type="xs:string">
      <xs:annotation>
        <xs:documentation>The reference object for this parameter</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:element xmlns:devkit="http://www.mulesoft.org/schema/mule/devkit" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="config" substitutionGroup="mule:abstract-extension" devkit:javaClass="org.mule.modules.config.AS2ConnectorLifecycleAdapter">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="mule:abstractExtensionType">
          <xs:annotation>
            <xs:documentation>&lt;b&gt;AS2 (Applicability Statement 2)&lt;/b&gt; is a specification about how to transport data
securely and reliably over the Internet.
Security is achieved by using digital certificates and encryption.
&lt;p&gt;
The AS2 protocol is based on HTTP and S/MIME. It was the second AS protocol developed
and uses the same signing, encryption and MDN (as defined by RFC3798) conventions
used in the original AS1 protocol introduced in the late 90s by IETF. In other words:

&lt;li&gt;Files are encoded as "attachments" in a standardized S/MIME message (an AS2 message).&lt;/li&gt;</xs:documentation>
          </xs:annotation>
          <xs:attribute name="name" use="optional" type="xs:string">
            <xs:annotation>
              <xs:documentation>Give a name to this configuration so it can be later referenced by config-ref.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="urlServer" use="required" type="xs:string">
            <xs:annotation>
              <xs:documentation>Configurable url server</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/as2" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="basic-send" substitutionGroup="mule:abstract-message-processor" type="BasicSendType">
    <xs:annotation>
      <xs:documentation>Sender sends un-encrypted data and does not request a receipt</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="BasicSendType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <xs:attribute name="config-ref" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Specify which configuration to use for this invocation.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="from" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>AS2 client to send a stream</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="to" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>AS2 client to receive a stream</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="subject" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>subject for this message</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="contentType" default="text/plain" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>the content type of object to send</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/as2" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="send-with-mdn" substitutionGroup="mule:abstract-message-processor" type="SendWithMdnType">
    <xs:annotation>
      <xs:documentation>Sender sends un-encrypted data and request an unsigned receipt.
Receiver sends back the unsigned receipt (Sync)</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="SendWithMdnType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <xs:attribute name="config-ref" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Specify which configuration to use for this invocation.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="from" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>AS2 client to send a stream</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="to" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>AS2 client to receive a stream</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="subject" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>subject for this message</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="contentType" default="text/plain" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>the content type of object to send</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element xmlns="http://www.mulesoft.org/schema/mule/as2" xmlns:mule="http://www.mulesoft.org/schema/mule/core" name="send-with-mdn-async" substitutionGroup="mule:abstract-message-processor" type="SendWithMdnAsyncType">
    <xs:annotation>
      <xs:documentation>Sender sends un-encrypted data and request an unsigned receipt.
Receiver sends back the unsigned receipt (Mode Async)</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="SendWithMdnAsyncType">
    <xs:complexContent>
      <xs:extension xmlns:mule="http://www.mulesoft.org/schema/mule/core" base="mule:abstractMessageProcessorType">
        <xs:attribute name="config-ref" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>Specify which configuration to use for this invocation.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="from" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>AS2 client to send a stream</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="to" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>AS2 client to receive a stream</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="subject" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>subject for this message</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="responseReceiver" use="required" type="xs:string">
          <xs:annotation>
            <xs:documentation>receiver to send notification (examples: http://localhost:8000, mailto:mule@mule.org)</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="contentType" default="text/plain" use="optional" type="xs:string">
          <xs:annotation>
            <xs:documentation>the content type of object to send</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>