<?xml version="1.0" encoding="UTF-8"?>
<definitions name="SwaTestService"
  targetNamespace="http://SwaTestService.org/wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://SwaTestService.org/wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:s="http://SwaTestService.org/xsd"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

  <types>
    <schema targetNamespace="http://SwaTestService.org/xsd" 
      xmlns:tns="http://SwaTestService.org/xsd"
      xmlns="http://www.w3.org/2001/XMLSchema"
      elementFormDefault="qualified">      

      <complexType name="InputRequest">
	    <sequence>
          <element name="message" type="string"/>
	    </sequence>
      </complexType>      

      <complexType name="OutputResponse">
	    <sequence>
          <element name="message" type="string"/>
	    </sequence>
      </complexType>
      
      <element name="InputRequest" type="tns:InputRequest"/>
      <element name="OutputResponse" type="tns:OutputResponse"/>      
    </schema>
  </types>

  <message name="messageInput">
    <part name="request" element="s:InputRequest"/>
    <part name="attach1" type="xsd:string"/>
    <part name="attach2" type="xsd:base64Binary"/>
  </message>

  <message name="messageOutput">
    <part name="response" element="s:OutputResponse"/>
    <part name="attach1" type="xsd:string"/>
    <part name="attach2" type="xsd:base64Binary"/>
  </message>

  <portType name="SwaTest">

    <operation name="echoMultipleAttachments">
      <input message="tns:messageInput"/>
      <output message="tns:messageOutput"/>
    </operation>

  </portType>


  <binding name="SwaTestSoapBinding" type="tns:SwaTest">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    
    <operation name="echoMultipleAttachments">
      <soap:operation/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body parts="request" use="literal"/>
            </mime:part>
            <mime:part>
              <mime:content part="attach1" type="application/octet-stream"/>
            </mime:part>
            <mime:part>
              <mime:content part="attach2" type="application/octet-stream"/>
            </mime:part>
          </mime:multipartRelated>
        </input>
        <output>
          <mime:multipartRelated>
            <mime:part>
              <soap:body parts="response" use="literal"/>
            </mime:part>
            <mime:part>
              <mime:content part="attach1" type="application/octet-stream"/>
            </mime:part>
            <mime:part>
              <mime:content part="attach2" type="application/octet-stream"/>
            </mime:part>
          </mime:multipartRelated>
        </output>        
     </operation>
    
  </binding>

  <service name="WSIDLSwaTestService">

    <port name="SwaTestOnePort" binding="tns:SwaTestSoapBinding">
      <soap:address location="http://localhost:8080/WSIDLSwaTest/jaxws/SwaTestOne"/>
    </port>

  </service>
  
</definitions>
