Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMElement.build()


     * @return
     */
    public static OMElement toDOOM(OMFactory factory, OMElement element){
        StAXOMBuilder builder = new StAXOMBuilder(factory, element.getXMLStreamReader());
        OMElement elem = builder.getDocumentElement();
        elem.build();
        return elem;
    }
   
}
View Full Code Here


            return null;
        }

        try {
            document = OMXMLBuilderFactory.createOMBuilder(is).getDocumentElement();
            document.build();
            is.close();
        } catch (OMException e) {
            handleException("Error while parsing the content of the file: " + file.getName(), e);
        } catch (IOException e) {
            log.warn("Error while closing the input stream from the file: " + file.getName(), e);
View Full Code Here

        //Read the source and generate a map of the
        Map generatedMap = new HashMap();

        OMElement config = staxOMBuilder.getDocumentElement();
        config.build();
        Iterator serviceItr = config.getChildrenWithName(new QName(DeprecationConstants.CFG_DEPRECATION_SERVICE));

        while (serviceItr.hasNext()) {
            OMElement serviceEle = (OMElement) serviceItr.next();
            String serviceKey = serviceEle.getAttributeValue(new QName("Id"));
View Full Code Here

           StAXOMBuilder staxOMBuilder;
           staxOMBuilder = new StAXOMBuilder(inStream);
           Map generatedMap = new HashMap();
           OMElement config = staxOMBuilder.getDocumentElement();
           config.build();
           Iterator clientItr = config.getChildrenWithName(new QName("slaRequest"));
           while (clientItr.hasNext()) {
               OMElement clientEle = (OMElement) clientItr.next();
               String enabled = clientEle.getAttributeValue(new QName("enabled"));
               boolean isClientEnabled = enabled.equalsIgnoreCase("true");
View Full Code Here

        // FIXME: [rfeng] We have to pay performance penalty to build the complete OM as the operationClient.complete() will
        // release the underlying HTTP connection.
        // Force the response to be populated, see https://issues.apache.org/jira/browse/TUSCANY-1541
        if (response != null) {
            response.build();
        }

        operationClient.complete(requestMC);

        return response;
View Full Code Here

        try {
            root = new StAXOMBuilder(is).getDocumentElement();
        } catch (XMLStreamException e) {
            handleException("Error parsing Synapse configuration : " + e.getMessage(), e);
        }
        root.build();

        OMContainer definitions = root.getFirstChildWithName(Constants.DEFINITIONS_ELT);
        if (definitions != null) {

            Iterator iter = definitions.getChildren();
View Full Code Here

      if (responseMessage == null) {
        throw AxisFault.makeFault(new RuntimeException(
            "no response recieved for subscription message"));
      }

      responseMessage.build(); // free the input stream.

    } finally {
      serviceClient.cleanupTransport();
    }
View Full Code Here

        // FIXME: [rfeng] We have to pay performance penalty to build the complete OM as the operationClient.complete() will
        // release the underlying HTTP connection.
        // Force the response to be populated, see https://issues.apache.org/jira/browse/TUSCANY-1541
        if (response != null) {
            response.build();
        }

        operationClient.complete(requestMC);

        return response;
View Full Code Here

      doomElement.setText(text);
      llomRoot.addChild(doomElement);
     
      OMElement newElement = (new StAXOMBuilder(this.factory, llomRoot
        .getXMLStreamReader())).getDocumentElement();
    newElement.build();
    OMElement secondElement = newElement.getFirstElement();
    assertNotNull(secondElement);
    assertEquals(secondElement.getText(),text);   
    }
   
View Full Code Here

      OMText doomText = doomFactory.createOMText(text);
      llomRoot.addChild(doomText);
     
      OMElement newElement = (new StAXOMBuilder(this.factory, llomRoot
        .getXMLStreamReader())).getDocumentElement();
    newElement.build();
    assertEquals(newElement.getText(),text);   
    }
   
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.