Examples of addNamespace()


Examples of org.apache.lucene.gdata.gom.GOMFeed.addNamespace()

      GOMNamespace namespace = new GOMNamespace(this.streamReader
          .getNamespaceURI(i), this.streamReader
          .getNamespacePrefix(i));
      System.out.println(namespace);
      feed.addNamespace(namespace);
    }
    return feed;
  }

  private int next() throws XMLStreamException {
View Full Code Here

Examples of org.apache.marmotta.kiwi.reasoner.model.program.Program.addNamespace()

        PreparedStatement loadProgramNS = getPreparedStatement("namespaces.load_by_program");
        synchronized (loadProgramNS) {
            loadProgramNS.setLong(1, program.getId());
            ResultSet nsResult = loadProgramNS.executeQuery();
            while(nsResult.next()) {
                program.addNamespace(nsResult.getString("ns_prefix"), nsResult.getString("ns_uri"));
            }
            nsResult.close();
        }

        // load rules
View Full Code Here

Examples of org.apache.shindig.protocol.conversion.xstream.NamespaceSet.addNamespace()

    // configure the name space mapping. This does not need to be all the elments in the
    // namespace, just the point of translation from one namespace to another.
    // It would have been good to use a standard parser/serializer approach, but
    // the xstream namespace implementation does not work exactly how we need it to.
    NamespaceSet atom = new NamespaceSet();
    atom.addNamespace("xmlns", ATOM_NS);
    atom.addNamespace("xmlns:osearch", OSEARCH_NS);
    atom.addPrefixedElement("totalResults", "osearch:totalResults");
    atom.addPrefixedElement("startIndex", "osearch:startIndex");
    atom.addPrefixedElement("itemsPerPage", "osearch:itemsPerPage");
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

        OMElement response = businessClient.sendReceive(commodityPayload());

        assertNotNull(response);

        SynapseXPath xPath = new SynapseXPath("//return");
        xPath.addNamespace("ns","http://services.samples/xsd");
        OMElement returnEle = (OMElement) xPath.selectSingleNode(response);

        assertNotNull(returnEle);

        assertEquals(returnEle.getText().trim(),"100");
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

                                "</ns1:a>";


    public void testMessageContextGetStringValueBody() throws Exception {
        SynapseXPath axiomXpath = new SynapseXPath("$body/ns1:a/ns1:c");
        axiomXpath.addNamespace("ns1", nsNamespace1);
        MessageContext synCtx = TestUtils.getTestContext(sampleBody);

        String result = axiomXpath.stringValueOf(synCtx);
        assertEquals("second", result);
    }
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

        assertEquals("second", result);
    }

    public void testMessageContextGetStringValueEnvelope() throws Exception {
        SynapseXPath axiomXpath = new SynapseXPath("/s11:Envelope/s11:Body/ns1:a/ns1:c");
        axiomXpath.addNamespace("s11", nsSoapEnv);
        axiomXpath.addNamespace("ns1", nsNamespace1);

        MessageContext synCtx = TestUtils.getTestContext(sampleBody);

        String result = axiomXpath.stringValueOf(synCtx);
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

    }

    public void testMessageContextGetStringValueEnvelope() throws Exception {
        SynapseXPath axiomXpath = new SynapseXPath("/s11:Envelope/s11:Body/ns1:a/ns1:c");
        axiomXpath.addNamespace("s11", nsSoapEnv);
        axiomXpath.addNamespace("ns1", nsNamespace1);

        MessageContext synCtx = TestUtils.getTestContext(sampleBody);

        String result = axiomXpath.stringValueOf(synCtx);
        assertEquals("second", result);
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

        OMNamespace ns = fac.createOMNamespace("http://test", "t");
        ctx.getEnvelope().getHeader().addHeaderBlock("test", ns).setText(message);
        ctx.getEnvelope().getHeader().addHeaderBlock("test2", ns);
       
        SynapseXPath xpath = new SynapseXPath("$header/t:test");
        xpath.addNamespace(ns);
        assertEquals(message, xpath.stringValueOf(ctx));
       
        xpath = new SynapseXPath("$header/*");
        assertEquals(2, xpath.selectNodes(ctx).size());
    }
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

        // create a new filter mediator
        FilterMediator filter = new FilterMediator();

        // set xpath condition to IBM
        SynapseXPath xpath = new SynapseXPath("//*[wsx:symbol='IBM']");
        xpath.addNamespace("wsx", "http://www.webserviceX.NET/");
        filter.setXpath(xpath);

        // set dummy mediator to be called on success
        filter.addChild(testMediator);

View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

        // create a new filter mediator
        FilterMediator filter = new FilterMediator();

        // set xpath condition to MSFT
        SynapseXPath xpath = new SynapseXPath("//*[wsx:symbol='MSFT']");
        xpath.addNamespace("wsx", "http://www.webserviceX.NET/");
        filter.setXpath(xpath);

        // set dummy mediator to be called on success
        filter.addChild(testMediator);

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.