use of org.apache.axiom.soap.SOAPEnvelope in project webservices-axiom by apache.
the class TestGetFirstElementLocalNameWithParserNoLookahead method runTest.
@Override
protected void runTest() throws Throwable {
SOAPEnvelope orgEnvelope = soapFactory.getDefaultEnvelope();
OMElement payload = soapFactory.createOMElement("payload", soapFactory.createOMNamespace("urn:test", "p"), orgEnvelope.getBody());
OMElement child = soapFactory.createOMElement("child", null, payload);
soapFactory.createOMElement("grandchild", null, child);
SOAPModelBuilder builder = OMXMLBuilderFactory.createSOAPModelBuilder(metaFactory, new StringReader(orgEnvelope.toString()));
SOAPBody body = builder.getSOAPEnvelope().getBody();
body.getFirstElement().getFirstElement();
assertThat(body.getFirstElementLocalName()).isEqualTo("payload");
}
Aggregations