Yes, just use arrays instead of vectors and maps.
A map is just an array of objects with two fields: key and value.
Look at the API of your map's entrySet() method and java.util.Map.Entry
for details. I should not be hard to write this in XML and generate the
Java classes.
Regards,
Dies
faizul sulaiman wrote:
Ok. For this example, I guest it is good to convert it
to array. But in my project, I also got other services
that need to be put in a vector or hashmap
(actually,it is structure of a dictionary entry).
That’s why I need to know whether this can be done?
If not, I can just stop working with this structure
and find other solution.
I stuck for 2 weeks now. :)
--- Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
Better to convert the Vector to an array.
On 2/22/06, faizul sulaiman
<[EMAIL PROTECTED]> wrote:
Hi,
I'm building a service which returns a complex
java
object that holds a vector of object.
I generated the server site and client stub using
axis
1.3 tools.
Everything was OK in the server site. However, I
got
an error when executing the client code.
Exception in thread "main" AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXParseException:
Premature
end of file.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException:
Premature end of file.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at
org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown
Source)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
….
And also an error about type mapping in tomcat
console:
java.io.IOException No serializer found for class
dw.lexicon.bean.GeneralObj in registry
[EMAIL PROTECTED]
Is it possible for axis to serialize an object
that
contains a vector of object?
This is how the object looks like:
GeneralObj.java:
- String message
- Vector lexicon (hold the Lexicon bean)
Lexicon.java:
- String source
- String target
---------------------------------------------
Mohd Faizul Sulaiman
------------------------------
__________________________________________________________
Find your next car at http://autos.yahoo.ca
---------------------------------------------
Mohd Faizul Sulaiman
------------------------------
__________________________________________________________
Find your next car at http://autos.yahoo.ca
--
Dies KOPER <[EMAIL PROTECTED]> (changed on 1 July 2005)
Fujitsu Ltd - MWPF1 (changed from MWPF3 on 21 Nov 2005)
2-15-16, Shin-Yokohama, Kouhoku-ku, Yokohama, 222-0033, Japan
Tel. +81(45)-475-5605 (internal 7181-4217)