I made this question time ago, but nobody answered.
I need attachments, and now I am specifying the attachment in the wsdl file like this:
    <xs:element name="Content" type="apachesoap:DataHandler" minOccurs="0" maxOccurs="unbounded"/>
 
But I need to specify more attributes in this element, because I don´t know how to write the element description to include attributes and besides that the WSDL2Java generates the correct stubs.
May be there is another form of doing attachments; if you know, please, let me know.
 
So my question is how can I get a element that is an attachment and also has attributes. The result would be similar to this:
<Content href="" myatt1="XXX" myatt2="XXX"/>
 
P.D.:
I tried:
    <xs:element name="Content" minOccurs="0" maxOccurs="unbounded">
       <xs:complexType>
        <xs:simpleContent>
         <xs:extension base="apachesoap:DataHandler">
           <xs:attribute name="type" type="tns:ContentQuality"/>
           <xs:attribute name="allowAdaptations" type="xs:boolean" use="optional"/>
         </xs:extension>
        </xs:simpleContent>
       </xs:complexType>
      </xs:element>
 
But it didn't work.
It generates a class extending SimpleType, and axis thinks that always is possible the String representation of the value. In few words, what you get is a call to the toString() method in the DataHandler class.
 
Thank you in advance

Reply via email to