wood burning stoves 2.0*
The moose likes Web Services and the fly likes how to define array of stations in LoginResponse complex type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "how to define array of stations in LoginResponse complex type" Watch "how to define array of stations in LoginResponse complex type" New topic
Author

how to define array of stations in LoginResponse complex type

maha laxmi
Ranch Hand

Joined: Sep 23, 2005
Posts: 68
this is wsdl created on my own;

in the webservice class i have method takes 2 string arguments it returns LoginResponse object;

in the LoginResponse object along with id,userName,userId i want stationList which retuns array of stations;

how to define array of stations in LoginResponse complex type;

LoginResponsegetLogin(String userid,String password)
{

}

<xsd:element name="userID">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="8"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Password">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="5"/>
<xsd:maxLength value="8"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>

<xsd:element name="LoginResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="id" nillable="true" type="xsd:long"/>
<xsd:element name="userName" nillable="true" type="xsd:string"/>
<xsd:element name="userId" nillable="true" type="xsd:string"/>
<xsd:element name="stationList" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
hamlin stephen
Ranch Hand

Joined: Dec 11, 2003
Posts: 45
Please use
<xsd:element name="stationList" nillable="true" type="xsd:string" maxOccurs="unbounded" />
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to define array of stations in LoginResponse complex type
 
Similar Threads
XSD Conditional
Problem related to XML validation using XSD
Schema rules question (xsd file)
XSD problem
weblogic home page sample request not generated