tags:

views:

129

answers:

0

Hi, I'm trying to figure out how to serialize an Axis2 generated ADBBean. The problem is that the instead of getting the entire payload, i'm only getting a serialized version of the first child element.

Here is what I'm doing

Foo foo = new Foo();
foo.setBar("xyz");
System.out.println("XML String ==> " + serialize(foo));
//etc
public String serialize(ADBBean bean) {
  XMLStreamReader reader = bean.getPullParser(null);
  OMElement omElt =  new StAXOMBuilder(reader).getDocumentElement();
  return omElt.toStringWithConsume();
}

This resource says that this should work: http://ws.apache.org/axis2/1_0/adb/adb-howto.html

This appears to be addressed in other places, but without a response:

Thanks