<?xml version="1.0" encoding="utf-8"?>
<definitions
    name="choice"
    targetNamespace="urn:choice"
    xmlns:tns="urn:choice"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
  <types>
    <xsd:schema elementFormDefault="unqualified" targetNamespace="urn:choice">
      <xsd:complexType name="andor">
        <xsd:sequence>
          <xsd:element name="A" type="xsd:string"/>
          <xsd:choice>
            <xsd:element name="B1" type="xsd:string"/>
            <xsd:sequence>
              <xsd:element name="B2a" type="xsd:string"/>
              <xsd:element name="B2b" type="xsd:string"/>
            </xsd:sequence>
            <xsd:choice>
              <xsd:element name="B3a" type="xsd:string"/>
              <xsd:element name="B3b" type="xsd:string"/>
            </xsd:choice>
          </xsd:choice>
          <xsd:sequence>
            <xsd:element name="C1" type="xsd:string"/>
            <xsd:element name="C2" type="xsd:string"/>
          </xsd:sequence>
        </xsd:sequence>
      </xsd:complexType>

      <xsd:complexType name="emptyArrayAtFirst">
        <xsd:sequence>
          <xsd:choice>
            <xsd:element name="A" maxOccurs="unbounded" type="xsd:string"/>
            <xsd:element name="B1" type="xsd:string"/>
            <xsd:element name="B2" type="xsd:string"/>
          </xsd:choice>
        </xsd:sequence>
      </xsd:complexType>

      <xsd:element name="terminalID" minOccurs="1" maxOccurs="1">
        <xsd:complexType>
          <xsd:choice>
            <xsd:element name="imei" type="xsd:string"/>
            <xsd:element name="devId" type="xsd:string"/>
          </xsd:choice>
        </xsd:complexType>
      </xsd:element>

      <xsd:element name="echoele">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element minOccurs="0" maxOccurs="1" ref="tns:terminalID" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>

      <xsd:element name="echo_response">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element minOccurs="0" maxOccurs="1" ref="tns:terminalID" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>

      <xsd:element name="echoele_complex">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="data" type="tns:andor"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>

      <xsd:element name="echo_complex_response">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="data" type="tns:andor"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>

      <xsd:element name="echoele_complex_emptyArrayAtFirst">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="data" type="tns:emptyArrayAtFirst"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
  </types>

  <message name="echo_in">
    <part name="parameters" element="tns:echoele" />
  </message>
  <message name="echo_out">
    <part name="parameters" element="tns:echo_response" />
  </message>
  <message name="echo_complex_in">
    <part name="parameters" element="tns:echoele_complex" />
  </message>
  <message name="echo_complex_out">
    <part name="parameters" element="tns:echo_complex_response" />
  </message>
  <message name="echo_complex_emptyArrayAtFirst_in">
    <part name="parameters" element="tns:echoele_complex_emptyArrayAtFirst" />
  </message>
  <message name="echo_complex_emptyArrayAtFirst_out">
    <part name="parameters" element="tns:echoele_complex_emptyArrayAtFirst" />
  </message>

  <portType name="choice_porttype">
    <operation name="echo">
      <input message="tns:echo_in" />
      <output message="tns:echo_out" />
    </operation>

    <operation name="echo_complex">
      <input message="tns:echo_complex_in" />
      <output message="tns:echo_complex_out" />
    </operation>

    <operation name="echo_complex_emptyArrayAtFirst">
      <input message="tns:echo_complex_emptyArrayAtFirst_in" />
      <output message="tns:echo_complex_emptyArrayAtFirst_out" />
    </operation>
  </portType>

  <binding name="choice_binding" type="tns:choice_porttype">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    <operation name="echo">
      <soap:operation soapAction="urn:choice:echo" style="document" />
      <input>
        <soap:body use="literal" />
      </input>
      <output>
        <soap:body use="literal" />
      </output>
    </operation>

    <operation name="echo_complex">
      <soap:operation soapAction="urn:choice:echo_complex" style="document" />
      <input>
        <soap:body use="literal" />
      </input>
      <output>
        <soap:body use="literal" />
      </output>
    </operation>

    <operation name="echo_complex_emptyArrayAtFirst">
      <soap:operation soapAction="urn:choice:echo_complex_emptyArrayAtFirst" style="document" />
      <input>
        <soap:body use="literal" />
      </input>
      <output>
        <soap:body use="literal" />
      </output>
    </operation>
  </binding>

  <service name="choice_service">
    <port name="choice_service_port" binding="tns:choice_binding">
      <soap:address location="http://localhost:17171/" />
    </port>
  </service>
</definitions>
