Package org.apache.axiom.om.xpath

Examples of org.apache.axiom.om.xpath.AXIOMXPath.addNamespace()


                                Iterator nsIter = namespaces.iterator();
                               
                                while (nsIter.hasNext())
                                {
                                        OMNamespace tmpNs = (OMNamespace)nsIter.next();
                                        xp.addNamespace(tmpNs.getPrefix(), tmpNs.getNamespaceURI());
                                }
                               
                                List selectedNodes = xp.selectNodes(envelope);
                               
                                Iterator nodesIter = selectedNodes.iterator();
View Full Code Here


        Iterator nsIter = namespaces.iterator();
       
        while (nsIter.hasNext())
        {
          OMNamespace tmpNs = (OMNamespace)nsIter.next();
          xp.addNamespace(tmpNs.getPrefix(), tmpNs.getNamespaceURI());
        }
       
        List selectedNodes = xp.selectNodes(envelope);
       
        Iterator nodesIter = selectedNodes.iterator();
View Full Code Here

                        Iterator nsIter = namespaces.iterator();
                       
                        while (nsIter.hasNext())
                        {
                                OMNamespace tmpNs = (OMNamespace)nsIter.next();
                                xp.addNamespace(tmpNs.getPrefix(), tmpNs.getNamespaceURI());
                        }
                       
                        List selectedNodes = xp.selectNodes(envelope);
                       
                        if (selectedNodes.size() == 0 ) {
View Full Code Here

     *  </ns:getQuoteResponse>
     */
    public static String parseStandardQuoteResponse(OMElement result) throws Exception {

        AXIOMXPath xPath = new AXIOMXPath("//ns:last");
        xPath.addNamespace("ns","http://services.samples/xsd");
        OMElement last = (OMElement) xPath.selectSingleNode(result);
        if (last != null) {
            return last.getText();
        } else {
            throw new Exception("Unexpected response : " + result);
View Full Code Here

     * @throws Exception
     */
    public static String parseFullQuoteResponse(OMElement result) throws Exception {

        AXIOMXPath xPath = new AXIOMXPath("//ns:last");
        xPath.addNamespace("ns","http://services.samples/xsd");
        List lastNodes = xPath.selectNodes(result);

        if (lastNodes == null) {
            throw new Exception("Unexpected response : " + result);
        }
View Full Code Here

     * @throws Exception
     */
    public static String parseMarketActivityResponse(OMElement result) throws Exception {

        AXIOMXPath xPath = new AXIOMXPath("//ns:last");
        xPath.addNamespace("ns","http://services.samples/xsd");
        List lastNodes = xPath.selectNodes(result);

        if (lastNodes == null) {
            throw new Exception("Unexpected response : " + result);
        }
View Full Code Here

     *      </CheckPriceResponse>
     */
    public static String parseCustomQuoteResponse(OMElement result) throws Exception {

        AXIOMXPath xPath = new AXIOMXPath("//ns:Price");
        xPath.addNamespace("ns","http://services.samples/xsd");
        OMElement price = (OMElement) xPath.selectSingleNode(result);       
        if (price != null) {
            return price.getText();
        } else {
            throw new Exception("Unexpected response : " + result);
View Full Code Here

        OMElementUtils.addNameSpaces(xp, elem, log);
       
        if(omNS != null){
          String prefix = omNS.getAttributeValue(new QName(Constants.NULL_NAMESPACE, "prefix"));
          String name = omNS.getAttributeValue(new QName(Constants.NULL_NAMESPACE, "name"));
          xp.addNamespace(prefix,name);   
        }
       
        mediator.setAttachmentPath(xp);
      } catch (JaxenException e) {
         log.error("Error creating XPath for Base64 element", e);
View Full Code Here

        OMElementUtils.addNameSpaces(xp, elem, log);
       
        if(omNS != null){
          String prefix = omNS.getAttributeValue(new QName(Constants.NULL_NAMESPACE, "prefix"));
          String name = omNS.getAttributeValue(new QName(Constants.NULL_NAMESPACE, "name"));
          xp.addNamespace(prefix,name);   
        }
       
        mediator.setAttachmentPath(xp);
      } catch (JaxenException e) {
         log.error("Error creating XPath for Base64 element", e);
View Full Code Here

        // create a new switch mediator
        switchMediator = new SwitchMediator();

        // set xpath condition to select symbol
        AXIOMXPath xpath = new AXIOMXPath("//wsx:symbol");
        xpath.addNamespace("wsx", "http://www.webserviceX.NET/");
        switchMediator.setSource(xpath);

        // set ibm mediator to be called for IBM, msft for MSFT and default for others..
        switchMediator.addCase(new SwitchCaseMediator(Pattern.compile("IBM"), false,
            Arrays.asList(new Mediator[] {ibmMediator})));
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.