use of org.apache.axiom.ts.jaxb.beans.DocumentBean in project webservices-axiom by apache.
the class TestGetNameFromPlainObject method runTest.
@Override
protected void runTest() throws Throwable {
OMFactory omFactory = metaFactory.getOMFactory();
JAXBContext context = JAXBContext.newInstance(DocumentBean.class);
OMSourcedElement element = omFactory.createOMElement(new JAXBOMDataSource(context, new DocumentBean()));
assertEquals("http://ws.apache.org/axiom/test/jaxb", element.getNamespaceURI());
assertEquals("document", element.getLocalName());
assertFalse(element.isExpanded());
// Force expansion so that OMSourcedElement compares the namespace URI and local name
// provided by JAXBOMDataSource with the actual name of the element
element.getFirstOMChild();
}
Aggregations