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:
- http://markmail.org/search/?q=getPullParser+first+child#query:getPullParser%20first%20child+page:1+mid:nyxibd4k7jrdrmfz+state:results
- http://markmail.org/message/6gcbqpcrcsckcsmh
Thanks