aspose file tools*
The moose likes Web Services and the fly likes java.util.Vector and XSD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "java.util.Vector and XSD" Watch "java.util.Vector and XSD" New topic
Author

java.util.Vector and XSD

Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
Hi All,

How do we represent a java.util.Vector in xsd file. Can anyone give some code snippet since a vector can contain any type of java objects.

Also, in the below code snippet which is a xsd representation for java.util.Vector

<element name="vector">
<complexType>
<sequence>
<element minOccurs="0" maxOccurs="unbounded" name="item" type="xsd:string"/>
</sequence>
</complexType>
</element>


I think we are saying that a vector can only contain string objects but not any other type of java objects. Am I right ?



Please suggest ...


Thanks & Regards,
Kumar.


RR Kumaran
SCJP 1.4
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12671
    
    5
You will find things much simpler if you just convert Vectors to arrays - it really is easy to do and your service will much more likely to be portable. Think about it - a Vector is just a growable array - there is probably no reason for any web service client to want anything but an array.
See the toArray() method in Vector.
Bill


Java Resources at www.wbrogden.com
JeanLouis Marechaux
Ranch Hand

Joined: Nov 12, 2001
Posts: 906
Is it the same question that this one you posted just before ??


/ JeanLouis<br /><i>"software development has been, is, and will remain fundamentally hard" (Grady Booch)</i><br /> <br />Take a look at <a href="http://www.epfwiki.net/wikis/openup/" target="_blank" rel="nofollow">Agile OpenUP</a> in the Eclipse community
Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
both are related but I am expecting answers to each one of those ...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.util.Vector and XSD
 
Similar Threads
java.io.IOException: Type {http://lang.java}Exception is referenced but not defined.
problem with WSDL2Java and nested complex types
Defining XSD for an XML file with constraint on the contents of a tag
XML Schema: Use of Import
Web Services Question in WebSphere