axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wolfgang Vullhorst" <wvullho...@s-und-n.de>
Subject SerializationTester and Vector serialization
Date Thu, 18 Sep 2003 09:11:32 GMT
Hi,
  a few days ago I found a SerializationTester in this list (written by
Toshiyuki Kimura).
It works fine but I have a problem with the serialization of an object
"AnalysisRequest" that contains a Vector of "AnalysisRequestElement"
objects.

I registered the type mappings for "Request", "RequestElement" and Vector"
with

	SerializationTester st = new SerializationTester();
	st.registerTypeMapping(AnalysisRequest.class, new
QName("http://www.s-und-n.de/journal/analysis", "AnalysisRequest"),
BeanSerializerFactory.class, BeanDeserializerFactory.class);
	st.registerTypeMapping(AnalysisRequestElement.class, new
QName("http://www.s-und-n.de/journal/analysis", "AnalysisRequestElement"),
BeanSerializerFactory.class, BeanDeserializerFactory.class);
	st.registerTypeMapping(Vector.class, new
QName("http://www.s-und-n.de/journal/analysis", "AnalysisRequestElement"),
VectorSerializerFactory.class, VectorDeserializerFactory.class);
	st.test(req);	// <- req is an object of AnalysisRequest

The tester gives me the following result:

Your class : [de.sundn.prod.journal.analysis.definition.AnalysisRequest]
  ===> Serializer: [org.apache.axis.encoding.ser.BeanSerializer@13ad085]
  ========== Result: start ==========
  <?xml version="1.0" encoding="UTF-8"?>
<ns1:AnalysisRequest
xmlns:ns1="http://www.s-und-n.de/journal/analysis"><ns1:requests
href="#id0"/></ns1:AnalysisRequest>
  ========== Result: end   ==========
  *** Serialization was succeed !! ***


How can I configure the serializer to serialize the Vector too?
I tried the tester because I want to pass a java object as a part of a
message style SOAP request. Perhaps there is another way to do this?

Thanks for your help,
  Wolfgang


Mime
View raw message