Hi all.I'm trying to reuse the Axis serialization classes to store an xml version of some objects in a service. The goal is to reuse a couple of xsl stylesheets that go over the soap responses from the service directly on this objects.
I got to a point where the serialization is done, but not completely. I also
found that the code in 1.2 is much nicer and easy to use, but for the moment
i'm stuck with 1.1.
So here's the snippet of code i use:
SerializerFactory fct = BaseSerializerFactory.createFactory(
ArraySerializerFactory.class,
TransferActivity[].class,
new QName("http://glite.org/wsdl/services/org.glite.data.transfer.stats",
"ArrayOf_tns3_TransferActivity"));
Serializer ser = (Serializer)fct.getSerializerAs(Constants.AXIS_SAX);
MessageContext ctx = new MessageContext(new Service().getEngine());
ctx.reset();
StringWriter sw = new StringWriter();
SerializationContext sc = new SerializationContextImpl(sw, ctx);
as.serialize(new
QName("http://glite.org/wsdl/services/org.glite.data.transfer.stats",
"ArrayOf_tns3_TransferActivity"), null, activities, sc);
And here is the xml result in the StringWriter:
<?xml version="1.0" encoding="UTF-8"?>
<ns1:ArrayOf_tns3_TransferActivity soapenc:arrayType="xsd:anyType[4]" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://glite.org/wsdl/services/org.glite.data.transfer.stats">
<item href="#id1"/> <item href="#id2"/> <item href="#id3"/> <item href="#id4"/> </ns1:ArrayOf_tns3_TransferActivity> Problem with this is that i don't get the information linked by the identifiers in the message above anywhere. Is there a way i can force it to generate all info? I wasn't sure if this belongs better in axis-user or axis-dev, but here it goes. If you know another way to do this i would appreciate too. Thanks in advance, Ricardo
smime.p7s
Description: S/MIME Cryptographic Signature
