Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMFactory.createOMText()


        // set a dummy static message
        OMFactory fac = OMAbstractFactory.getOMFactory();
        envelope.getBody().addChild(fac.createOMText("first text child "));
        envelope.getBody().addChild(builder.getDocumentElement());
        envelope.getBody().addChild(fac.createOMText("second text child "));

        synCtx.setEnvelope(envelope);
        return synCtx;
    }
View Full Code Here


        if (traceOn && trace.isTraceEnabled()) {
            trace.trace("Wrapping text transformation result : " + textPayload);
        }

        if (textPayload != null) {
            OMTextImpl textData = (OMTextImpl) fac.createOMText(textPayload);
            wrapper = fac.createOMElement(BaseConstants.DEFAULT_TEXT_WRAPPER, null);
            wrapper.addChild(textData);
        }

        return wrapper;
View Full Code Here

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace(
                "http://example1.org/example1", "example1");
        OMElement method = fac.createOMElement("echo", omNs);
        OMElement value = fac.createOMElement("Text", omNs);
        value.addChild(fac.createOMText(value, "Testing Rampart with WS-SecPolicy"));
        method.addChild(value);

        return method;
    }
   
View Full Code Here

      throw AxisFault.makeFault (e);
    }
   
      DataHandler dataHandler = new DataHandler(dataSource);

      OMText textData = fac.createOMText(dataHandler, true);
      attachmentElem.addChild(textData);
   
    pingElem.addChild(attachmentElem);

    return pingElem;
View Full Code Here

                    OMElement parms = fac.createOMElement(DEFAULT_QUEUE_CONNECTION_FACTORY, null);                   

                    for ( String key : jmsProps.keySet() ) {
                        OMElement param = fac.createOMElement("parameter", null);
                        param.addAttribute( "name", key, null );
                        param.addChild(fac.createOMText(param, jmsProps.get(key)));
                        parms.addChild(param);
                    }
                   
                    Parameter queueConnectionFactory = new Parameter(DEFAULT_QUEUE_CONNECTION_FACTORY, parms);
                    trsIn.addParameter( queueConnectionFactory );
View Full Code Here

  public static void setBinaryPayload(SOAPEnvelope envelope, DataHandler dh) {
    OMFactory fac = envelope.getOMFactory();
    OMElement binaryElt = envelope.getOMFactory()
        .createOMElement(BINARYELT);
    OMText text = fac.createOMText(dh, true);
    binaryElt.addChild(text);
    setXMLPayload(envelope, binaryElt);
  }

  public static void setBinaryPayload(MessageContext mc, DataHandler dh) {
View Full Code Here

  }

  public static void setTextPayload(SOAPEnvelope envelope, String text) {
    OMFactory fac = envelope.getOMFactory();
    OMElement textElt = envelope.getOMFactory().createOMElement(TEXTELT);
    OMText textNode = fac.createOMText(text);
    textElt.addChild(textNode);
    setXMLPayload(envelope, textElt);
  }

  public static void setTextPayload(MessageContext mc, String text) {
View Full Code Here

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace(
                "http://example1.org/example1", "example1");
        OMElement method = fac.createOMElement("echo", omNs);
        OMElement value = fac.createOMElement("Text", omNs);
        value.addChild(fac.createOMText(value, "Testing Rampart with WS-SecPolicy"));
        method.addChild(value);

        return method;
    }
View Full Code Here

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace(
                "http://example1.org/example1", "example1");
        OMElement method = fac.createOMElement("returnError", omNs);
        OMElement value = fac.createOMElement("Text", omNs);
        value.addChild(fac.createOMText(value, "Testing Rampart with WS-SecPolicy"));
        method.addChild(value);

        return method;
    }
View Full Code Here

                SOAPBody body = envelope.getBody();
                OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXOMBuilder(parser);
                OMElement bodyElement = builder.getDocumentElement();
                if (addTextAroundBody) {
                    OMFactory fac = OMAbstractFactory.getOMFactory();
                    body.addChild(fac.createOMText("\n"));
                    body.addChild(bodyElement);
                    body.addChild(fac.createOMText("\n"));
                } else {
                    body.addChild(bodyElement);
                }
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.