Package org.apache.axiom.om

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


    OMFactory factory = header.getOMFactory();
    if (factory==null)
      factory = defaultFactory;
   
    OMNamespace rmNamespace = factory.createOMNamespace(namespaceValue,Sandesha2Constants.WSRM_COMMON.NS_PREFIX_RM);
   
    SOAPHeader SOAPHeader = (SOAPHeader) header;
    SOAPHeaderBlock sequenceAcknowledgementHeaderBlock = SOAPHeader.addHeaderBlock(
        Sandesha2Constants.WSRM_COMMON.USES_SEQUENCE_STR,rmNamespace);
   
View Full Code Here


    serviceClient.cleanup();
  }
 
  private static OMElement getPingOMBlock(String text) {
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace namespace = fac.createOMNamespace(applicationNamespaceName,"ns1");
    OMElement pingElem = fac.createOMElement(ping, namespace);
    OMElement textElem = fac.createOMElement(Text, namespace);
   
    textElem.setText(text);
    pingElem.addChild(textElem);
View Full Code Here

        return OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
    }

    protected static OMElement getEchoOMBlock(String text, String sequenceKey) {
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace applicationNamespace = fac.createOMNamespace(applicationNamespaceName,"ns1");
    OMElement echoStringElement = fac.createOMElement(echoString, applicationNamespace);
    OMElement textElem = fac.createOMElement(Text,applicationNamespace);
    OMElement sequenceElem = fac.createOMElement(Sequence,applicationNamespace);
   
    textElem.setText(text);
View Full Code Here

    return echoStringElement;
  }
   
  protected OMElement getPingOMBlock(String text) {
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace namespace = fac.createOMNamespace(applicationNamespaceName,"ns1");
    OMElement pingElem = fac.createOMElement(ping, namespace);
    OMElement textElem = fac.createOMElement(Text, namespace);
   
    textElem.setText(text);
    pingElem.addChild(textElem);
View Full Code Here

    }

    protected void runTest() throws Throwable {
        OMFactory factory = metaFactory.getOMFactory();

        OMNamespace namespace = factory.createOMNamespace("http://testuri.org", "test");
        OMElement documentElement = factory.createOMElement("DocumentElement", namespace);
        factory.createOMText(documentElement, "this is a TEXT");
        factory.createOMComment(documentElement, "this is a comment");
        factory.createOMText(documentElement, "this is a TEXT block 2");
       
View Full Code Here

        dest.flush();
        dest.close();
        System.out.println("Wrote MTOM content to temp file : " + tempFile.getAbsolutePath());

        OMFactory factory = request.getOMFactory();
        OMNamespace ns = factory.createOMNamespace("http://services.samples", "m0");
        OMElement payload  = factory.createOMElement("uploadFileUsingMTOMResponse", ns);
        OMElement response = factory.createOMElement("response", ns);
        OMElement image    = factory.createOMElement("image", ns);

        FileDataSource fileDataSource = new FileDataSource(tempFile);
View Full Code Here

        outMsgCtx.setProperty(
            org.apache.axis2.Constants.Configuration.ENABLE_SWA,
            org.apache.axis2.Constants.VALUE_TRUE);

        OMFactory factory = request.getOMFactory();
        OMNamespace ns = factory.createOMNamespace("http://services.samples", "m0");
        OMElement payload  = factory.createOMElement("uploadFileUsingSwAResponse", ns);
        OMElement response = factory.createOMElement("response", ns);
        OMElement imageId  = factory.createOMElement("imageId", ns);

        FileDataSource fileDataSource = new FileDataSource(tempFile);
View Full Code Here

     * @param symbol the stock symbol
     * @return OMElement for SOAP body
     */
    public static OMElement createFullQuoteRequest(String symbol) {
        OMFactory factory   = OMAbstractFactory.getOMFactory();
        OMNamespace ns      = factory.createOMNamespace("http://services.samples", "m0");
        OMElement getQuote  = factory.createOMElement("getFullQuote", ns);
        OMElement request   = factory.createOMElement("request", ns);
        OMElement symb      = factory.createOMElement("symbol", ns);
        request.addChild(symb);
        getQuote.addChild(request);
View Full Code Here

     *  </m:getMarketActivity>
     * @return OMElement for SOAP body
     */
    public static OMElement createMarketActivityRequest() {
        OMFactory factory   = OMAbstractFactory.getOMFactory();
        OMNamespace ns      = factory.createOMNamespace("http://services.samples", "m0");
        OMElement getQuote  = factory.createOMElement("getMarketActivity", ns);
        OMElement request   = factory.createOMElement("request", ns);

        OMElement symb = null;
        for (int i=0; i<100; i++) {
View Full Code Here

     * @param symbol the stock
     * @return an OMElement payload for the order
     */
    public static OMElement createPlaceOrderRequest(double purchPrice, int qty, String symbol) {
        OMFactory factory   = OMAbstractFactory.getOMFactory();
        OMNamespace ns      = factory.createOMNamespace("http://services.samples", "m0");
        OMElement placeOrder= factory.createOMElement("placeOrder", ns);
        OMElement order     = factory.createOMElement("order", ns);
        OMElement price     = factory.createOMElement("price", ns);
        OMElement quantity  = factory.createOMElement("quantity", ns);
        OMElement symb      = factory.createOMElement("symbol", ns);
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.