Package javax.xml.soap

Examples of javax.xml.soap.Node


    }
      
    public static SOAPElement findElement(SOAPElement rootElement, String name) {
        Iterator iter = rootElement.getChildElements();
        while(iter.hasNext()) {
            Node node = (Node)iter.next();
            if (node instanceof SOAPElement && node.getLocalName().equals(name)) {
                return (SOAPElement)node;
            }
        }
        return null;
    }
View Full Code Here


        new QName("http://www.w3.org/2005/08/addressing", "IsReferenceParameter");
   
    public static SOAPElement findElement(SOAPElement rootElement, String name) {
        Iterator iter = rootElement.getChildElements();
        while(iter.hasNext()) {
            Node node = (Node)iter.next();
            if (node instanceof SOAPElement && node.getLocalName().equals(name)) {
                return (SOAPElement)node;
            }
        }
        return null;
    }
View Full Code Here

       
        final NodeList digestMethodNodes =
            (NodeList) digestAlgoExpr.evaluate(signedDoc, XPathConstants.NODESET);
       
        for (int i = 0; i < digestMethodNodes.getLength(); i++) {
            Node node = (Node)digestMethodNodes.item(i);
            String digestAlgorithm = node.getAttributes().getNamedItem("Algorithm").getNodeValue();
            assertEquals(expectedDigestAlgorithm, digestAlgorithm);
        }
       
        // Canonicalization Algorithm
        final XPathExpression canonAlgoExpr =
View Full Code Here

        final NodeList strKeyIdNodes =
            (NodeList) strExpr.evaluate(signedDoc, XPathConstants.NODESET);
       
        String strId = null;
        for (int i = 0; i < strKeyIdNodes.getLength(); i++) {
            Node keyIdNode = (Node) strKeyIdNodes.item(i);
            String strKey = keyIdNode.getTextContent();
            if (strKey.equals(assertionId)) {
                Node strNode = (Node) keyIdNode.getParentNode();
                strId = strNode.getAttributes().
                    getNamedItemNS(nsContext.getNamespaceURI("wsu"), "Id").getNodeValue();
                break;
            }
        }
        assertNotNull("SecurityTokenReference for " + assertionId + " not found in security header.", strId);
       
        // Verify STR is included in the signature references
        final XPathExpression sigRefExpr = xpath.compile(
            "/s:Envelope/s:Header/wsse:Security/ds:Signature/ds:SignedInfo/ds:Reference");
       
        final NodeList sigReferenceNodes =
            (NodeList) sigRefExpr.evaluate(signedDoc, XPathConstants.NODESET);
       
        boolean foundStrReference = false;
        for (int i = 0; i < sigReferenceNodes.getLength(); i++) {
            Node sigRefNode = (Node) sigReferenceNodes.item(i);
            String sigRefURI = sigRefNode.getAttributes().getNamedItem("URI").getNodeValue();
            if (sigRefURI.equals("#" + strId)) {
                foundStrReference = true;
                break;
            }
        }
View Full Code Here

        List text_children = new ArrayList();
        Iterator node_iter = soapElem.getChildElements();

        while ( node_iter.hasNext() )
        {
            Node child_node = (Node) node_iter.next();

            if ( isSOAPElement( child_node ) )
            {
                elem_children.add( child_node );
            }
View Full Code Here

        {
            Iterator childElemIter = soapElem.getChildElements();

            if ( childElemIter.hasNext() )
            {
                Node firstChild = (Node) childElemIter.next();

                if ( firstChild instanceof Text )
                {
                    firstChild.setValue( value );

                    return;
                }
            }
        }
View Full Code Here

    {
        Iterator childElemIter = soapElem.getChildElements();

        if ( childElemIter.hasNext() )
        {
            Node firstChild = (Node) childElemIter.next();

            if ( firstChild instanceof Text )
            {
                return (Text) firstChild;
            }
View Full Code Here

      List     text_children = new ArrayList(  );
      Iterator node_iter     = soap_elem.getChildElements(  );

      while ( node_iter.hasNext(  ) )
      {
         Node child_node = (Node) node_iter.next(  );

         if ( isSOAPElement( child_node ) )
         {
            elem_children.add( child_node );
         }
View Full Code Here

                                int          depth )
   throws SOAPException
   {
      while ( children.hasNext(  ) )
      {
         Node child = (Node) children.next(  );

         buildSOAPNodeStringBuffer( buf, root_soap_elem, child, depth );
      }
   }
View Full Code Here

       
        final NodeList digestMethodNodes =
            (NodeList) digestAlgoExpr.evaluate(signedDoc, XPathConstants.NODESET);
       
        for (int i = 0; i < digestMethodNodes.getLength(); i++) {
            Node node = (Node)digestMethodNodes.item(i);
            String digestAlgorithm = node.getAttributes().getNamedItem("Algorithm").getNodeValue();
            assertEquals(expectedDigestAlgorithm, digestAlgorithm);
        }
       
        // Canonicalization Algorithm
        final XPathExpression canonAlgoExpr =
View Full Code Here

TOP

Related Classes of javax.xml.soap.Node

Copyright © 2018 www.massapicom. 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.