<?xml version="1.0"?>
<definitions name="product"
    targetNamespace="urn:ref"
    xmlns:tns="urn:ref"
    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 xmlns="http://www.w3.org/2001/XMLSchema"
        targetNamespace="urn:ref">
      <simpleType name="non-empty-string">
        <restriction base="xsd:string">
          <minLength value="1"/>
        </restriction>
      </simpleType>

      <complexType name="Product">
        <all>
          <element name="name" type="xsd:string"/>
          <element ref="tns:Rating"/>
        </all>
      </complexType>

      <complexType name="Comment">
        <simpleContent>
          <extension base="xsd:string">
            <attribute name="msgid" type="xsd:string" use="required"/>
          </extension>
        </simpleContent>
      </complexType>

      <complexType name="_point">
        <simpleContent>
          <extension base="xsd:integer">
            <attribute name="unit" type="xsd:string" use="required"/>
          </extension>
        </simpleContent>
      </complexType>

      <attribute name="version" type="tns:non-empty-string"/>

      <attribute default="Y" name="yesno">
        <simpleType>
          <restriction base="xsd:string">
            <enumeration value="Y"/>
            <enumeration value="N"/>
          </restriction>
        </simpleType>
      </attribute>

      <element name="Rating">
        <simpleType>
          <restriction base="xsd:string">
            <enumeration value="+1"/>
            <enumeration value="0"/>
            <enumeration value="-1"/>
          </restriction>
        </simpleType>
      </element>

      <element name="Product-Bag">
        <complexType>
          <sequence>
            <element name="bag" type="tns:Product" minOccurs="0" maxOccurs="unbounded"/>
            <element ref="tns:Rating" minOccurs="0" maxOccurs="unbounded"/>
            <element name="Comment_1" minOccurs="0" maxOccurs="unbounded">
              <complexType>
                <simpleContent>
                  <extension base="xsd:string">
                    <attribute name="msgid" type="xsd:string" use="required"/>
                  </extension>
                </simpleContent>
              </complexType>
            </element>
            <element name="comment-2" type="tns:Comment" minOccurs="0" maxOccurs="unbounded"/>
            <element name="__point" type="tns:_point" minOccurs="0" maxOccurs="1"/>
          </sequence>
          <attribute ref="tns:version"/>
          <attribute ref="tns:yesno"/>
        </complexType>
      </element>

      <element name="Creator">
        <complexType>
          <simpleContent>
            <extension base="xsd:string">
              <attribute name="Role" type="xsd:string" use="required"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>

      <complexType name="Document">
        <simpleContent>
          <extension base="string">
            <attribute name="ID" type="xsd:string"/>
          </extension>
        </simpleContent>
      </complexType>

      <complexType name="DerivedChoice_BaseSimpleContent">
        <complexContent mixed="false">
          <extension base="tns:Document">
            <choice>
              <element name="varStringExt" type="xsd:string"/>
              <element name="varFloatExt" type="xsd:float"/>
            </choice>
            <attribute name="attrStringExt" type="xsd:string"/>
          </extension>
        </complexContent>
      </complexType>
    </xsd:schema>
  </types>

  <message name="echo_in">
    <part name="parameters" element="tns:Product-Bag" />
  </message>
  <message name="echo_out">
    <part name="parameters" element="tns:Creator" />
  </message>

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

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

  <service name="ref_service">
    <port name="ref_service_port" binding="tns:ref_binding">
      <soap:address location="http://localhost:17171/" />
    </port>
  </service>
</definitions>
