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 Dennis Reil <ax...@reil-online.de> on 2002/05/03 15:10:23 UTC
Problems with WSDL2Java
I try to use a complex type in the wsdl-document.
The schema of the complex type is:
<xsd:element name="collection">
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="unbounded">
<xsd:element ref="tns:document"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="optional"/>
<xsd:attribute name="host" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
The element "document" is another complex type. So I think it can
be used to define the following:
<collection name="samplebookstore" host="www.bookstore.com">
<document>
...
</document>
<document>
...
</document>
...
</collection>
But when I use the wsdl2java-Tool to create the mapping classes, interfaces and stubs,
it generates a class Collection.java, which has a Document as member :
public class Collection implements java.io.Serializable {
private com.dnsalias.eVerlageWS.Document document;
private java.lang.String name; // attribute
private java.lang.String host; // attribute
...
}
I expected a class, which has the possibility to specify more than just one
document, i.e. an ArrayList containing the documents.
So, am I doing anything wrong ?
Do I have to implement the mapping classes on my own and specify them
in the deployment descriptor ?
Regards
Dennis Reil