Package org.apache.axiom.om

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


        doomRoot.addChild(llomText);
        doomRoot.addChild(comment);

        OMElement newElement = (new StAXOMBuilder(this.factory, doomRoot
                .getXMLStreamReader())).getDocumentElement();
        newElement.build();
        assertEquals(newElement.getText(), text);
    }

}
View Full Code Here


                "</SOAP-ENV:Envelope>";
        XMLStreamReader soap11Parser = XMLInputFactory.newInstance()
                .createXMLStreamReader(new StringReader(soap11Fault));
        StAXSOAPModelBuilder soap11Builder = new StAXSOAPModelBuilder(soap11Parser, null);
        OMElement element = soap11Builder.getDocumentElement();
        element.build();
        this.assertXMLEqual(soap11Fault, element.toString());
    }
}
View Full Code Here

    }

    public OMElement cloneOMElement() {
        OMElement clonedElement =
                new StAXOMBuilder(this.getXMLStreamReader(true)).getDocumentElement();
        clonedElement.build();
        return clonedElement;
    }

    public void setLineNumber(int lineNumber) {
        this.lineNumber = lineNumber;
View Full Code Here

                OMElement parent = null;
                if (serviceXMLFile.exists()) {
                    BufferedInputStream inputStream =
                            new BufferedInputStream(new FileInputStream(serviceXMLFile));
                    parent = OMElementHelper.getInstance().toOM(inputStream);
                    parent.build();
                    inputStream.close();
                    serviceXMLFile.delete();
                }
                serviceXMLFile.createNewFile();
View Full Code Here

                OutputStream os = new FileOutputStream(file);
                OMElement servicesXML =
                        ServiceDescriptionSerializer.serializeToServiceXML(
                                ruleServiceDescription, parent, AXIOM_XPATH_SERIALIZER);
                servicesXML.build();
                servicesXML.serialize(os);
            } catch (Exception e) {
                throw new RuleServiceManagementException("Cannot write services XML", e, log);
            }
View Full Code Here

            OutputStream os = new FileOutputStream(ruleFile);
            OMElement ruleServiceXML =
                    ServiceDescriptionSerializer.serializeToRuleServiceConfiguration(
                            ruleServiceDescription, NULL_NS,
                            AXIOM_XPATH_SERIALIZER, CONFIGURATION_EXTENSION_SERIALIZER);
            ruleServiceXML.build();
            ruleServiceXML.serialize(os);
        } catch (Exception e) {
            throw new RuleServiceManagementException("Cannot write to the rule service file : " +
                    ruleFile, e, log);
        }
View Full Code Here

            absoluteFile.createNewFile();

            OutputStream os = new FileOutputStream(file);
            OMElement servicesXML = createServicesXMLFromSpringBeans(
                    beanClasses, springContextRelLocation);
            servicesXML.build();
            servicesXML.serialize(os);
        } catch (Exception e) {
            String msg = bundle.getString("spring.cannot.write.services.xml");
            handleException(msg, e);
        }
View Full Code Here

            inputStream = new BufferedInputStream(new FileInputStream(new File(path)));
            XMLStreamReader parser = XMLInputFactory.newInstance().
                    createXMLStreamReader(inputStream);
            StAXOMBuilder builder = new StAXOMBuilder(parser);
            OMElement omElement = builder.getDocumentElement();
            omElement.build();
            return omElement;
        } catch (FileNotFoundException e) {
            String errorMessage = CEPConstants.CEP_CONF
                    + "cannot be found in the path : " + path;
            log.error(errorMessage, e);
View Full Code Here

            OutputStream os = new FileOutputStream(ruleFile);
            OMElement servicesXML =
                    ServiceDescriptionSerializer.serializeToRuleServiceConfiguration(
                            ruleServiceDescription, NULL_NS,
                            AXIOM_XPATH_SERIALIZER, CONFIGURATION_EXTENSION_SERIALIZER);
            servicesXML.build();
            servicesXML.serialize(os);
        } catch (Exception e) {
            throw new RuleServiceManagementException("Cannot write rule services XML", e, log);
        }
View Full Code Here

  }
 
  private OMElement loadXML(String filePath) throws Exception {
    FileInputStream in = new FileInputStream(filePath);
    OMElement dsElement = (new StAXOMBuilder(in)).getDocumentElement();
    dsElement.build();
    return dsElement;
  }
 
  private String getTestDBSDirectory() {
    return "." + File.separator + "src" + File.separator + "test"
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.