You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Douglas Bitting <Do...@agile.com> on 2002/06/06 06:50:39 UTC

Question about WSDL & MIME

OK, so this doesn't directly relate to Axis, but indirectly it does... I'm trying to figure out what the WSDL should look like when dealing with MIME
data (i.e., SOAP w/ Attachments).

Let's say I have a method that I expose as a service.  The method signature is "public DataHandler getData()"  Does the WSDL look something like the
following (various bits ommitted for brevity)

...
<wsdl:message name="getDataRequest"/>
<wsdl:message name="getDataResponse">
  <wsdl:part name="return" type="tns1:DataHandler"/>
</wsdl:message>
...
<wsdl:binding ...>
  <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
  <wsdl:operation name="getData">
    <wsdlsoap:operation soapAction="..."/>
    <wsdl:input name="getDataRequest">
      <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                     namespace="..." use="encoded"/>
    <wsdl:input>
    <wsdl:output name="getDataResponse">
      <wsdlmime:multipartRelated>
        <wsdlmime:part>
          <wsdlsoap:body parts="" use="encoded"/>
        </wsdlmime:part>
        <wsdlmime:part>
          <wsdlmime:content part="return" type="application/octet-stream"/>
        </wsdlmime:part>
      </wsdlmime:multipartRelated>
    </wsdl:output>
  </wsdl:operation>
</wsdl:binding>
...

The main thing I'm confused about is whether the <wsdlsoap:body .../> is needed in the output portion.  As near as I can tell, the above would be
compliant with the WSDL 1.1 spec, as well as the JAX-RPC spec.  Am I close on this?  Should I be pestering a different mailing list?  :-)

Cheers,
--Doug

Doug Bitting
Agile Software
1 Almaden Blvd
San Jose, CA  95113
(408) 999-7120