Package org.apache.ws.security.handler

Examples of org.apache.ws.security.handler.WSHandlerResult


        WSSecurityException fault = null;

        // Search through the results for a SIGN result
        while (results.hasNext()) {
            WSHandlerResult result = (WSHandlerResult) results.next();
            Iterator actions = result.getResults().iterator();

            while (actions.hasNext()) {
                WSSecurityEngineResult resultItem =
                    (WSSecurityEngineResult) actions.next();
                int resultAction =
View Full Code Here


        }
    }
    public static String getRequestEncryptedKeyId(Vector results) {
       
        for (int i = 0; i < results.size(); i++) {
            WSHandlerResult rResult =
                    (WSHandlerResult) results.get(i);

            Vector wsSecEngineResults = rResult.getResults();
            /*
            * Scan the results for the first Signature action. Use the
            * certificate of this Signature to set the certificate for the
            * encryption action :-).
            */
 
View Full Code Here

    }
   
    public static byte[] getRequestEncryptedKeyValue(Vector results) {
       
        for (int i = 0; i < results.size(); i++) {
            WSHandlerResult rResult =
                    (WSHandlerResult) results.get(i);

            Vector wsSecEngineResults = rResult.getResults();
            /*
            * Scan the results for the first Signature action. Use the
            * certificate of this Signature to set the certificate for the
            * encryption action :-).
            */
 
View Full Code Here

        List<Object> results = CastUtils.cast((List)msg.get(WSHandlerConstants.RECV_RESULTS));
        if (results == null) {
            results = new Vector<Object>();
            msg.put(WSHandlerConstants.RECV_RESULTS, results);
        }
        WSHandlerResult rResult = new WSHandlerResult(actor, wsResult);
        results.add(0, rResult);

        SOAPBody body = doc.getSOAPBody();

        XMLStreamReader reader = StaxUtils.createXMLStreamReader(new DOMSource(body));
View Full Code Here

        public void handleMessage(SoapMessage message) throws Fault {
            //Find the SC token
            boolean found = false;
            List results = (List)message.get(WSHandlerConstants.RECV_RESULTS);
            for (int i = 0; i < results.size(); i++) {
                WSHandlerResult rResult =
                        (WSHandlerResult) results.get(i);

                Vector wsSecEngineResults = rResult.getResults();

                for (int j = 0; j < wsSecEngineResults.size(); j++) {
                    WSSecurityEngineResult wser =
                            (WSSecurityEngineResult) wsSecEngineResults.get(j);
                    Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION);
View Full Code Here

                }
                if (!isRequestor(message)) {
                    boolean found = false;
                    Vector results = (Vector)message.get(WSHandlerConstants.RECV_RESULTS);
                    for (int i = 0; i < results.size(); i++) {
                        WSHandlerResult rResult =
                                (WSHandlerResult) results.get(i);

                        Vector wsSecEngineResults = rResult.getResults();

                        for (int j = 0; j < wsSecEngineResults.size(); j++) {
                            //WSSecurityEngineResult wser =
                            //        (WSSecurityEngineResult) wsSecEngineResults.get(j);
                            //Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION);
View Full Code Here

          .getMessage(SandeshaMessageKeys.noSecurityResults);
      throw new SandeshaException(msg);
    } else {
      boolean verified = false;
      for (int i = 0; i < results.size() && !verified; i++) {
        WSHandlerResult rResult = results.get(i);
        List<WSSecurityEngineResult> wsSecEngineResults = rResult.getResults();

        for (int j = 0; j < wsSecEngineResults.size() && !verified; j++) {
          WSSecurityEngineResult wser = wsSecEngineResults
              .get(j);
          if ((Integer)wser.get(WSSecurityEngineResult.TAG_ACTION) == WSConstants.SIGN
View Full Code Here

        if ( axis2MsgCtx.getProperty(WSHandlerConstants.RECV_RESULTS) != null &&
            axis2MsgCtx.getProperty(WSHandlerConstants.RECV_RESULTS) instanceof Vector ) {
            Vector recvResults = (Vector)axis2MsgCtx.getProperty(WSHandlerConstants.RECV_RESULTS);
            for ( int count1 = 0 ; count1 < recvResults.size() ; ++count1 ) {
                if ( recvResults.elementAt(count1) instanceof WSHandlerResult ) {
                    WSHandlerResult wshr = (WSHandlerResult)recvResults.elementAt(count1);
                    Vector results = wshr.getResults();
                    for ( int count2 = 0 ; count2 < results.size() ; ++count2 ) {
                        if ( results.elementAt(count2) instanceof WSSecurityEngineResult ) {
                            WSSecurityEngineResult securityResult =
                                (WSSecurityEngineResult)wshr.getResults().elementAt(count2);
                            if ( securityResult.get("principal") != null ) {
                                message.getHeaders().add(securityResult.get("principal"));
                            }
                        }
                    }
View Full Code Here

        /*
        * Scan the results for a matching actor. Use results only if the
        * receiving Actor and the sending Actor match.
        */
        for (int i = 0; i < results.size(); i++) {
            WSHandlerResult rResult =
                    (WSHandlerResult) results.get(i);

            Vector wsSecEngineResults = rResult.getResults();
            /*
            * Scan the results for the first Signature action. Use the
            * certificate of this Signature to set the certificate for the
            * encryption action :-).
            */
 
View Full Code Here

        /*
         * Scan the results for a matching actor. Use results only if the
         * receiving Actor and the sending Actor match.
         */
         for (int i = 0; i < results.size(); i++) {
             WSHandlerResult rResult =
                     (WSHandlerResult) results.get(i);

             Vector wsSecEngineResults = rResult.getResults();
             /*
             * Scan the results for a username token. Use the username
             * of this token to set the alias for the encryption user
             */
             for (int j = 0; j < wsSecEngineResults.size(); j++) {
View Full Code Here

TOP

Related Classes of org.apache.ws.security.handler.WSHandlerResult

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.