Package org.apache.axiom.om.xpath

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


            for (Object namespace : namespaces) {
                OMNamespace tmpNs = (OMNamespace) namespace;
                xp.addNamespace(tmpNs.getPrefix(), tmpNs.getNamespaceURI());
            }

            List selectedNodes = xp.selectNodes(header);

            if (selectedNodes.size() == 0) {
                return false;
            }
View Full Code Here


    try {
            for (String exp : expressions) {
                XPath xp = new AXIOMXPath(exp);
                xp.setNamespaceContext(nsCtx);
                List list = xp.selectNodes(env);
                for (Object aList : list) {
                    OMElement element = (OMElement) aList;
                    OMText text = (OMText) element.getFirstOMChild();
                    text.setOptimize(true);
                }
View Full Code Here

      nsCtx.addNamespace(WSConstants.WSSE_PREFIX,WSConstants.WSSE_NS);
      nsCtx.addNamespace(WSConstants.WSU_PREFIX,WSConstants.WSU_NS);

      xp.setNamespaceContext(nsCtx);

      return xp.selectNodes(elem);

    } catch (JaxenException e) {
      throw new WSSecurityException(e.getMessage(), e);
    }
View Full Code Here

                for (Object namespaceObject : namespaces) {
                    OMNamespace tmpNs = (OMNamespace) namespaceObject;
                    xp.addNamespace(tmpNs.getPrefix(), tmpNs.getNamespaceURI());
                }

                for (Object o : xp.selectNodes(envelope)) {
                    decryptedElements.put(o, dataRef.isContent());
                }


            } catch (JaxenException e) {
View Full Code Here

                for (Object namespaceObject : namespaces) {
                    OMNamespace tmpNs = (OMNamespace) namespaceObject;
                    xp.addNamespace(tmpNs.getPrefix(), tmpNs.getNamespaceURI());
                }

                for (Object o : xp.selectNodes(envelope)) {
                    Object result = decryptedElements.get(o);
                    if (result != null &&
                            ("Element".equals(encryptedPart.getEncModifier())
                                    ^ (Boolean) result)) {
                        found = true;
View Full Code Here

    try {
        for(int i=0; i<expressions.size(); i++){
          String exp = (String)expressions.get(i);
          XPath xp = new AXIOMXPath(exp);
          xp.setNamespaceContext(nsCtx);
          List list = xp.selectNodes(env);
          Iterator elements = list.iterator();
          while (elements.hasNext()) {
            OMElement element = (OMElement) elements.next();
            OMText text = (OMText)element.getFirstOMChild();
            text.setOptimize(true);
View Full Code Here

      nsCtx.addNamespace(WSConstants.WSSE_PREFIX,WSConstants.WSSE_NS);
      nsCtx.addNamespace(WSConstants.WSU_PREFIX,WSConstants.WSU_NS);

      xp.setNamespaceContext(nsCtx);

      return xp.selectNodes(elem);

    } catch (JaxenException e) {
      throw new WSSecurityException(e.getMessage(), e);
    }
View Full Code Here

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

     */
    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

     */
    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

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.