Attachments are not yet supported in stubs/skels.  You must use the Call
object directly if you want to have attachments.  When we DO support
attachments, it'll be based on JAX-RPC, chapter 7
(http://jcp.org/aboutJava/communityprocess/first/jsr101/index.html).

Russell Butek
[EMAIL PROTECTED]


"Frederic Desjarlais" <[EMAIL PROTECTED]> on 05/06/2002 05:17:31 PM

Please respond to [EMAIL PROTECTED]

To:    <[EMAIL PROTECTED]>
cc:
Subject:    Attachments supported with WSDL2Java?




I've attached a WSDL file that is loosely based on section 5 of the WSDL
specification (on the MIME binding).

The wsdl:binding section of the attached WSDL looks like this:

---- START HERE ----
    <binding name="b1" type="tns:pt1">
     <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="GetCompanyInfo">
           <soap:operation
soapAction="http://webservice.xyz.com/GetCompanyInfo"/>
           <input>
               <soap:body use="encoded"
namespace="http://webservice.xyz.com/mimetest.wsdl";
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
           </input>
           <output>
               <mime:multipartRelated>
                   <mime:part>
                       <soap:body parts="body" use="encoded"
namespace="http://webservice.xyz.com/mimetest.wsdl";
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                   </mime:part>
                   <mime:part>
                       <mime:content part="docs" type="text/html"/>
                   </mime:part>
                   <mime:part>
                       <mime:content part="logo" type="image/gif"/>
                       <mime:content part="logo" type="image/jpeg"/>
                   </mime:part>
               </mime:multipartRelated>
           </output>
        </operation>
    </binding>
---- END HERE ----


I ran WSDL2Java against the WSDL, and the interface I obtained was:

---- START HERE ----
public interface CompanyInfoService extends javax.xml.rpc.Service {
    public String getCompanyInfoPortAddress();

    public com.xyz.webservice.Pt1 getCompanyInfoPort() throws
javax.xml.rpc.ServiceException;

    public com.xyz.webservice.Pt1 getCompanyInfoPort(java.net.URL
portAddress) throws javax.xml.rpc.ServiceException;
}
---- END HERE ----


The com.xyz.webservice.Pt1 class looks like this:

---- START HERE ----
public interface Pt1 extends java.rmi.Remote {
    public void getCompanyInfo() throws java.rmi.RemoteException;
}
---- END HERE ----


I don't see a way of obtaining the attachment(s).  Is the WSDL wrong or
does
Axis not support this via the generated stubs/skels?  Any advice on how
attachments can be obtained when making use of WSDL would be helpful.


Thanks,
Frederic







Reply via email to