<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:apache="http://xml.apache.org/xml-soap"
    targetNamespace="urn:attachments.wsdl.test"
    xmlns:tns="urn:attachments.wsdl.test">
  <types>
    <schema
        xmlns="http://www.w3.org/2001/XMLSchema"
        targetNamespace="urn:attachments.wsdl.test">
      <element name="GetCompanyInfo">
        <complexType>
          <sequence>
            <element name="tickerSymbol" type="xsd:string"/>
          </sequence>
        </complexType>
      </element>
      <element name="GetCompanyInfo2">
        <complexType>
          <sequence>
            <element name="result" type="xsd:float"/>
          </sequence>
        </complexType>
      </element>
    </schema>
  </types>

  <message name="empty"/>
  <message name="pt1">
    <part name="body" element="tns:GetCompanyInfo"/>
  </message>
  <message name="pt2">
    <part name="body" element="tns:GetCompanyInfo2"/>
    <part name="docs" type="xsd:string"/>
    <part name="logo" type="xsd:hexBinary"/>
  </message>
  <message name="pt3">
    <part name="body" type="xsd:string"/>
  </message>
  <message name="pt4">
    <part name="out" type="xsd:string"/>
  </message>
  <message name="mmp3">
    <part name="body" type="xsd:string"/>
  </message>
  <message name="mmp4">
    <part name="out" type="xsd:string"/>
  </message>
  <message name="EchoAttachmentIn">
    <part name="In" type="xsd:base64Binary"/>
  </message>
  <message name="EchoAttachmentOut">
      <part name="Out" type="xsd:base64Binary"/>
  </message>

  <portType name="pt1">
<!--
    <operation name="GetCompanyInfo">
      <input message="tns:pt1"/>
      <output message="tns:pt2"/>
    </operation>
-->
    <operation name="GetCompanyInfo2">
      <input message="tns:pt2"/>
      <output message="tns:pt1"/>
    </operation>
    <operation name="inputPlainText">
      <input message="tns:pt3"/>
      <output message="tns:empty"/>
    </operation>
    <operation name="inoutPlainText">
      <input message="tns:pt3"/>
      <output message="tns:pt3"/>
    </operation>
    <operation name="echoPlainText">
      <input message="tns:pt3"/>
      <output message="tns:pt4"/>
    </operation>
    <operation name="outputPlainText">
      <input message="tns:empty"/>
      <output message="tns:pt3"/>
    </operation>
    <operation name="inputMimeMultipart">
      <input message="tns:mmp3"/>
      <output message="tns:empty"/>
    </operation>
    <operation name="inoutMimeMultipart">
      <input message="tns:mmp3"/>
      <output message="tns:mmp3"/>
    </operation>
    <operation name="echoMimeMultipart">
      <input message="tns:mmp3"/>
      <output message="tns:mmp4"/>
    </operation>
    <operation name="outputMimeMultipart">
      <input message="tns:empty"/>
      <output message="tns:mmp3"/>
    </operation>
    <operation name="EchoAttachment">
        <input name="EchoAttachmentInput" message="tns:EchoAttachmentIn"/>
        <output name="EchoAttachmentOutput" message="tns:EchoAttachmentOut"/>
    </operation>
  </portType>

  <binding name="b1" type="tns:pt1">
    <soap:binding style="rpc"
                  transport="http://schemas.xmlsoap.org/soap/http"/>
<!--
    <operation name="GetCompanyInfo">
      <soap:operation soapAction="http://example.com/GetCompanyInfo"/>
      <input>
        <soap:body use="literal"/>
      </input>
      <output>
       <mime:multipartRelated>
          <mime:part>
            <soap:body parts="body" use="literal"/>
          </mime:part>
          <mime:part>
            <mime:content part="docs" type="text/plain"/>
          </mime:part>
          <mime:part>
            <mime:content part="logo" type="image/gif"/>
            <mime:content part="logo" type="image/jpeg"/>
          </mime:part>
        </mime:multipartRelated>
      </output>
    </operation>
-->
    <operation name="GetCompanyInfo2">
      <soap:operation soapAction="http://example.com/GetCompanyInfo2"/>
      <input>
       <mime:multipartRelated>
          <mime:part>
            <soap:body parts="body" use="literal"/>
          </mime:part>
          <mime:part>
            <mime:content part="docs" type="text/plain"/>
          </mime:part>
          <mime:part>
            <mime:content part="logo" type="image/gif"/>
            <mime:content part="logo" type="image/jpeg"/>
          </mime:part>
        </mime:multipartRelated>
      </input>
      <output>
        <soap:body use="literal"/>
      </output>
    </operation>
    <operation name="inputPlainText">
      <soap:operation soapAction=""/>
      <input>
       <mime:multipartRelated>
          <mime:part>
            <mime:content part="body" type="text/plain"/>
          </mime:part>
        </mime:multipartRelated>
      </input>
      <output>
        <soap:body use="encoded"/>
      </output>
    </operation>
    <operation name="inoutPlainText">
      <soap:operation soapAction=""/>
      <input>
       <mime:multipartRelated>
          <mime:part>
            <mime:content part="body" type="text/plain"/>
          </mime:part>
        </mime:multipartRelated>
      </input>
      <output>
       <mime:multipartRelated>
          <mime:part>
            <mime:content part="body" type="text/plain"/>
          </mime:part>
        </mime:multipartRelated>
      </output>
    </operation>
    <operation name="echoPlainText">
      <soap:operation soapAction=""/>
      <input>
       <mime:multipartRelated>
          <mime:part>
            <mime:content part="body" type="text/plain"/>
          </mime:part>
        </mime:multipartRelated>
      </input>
      <output>
       <mime:multipartRelated>
          <mime:part>
            <mime:content part="out" type="text/plain"/>
          </mime:part>
        </mime:multipartRelated>
      </output>
    </operation>
    <operation name="outputPlainText">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="encoded"/>
      </input>
      <output>
       <mime:multipartRelated>
          <mime:part>
            <mime:content part="body" type="text/plain"/>
          </mime:part>
        </mime:multipartRelated>
      </output>
    </operation>
    <operation name="inputMimeMultipart">
      <soap:operation soapAction=""/>
      <input>
       <mime:multipartRelated>
          <mime:part>
            <mime:content part="body" type="multipart/related"/>
          </mime:part>
        </mime:multipartRelated>
      </input>
      <output>
        <soap:body use="encoded"/>
      </output>
    </operation>
    <operation name="inoutMimeMultipart">
      <soap:operation soapAction=""/>
      <input>
       <mime:multipartRelated>
          <mime:part>
            <mime:content part="body" type="multipart/related"/>
          </mime:part>
        </mime:multipartRelated>
      </input>
      <output>
       <mime:multipartRelated>
          <mime:part>
            <mime:content part="body" type="multipart/related"/>
          </mime:part>
        </mime:multipartRelated>
      </output>
    </operation>
    <operation name="echoMimeMultipart">
      <soap:operation soapAction=""/>
      <input>
       <mime:multipartRelated>
          <mime:part>
            <mime:content part="body" type="multipart/related"/>
          </mime:part>
        </mime:multipartRelated>
      </input>
      <output>
       <mime:multipartRelated>
          <mime:part>
            <mime:content part="out" type="multipart/related"/>
          </mime:part>
        </mime:multipartRelated>
      </output>
    </operation>
    <operation name="outputMimeMultipart">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="encoded"/>
      </input>
      <output>
       <mime:multipartRelated>
          <mime:part>
            <mime:content part="body" type="multipart/related"/>
          </mime:part>
        </mime:multipartRelated>
      </output>
    </operation>
    <operation name="EchoAttachment">
        <soap:operation soapAction="http://soapinterop.org/attachments/"/>
        <input name="EchoAttachmentInput">
            <mime:multipartRelated>
                <mime:part>
                    <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </mime:part>
                <mime:part>
                    <mime:content part="In" type="application/octetstream"/>
                </mime:part>
            </mime:multipartRelated>
        </input>
        <output name="EchoAttachmentOutput">
            <mime:multipartRelated>
                <mime:part>
                    <soap:body use="encoded" namespace="http://soapinterop.org/attachments/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </mime:part>
                <mime:part>
                    <mime:content part="Out" type="application/octetstream"/>
                </mime:part>
            </mime:multipartRelated>
        </output>
    </operation>
  </binding>

<!-- I want to do a document style binding, too, but it doesn't work yet -->

  <service name="Attachment">
    <port name="AttachmentPortRPC" binding="tns:b1">
      <soap:address location="http://localhost:8080/axis/services/AttachmentPortRPC"/>
    </port>
<!-- doc doesn't work yet
    <port name="AttachmentPortDoc" binding="tns:b2">
      <soap:address location="http://localhost:8080/axis/services/AttachmentPortDoc"/>
    </port>
-->
  </service>

</wsdl:definitions> 
