You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Steve Loughran <st...@apache.org> on 2005/09/15 14:47:39 UTC
[Axis2] xbeans to OMElement conversion
I cant convert xbeans to Axiom.
This is my code
protected OMElement convertDirect(T document) {
XmlOptions writeOptions = new XmlOptions();
writeOptions.setSaveOuter();
writeOptions.setSaveUseOpenFrag(); **HERE**
XMLStreamReader reader = document.newXMLStreamReader(writeOptions);
OMXMLParserWrapper builder = createBuilder(reader);
//get the root element (in this case the envelope)
return builder.getDocumentElement();
}
-If I dont call setSaveUseOpenFrag, I only get the stuff inside the
element, not the element itself
-If I do call setSaveUseOpenFrag(), I get an anonymous OMException
org.apache.axis2.om.OMException
at
org.apache.axis2.om.impl.llom.builder.StAXBuilder.createOMText(StAXBuilder.java:148)
at
org.apache.axis2.om.impl.llom.builder.StAXOMBuilder.next(StAXOMBuilder.java:176)
at
org.apache.axis2.om.impl.llom.OMDocumentImpl.getDocumentElement(OMDocumentImpl.java:99)
at
org.apache.axis2.om.impl.llom.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:213)
at
org.smartfrog.services.deployapi.binding.Axis2Beans.convertDirect(Axis2Beans.java:136)
How do I go from XmlBeans to OM? Where should I be looking to see where
the databinding code generates the code to do exactly this?