Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMDocument.addChild()


            } else {
                envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
               
                // TODO: don't know why this is here, but without it some unit tests fail...
                OMDocument omDoc = OMAbstractFactory.getSOAP11Factory().createOMDocument();
                omDoc.addChild(envelope);
               
                SOAPBody body = envelope.getBody();
                OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXOMBuilder(parser);
                OMElement bodyElement = builder.getDocumentElement();
                if (addTextAroundBody) {
View Full Code Here


                    OMDocType doctype = (OMDocType)node;
                    factory.createOMDocType(omdoc, doctype.getValue());
                    break;
                case OMNode.ELEMENT_NODE:
                    Element el = (Element)node;
                    omdoc.addChild((OMNode)el.clone());
                    break;
                case OMNode.PI_NODE:
                    OMProcessingInstruction pi = (OMProcessingInstruction)node;
                    factory.createOMProcessingInstruction(omdoc, pi.getTarget(), pi.getValue());
                    break;
View Full Code Here

        // create a test synapse context
        TestMessageContext synCtx = new TestMessageContext();

        SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
        OMDocument omDoc = OMAbstractFactory.getSOAP11Factory().createOMDocument();
        omDoc.addChild(envelope);

        XMLStreamReader parser = XMLInputFactory.newInstance().
            createXMLStreamReader(new StringReader(bodyText));
        StAXOMBuilder builder = new StAXOMBuilder(parser);
View Full Code Here

        // create a test synapse context
        TestMessageContext synCtx = new TestMessageContext();

        SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
        OMDocument omDoc = OMAbstractFactory.getSOAP11Factory().createOMDocument();
        omDoc.addChild(envelope);

        XMLStreamReader parser = XMLInputFactory.newInstance().
            createXMLStreamReader(new StringReader(bodyText));
        StAXOMBuilder builder = new StAXOMBuilder(parser);
View Full Code Here

            soapVersion == SOAP11 ? OMAbstractFactory.getSOAP11Factory() : OMAbstractFactory.getSOAP12Factory());

        // create the SOAP fault document and envelope
        OMDocument soapFaultDocument = factory.createOMDocument();
        SOAPEnvelope faultEnvelope = factory.getDefaultFaultEnvelope();
        soapFaultDocument.addChild(faultEnvelope);

        // create the fault element
        SOAPFault fault = factory.createSOAPFault();

        // populate it
View Full Code Here

          OMDocType doctype = (OMDocType) node;
          factory.createOMDocType(omdoc, doctype.getValue());
          break;
        case OMNode.ELEMENT_NODE:
          Element el = (Element) node;
          omdoc.addChild((OMNode) el.clone());
          break;
        case OMNode.PI_NODE:
          OMProcessingInstruction pi = (OMProcessingInstruction) node;
          factory.createOMProcessingInstruction(omdoc, pi.getTarget(), pi.getValue());
          break;
View Full Code Here

      throws DataServiceFault {   
    OMElement result = (new SingleDataServiceRequest(dataService, operationName,
        params)).dispatch();
    /* result must have a parent, or there are problems when it comes to XPath expressions etc.. */
    OMDocument doc = OMAbstractFactory.getOMFactory().createOMDocument();
    doc.addChild(result);
    return doc.getOMDocumentElement();
  }
 
  /**
   * This method invokes the batch version of the operation defined in the given data service.
View Full Code Here

      String accessMethod) throws DataServiceFault {   
    OMElement result = (new SingleDataServiceRequest(dataService, Resource
        .generateRequestName(resourcePath, accessMethod),
        params)).dispatch();
    OMDocument doc = OMAbstractFactory.getOMFactory().createOMDocument();
    doc.addChild(result);
    return doc.getOMDocumentElement();
  }

}
View Full Code Here

        contentEl.addChild(data);
        result.addChild(contentEl);
        /* clone required, or else the content in 'content' element is missing in result */
        result = result.cloneOMElement();
        OMDocument doc = fac.createOMDocument();
        doc.addChild(result);
        return doc.getOMDocumentElement();
    }

    /**
     * Executes the event trigger, this uses the "evaluate" method to check
View Full Code Here

        for (OMElement el : arrayEl) {
          retEl.addChild(el);
        }
      }
    }
    doc.addChild(retEl);
    return doc.getOMDocumentElement();
  }
 
  private List<OMElement> createOMElementsFromArrayValue(String name, ParamValue value,
      OMFactory fac) {
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.