I have a legacy Java webservice based on Axis2. This webservice classes consist of:
- a service interface (generated from WSDL);
- an implementation of the service (written in-house);
- a bunch of autogenerated entity-like classes representing requests and responses.
I also have a requirement to extract and cache part of one of the responses to XML (ultimately going to the filesystem as a well-formed document). I've been hacking around with the getOMElement()
method on the response classes for serialisation, but to no avail. The deserialise looks easier, as the generated classes all have a Factory
static member that will take XML in and produce objects.
how can I serialise a subset of the strongly-typed object graph to XML in a way that the generated Axis2 Factory
can subsequently deserialise?
ps: I'm stuck with Axis2. Yes, this is very easy with (say) xfire...