axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wolfgang Vullhorst" <>
Subject Retrieve result of a serialization as String or Document?
Date Fri, 05 Sep 2003 08:46:20 GMT
  is there a way to call the serialization of a bean object "manually" to
retrieve the result in a String?

I tried the following:

		QName qn = new QName("");
		BeanSerializer bs = new BeanSerializer(AnalysisRequest.class, qn);
		StringWriter sw = new StringWriter();
		SerializationContextImpl sci = new SerializationContextImpl(sw, new
MessageContext(new AxisClient()));
			bs.serialize(new QName("AnalysisRequest"), new AttributesImpl(), req,
		catch (IOException e)

This works fine for the class "AnalysisRequest" (although I don't have a
good feeling to create a new AxisClient).

I now have the following problem:
AnalysisRequest contains a Vector of AnalysisRequestElement objects.
When using the Service/Call methods to pass an AnalysisRequest object to a
Webservice I register 2 type mappings (for AnalysisRequest and for

Is there a better way to serialize my object(s) to a String (or Document)?
Is there a way to adapt the type mapping strategy to my own method?

Thanks in advance,
  Wolfgang Vullhorst

View raw message