axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dhanush Gopinath" <dhan...@mahindrabt.com>
Subject Is MimeBodyPart included as a type in AXIS ??? - To Send Attachemtn s
Date Fri, 14 May 2004 08:05:38 GMT

Hi All,

I am trying to send SOAP Message with attachment using Apache Axis Engine. 

This is my reference : http://www-106.ibm.com/developerworks/webservices/library/ws-soapatt/?open&l=930,t=grws

I declared my interface, created the wsdl file by Java2WSDL. Now my Webservice method takes
a parameter of type SOAPContext, so that i could extract the attachment .. the wsdl file for
that is as shown.

 <complexType name="SOAPContext">
    <sequence>
     <element name="baseURI" nillable="true" type="xsd:string"/>
     <element name="bodyPart" nillable="true" type="xsd:anyType" maxOccurs="unbounded"/>
     <element name="classLoader" nillable="true" type="xsd:anyType"/>
     <element name="contentType" nillable="true" type="xsd:string"/>
     <element name="count" type="xsd:int"/>
     <element name="propertyNames" nillable="true" type="xsd:anyType"/>
     <element name="rootPart" nillable="true" type="tns3:MimeBodyPart"/>
     <element name="rootPartSet" type="xsd:boolean"/>
     <element name="subType" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>

I modified the WSDL to include the mime part .. See below....

 <wsdl:input name="putMessageRequest">
       <mime:multipartRelated>
        <mime:part>
         <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:webservices.oexgateway.bt.com" parts="in0" />      
               </mime:part>
              <mime:part>
     <mime:content part="in1" type="image/gif"/>
              </mime:part>
     </mime:multipartRelated>
   </wsdl:input>


--------------

Now when i try running the WSDL2JAVA command  I get following exception


java.io.IOException: Type MimeBodyPart is referenced but not defined.
 at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:522)
 at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:422)
 at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:408)
 at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:393)
 at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
 at java.lang.Thread.run(Thread.java:536)

The org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined() method in SymbolTable.java
is throwing an Exception because it doesn't recognise the Type MimeBodyPart.(in red above)

Doesn't Axis Support this type ? If not what should be done to include this part as an attachment.

Please help me as I am stuck here for 2 days.

Thanks & Regards
Dhanush







*********************************************************
Disclaimer:         

This message (including any attachments) contains
confidential information intended for a specific
individual and purpose, and is protected by law.
If you are not the intended recipient, you should
delete this message and are hereby notified that
any disclosure, copying, or distribution of this
message, or the taking of any action based on it,
is strictly prohibited.

*********************************************************
Visit us at http://www.mahindrabt.com

Mime
View raw message