use of org.example.identity.ObjectFactory in project webservices-axiom by apache.
the class TestGetNameFromJAXBElement method runTest.
@Override
protected void runTest() throws Throwable {
OMFactory omFactory = metaFactory.getOMFactory();
ObjectFactory objectFactory = new ObjectFactory();
JAXBContext context = JAXBContext.newInstance(ObjectFactory.class);
JAXBElement<LinkIdentitiesType> jaxbElement = objectFactory.createLinkIdentities(new LinkIdentitiesType());
OMSourcedElement element = omFactory.createOMElement(new JAXBOMDataSource(context, jaxbElement));
assertEquals("http://www.example.org/identity", element.getNamespaceURI());
assertEquals("LinkIdentities", 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