<?xml version='1.0' encoding='UTF-8' ?>
<definitions  name ='MyWsdl'   targetNamespace = 'http://www.kdab.com/xml/MyWsdl/'
  xmlns:kdab='http://www.kdab.com/xml/MyWsdl/'
         xmlns:xsd='http://www.w3.org/2001/XMLSchema'
         xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
         xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding/'
         xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
         xmlns='http://schemas.xmlsoap.org/wsdl/'>
  <types>
    <xsd:schema elementFormDefault="qualified" attributeFormDefault="qualified" targetNamespace='http://www.kdab.com/xml/MyWsdl/' xmlns='http://www.w3.org/2001/XMLSchema'>
      <element name="HelloWorld">
        <complexType>
          <sequence>
            <element minOccurs="0" maxOccurs="1" name="who" type="xsd:string" />
          </sequence>
        </complexType>
      </element>
      <simpleType name="LimitedString">
        <restriction base="xsd:string">
          <minLength value="1"/>
          <maxLength value="128"/>
        </restriction>
      </simpleType>
      <simpleType name="Employee.Name">
        <restriction base="kdab:LimitedString">
        </restriction>
      </simpleType>
      <simpleType name="TeamName">
        <restriction base="kdab:LimitedString">
        </restriction>
      </simpleType>
      <simpleType name="EmployeeTypeEnum">
        <restriction base="xsd:string">
          <enumeration value="Janitor"/>
          <enumeration value="Developer"/>
          <enumeration value="Tester"/>
          <enumeration value="TeamLeader"/>
          <enumeration value="CEO"/>
        </restriction>
      </simpleType>
      <simpleType name="TelegramType">
        <restriction base="xsd:hexBinary">
          <minLength value="2"></minLength>
        </restriction>
      </simpleType>
      <element name="Telegram" type="kdab:TelegramType"/>
      <element name="TelegramRequest">
        <complexType>
          <sequence>
            <element name="TelegramHex" type="kdab:TelegramType"/>
            <element name="TelegramBase64" type="xsd:base64Binary"/>
          </sequence>
        </complexType>
      </element>
      <element name="TelegramResponse">
        <complexType>
          <sequence>
            <element name="TelegramHex" type="kdab:TelegramType"/>
            <element name="TelegramBase64" type="xsd:base64Binary"/>
          </sequence>
        </complexType>
      </element>
      <element name="EmployeeType">
        <complexType>
          <sequence>
            <element name="otherRoles" type="kdab:EmployeeTypeEnum" minOccurs="0" maxOccurs="unbounded"/>
            <sequence maxOccurs="3">
             <element name="team" type="kdab:TeamName"/>
            </sequence>
          </sequence>
          <attribute name="type" type="kdab:EmployeeTypeEnum"/>
        </complexType>
      </element>
      <complexType name="EmployeeAchievement">
        <all>
         <element name="type" type="xsd:hexBinary"/>
         <element name="label" type="xsd:string"/>
         <element name="time" type="xsd:anySimpleType"/>
        </all>
      </complexType>
      <complexType name="EmployeeAchievements">
        <complexContent>
          <restriction base="soap-enc:Array">
            <attribute ref="soap-enc:arrayType" wsdl:arrayType="kdab:EmployeeAchievement[]"/>
          </restriction>
        </complexContent>
      </complexType>
      <complexType name="EmployeeId">
        <complexContent>
          <restriction base="xsd:anyType"> <!-- just testing, not very useful -->
            <sequence>
              <element name="id" type="xsd:nonNegativeInteger"/>
            </sequence>
          </restriction>
        </complexContent>
      </complexType>
      <complexType name="AddEmployee">
        <sequence>
         <element name='employeeType' type='kdab:EmployeeType'/>
         <element name='employeeName' type='kdab:Employee.Name'/>
         <element name='employeeCountry' type='kdab:LimitedString'/>
         <element name='employeeAchievements' type='kdab:EmployeeAchievements'/>
         <element name='employeeId' type='kdab:EmployeeId'/>
        </sequence>
       </complexType>

      <element name="addEmployee" type="kdab:AddEmployee"/>
      <element name="delayedAddEmployee" type="kdab:AddEmployee"/>
      <element name="addEmployeeMyResponse" type="xsd:hexBinary"/>
      <element name="delayedAddEmployeeMyResponse" type="xsd:hexBinary"/>
      <element name="EmployeeNameParams">
        <complexType>
          <sequence>
            <element name='employeeName' type='kdab:Employee.Name'/>
          </sequence>
        </complexType>
      </element>

      <element name="EmployeeCountryResponse">
        <complexType>
          <sequence>
            <element name='employeeCountry' type='kdab:LimitedString'/>
          </sequence>
        </complexType>
      </element>

      <element name="AnyType">
        <complexType>
          <sequence>
           <element ref="xsd:schema" />
           <element name="input" type="xsd:anyType"/>
          </sequence>
        </complexType>
      </element>
      <element name="AnyTypeResponse">
        <complexType>
          <sequence>
            <element ref="xsd:schema" />
            <element name="return" type="xsd:anyType" minOccurs="0" maxOccurs="unbounded"/>
            <any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/2001/XMLSchema" processContents="lax" />
            <any minOccurs="1" namespace="urn:schemas-microsoft-com:xml-diffgram-v1" processContents="lax" />
          </sequence>
        </complexType>
      </element>

      <element name="LoginElement">
        <complexType>
          <sequence>
          <element name="user" type="xsd:string"/>
          <element name="pass" type="xsd:string"/>
          </sequence>
        </complexType>
      </element>
      <element name="SessionElement">
        <complexType>
          <sequence>
            <element name="sessionId" type="xsd:string"/>
          </sequence>
        </complexType>
      </element>
    </xsd:schema>
  </types>
  <message name='addEmployee'>
    <part element="kdab:addEmployee" name="parameters"/>
  </message>
  <message name='addEmployeeResponse'>
    <part element="kdab:addEmployeeMyResponse" name="parameters"/>
  </message>

  <message name='delayedAddEmployee'>
    <part element="kdab:delayedAddEmployee" name="parameters"/>
  </message>
  <message name='delayedAddEmployeeResponse'>
    <part element="kdab:delayedAddEmployeeMyResponse" name="parameters"/>
  </message>

  <message name='testAnyType'>
    <part element="kdab:AnyType" name="parameters"/>
  </message>
  <message name='testAnyTypeResponse'>
    <part element="kdab:AnyTypeResponse" name="parameters"/>
  </message>

  <message name='getEmployeeCountry'>
     <part name='parameters' element='kdab:EmployeeNameParams'/>
  </message>
  <message name='getEmployeeCountryResponse'>
     <part name='parameters' element='kdab:EmployeeCountryResponse'/>
  </message>

  <message name='getEmployeeType'>
     <part name='parameters' element='kdab:EmployeeNameParams'/>
  </message>
  <message name='getEmployeeTypeResponse'>
     <part name='parameters' element='kdab:EmployeeType'/>
  </message>

  <!-- no parameters -->
  <message name='listEmployees'>
  </message>
  <message name='listEmployeesResponse'>
     <!-- todo -->
  </message>
  <message name='heartbeatRequest'>
  </message>

  <!-- Document/literal not wrapped -->
  <message name='sendRawTelegramRequest'>
     <part element='kdab:Telegram' name='telegram'/>
  </message>
  <message name='sendRawTelegramResponse'>
     <part element='kdab:Telegram' name='telegram'/>
  </message>

  <!-- Document/literal wrapped -->
  <message name='sendTelegramRequest'>
     <part element='kdab:TelegramRequest' name='parameters'/>
  </message>
  <message name='sendTelegramResponse'>
     <part element='kdab:TelegramResponse' name='parameters'/>
  </message>

  <message name="Header">
    <part element="kdab:LoginElement" name="LoginHeader"/>
    <part element="kdab:SessionElement" name="SessionHeader"/>
    <part element="kdab:SessionElement" name="OutputHeader"/>
  </message>

  <portType name='MyWsdlPortType'>
    <operation name='addEmployee'>
      <input message='kdab:addEmployee' />
      <output message='kdab:addEmployeeResponse' />
    </operation>
    <operation name='delayedAddEmployee'>
      <input message='kdab:delayedAddEmployee' />
      <output message='kdab:delayedAddEmployeeResponse' />
    </operation>
    <operation name='testAnyType'>
      <input message='kdab:testAnyType' />
      <output message='kdab:testAnyTypeResponse' />
    </operation>
    <operation name='getEmployeeCountry'>
      <input message='kdab:getEmployeeCountry' />
      <output message='kdab:getEmployeeCountryResponse' />
    </operation>
    <operation name='getEmployeeType'>
      <input message='kdab:getEmployeeType' />
      <output message='kdab:getEmployeeTypeResponse' />
    </operation>
    <operation name='listEmployees'>
      <input message='kdab:listEmployees' />
      <output message='kdab:listEmployeesResponse' />
    </operation>
    <operation name='sendRawTelegram'>
      <input message='kdab:sendRawTelegramRequest' />
      <output message='kdab:sendRawTelegramResponse' />
    </operation>
    <operation name='sendTelegram'>
      <input message='kdab:sendTelegramRequest' />
      <output message='kdab:sendTelegramResponse' />
    </operation>
    <operation name='heartbeat'> <!-- One way operation -->
      <input message='kdab:heartbeatRequest' />
    </operation>
  </portType>
  <binding name='MyWsdlBinding' type='kdab:MyWsdlPortType' >
    <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http' />
    <operation name='addEmployee' >
      <soap:operation soapAction='http://www.kdab.com/AddEmployee' />
      <input>
        <soap:header use="literal" message="kdab:Header" part="LoginHeader"/>
        <soap:header use="literal" message="kdab:Header" part="SessionHeader"/>
        <soap:body use='literal'/>
      </input>
      <output>
        <soap:header use="literal" message="kdab:Header" part="OutputHeader"/>
        <soap:body use='literal'/>
      </output>
    </operation>
    <operation name='delayedAddEmployee' >
      <soap:operation soapAction='http://www.kdab.com/DelayedAddEmployee' />
      <input>
        <soap:header use="literal" message="kdab:Header" part="LoginHeader"/>
        <soap:header use="literal" message="kdab:Header" part="SessionHeader"/>
        <soap:body use='literal'/>
      </input>
      <output>
        <soap:body use='literal'/>
      </output>
    </operation>
    <operation name='testAnyType'>
    </operation>
    <operation name='getEmployeeCountry'>
      <soap:operation soapAction='www.kdab.com/GetEmployeeCountryAction' />
      <input>
        <soap:body use='literal'/>
      </input>
      <output>
        <soap:body use='literal'/>
      </output>
    </operation>
    <operation name='getEmployeeType'>
      <input>
        <soap:body use='literal'/>
      </input>
      <output>
        <soap:body use='literal'/>
      </output>
    </operation>
    <operation name='listEmployees'>
      <soap:operation soapAction='http://www.kdab.com/PleaseListEmployees' />
      <input>
        <soap:body use='literal'/>
      </input>
      <output>
        <soap:body use='literal'/>
      </output>
    </operation>
    <operation name='sendRawTelegram'>
      <input>
        <soap:body use='literal'/>
      </input>
      <output>
        <soap:body use='literal'/>
      </output>
    </operation>
    <operation name='sendTelegram'>
      <soap:operation soapAction='http://www.kdab.com/SendTelegram' />
      <input>
        <soap:body use='literal'/>
      </input>
      <output>
        <soap:body use='literal'/>
      </output>
    </operation>
  </binding>
  <service name='MyWsdlDocument' >
    <port name='MyWsdlPortType' binding='kdab:MyWsdlBinding' >
      <soap:address location='http://127.0.0.1:4242/xml/mywsdl.wsdl' />
    </port>
  </service>
</definitions>
