Examples of WSSecurityDispatcher


Examples of org.jboss.ws.extensions.security.WSSecurityDispatcher

      ByteArrayInputStream inputStream = new ByteArrayInputStream(envStr.getBytes());
      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
      String expected = DOMWriter.printNode(soapMsg.getSOAPPart().getEnvelope(), true);

      WSSecurityAPI sec = new WSSecurityDispatcher();
      try
      {
         sec.encodeMessage(configuration, soapMsg, null, "kermit", "thefrog");
         sec.decodeMessage(configuration, soapMsg, null);
  
         String actual = DOMWriter.printNode(soapMsg.getSOAPPart().getEnvelope(), true);
         assertEquals(expected, actual);
      }
      finally
      {
         sec.cleanup();
      }
   }
View Full Code Here

Examples of org.jboss.ws.extensions.security.WSSecurityDispatcher

  
   @Override
   protected void setUp() throws Exception
   {
      super.setUp();
      sec = new WSSecurityDispatcher();
   }
View Full Code Here

Examples of org.jboss.ws.extensions.security.WSSecurityDispatcher

      ByteArrayInputStream inputStream = new ByteArrayInputStream(envStr.getBytes());
      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
      String expected = DOMWriter.printNode(soapMsg.getSOAPPart().getEnvelope(), true);

      WSSecurityAPI sec = new WSSecurityDispatcher();
      try
      {
         sec.encodeMessage(configuration, soapMsg, null, "kermit", "thefrog");
         sec.decodeMessage(configuration, soapMsg, null);
  
         String actual = DOMWriter.printNode(soapMsg.getSOAPPart().getEnvelope(), true);
         assertEquals(expected, actual);
      }
      finally
      {
         sec.cleanup();
      }
   }
View Full Code Here

Examples of org.jboss.ws.extensions.security.WSSecurityDispatcher

         if (configuration != null)
         {
            CommonMessageContext ctx = (CommonMessageContext)msgContext;
            SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
           
            new WSSecurityDispatcher().decodeMessage(configuration, soapMessage, null);
         }
      }
      catch (SOAPException ex)
      {
         exception = ex;
View Full Code Here

Examples of org.jboss.ws.extensions.security.WSSecurityDispatcher

            CommonMessageContext ctx = (CommonMessageContext)msgContext;
            SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
           
            String user = (String)ctx.get(Stub.USERNAME_PROPERTY);
            String pass = (String)ctx.get(Stub.PASSWORD_PROPERTY);
            new WSSecurityDispatcher().encodeMessage(configuration, soapMessage, null, user, pass);
         }
      }
      catch (SOAPException ex)
      {
         exception = ex;
View Full Code Here

Examples of org.jboss.ws.extensions.security.WSSecurityDispatcher

         WSSecurityConfiguration configuration = getSecurityConfiguration(msgContext);
         if (configuration != null)
         {
            CommonMessageContext ctx = (CommonMessageContext)msgContext;
            SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
            new WSSecurityDispatcher().decodeMessage(configuration, soapMessage, null);
         }
      }
      catch (SOAPException ex)
      {
         exception = ex;
View Full Code Here

Examples of org.jboss.ws.extensions.security.WSSecurityDispatcher

            CommonMessageContext ctx = (CommonMessageContext)msgContext;
            SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
           
            String user = (String)ctx.get(BindingProvider.USERNAME_PROPERTY);
            String pass = (String)ctx.get(BindingProvider.PASSWORD_PROPERTY);
            new WSSecurityDispatcher().encodeMessage(configuration, soapMessage, null, user, pass);
         }
      }
      catch (SOAPException ex)
      {
         exception = ex;
View Full Code Here

Examples of org.jboss.ws.extensions.security.WSSecurityDispatcher

  
   @Override
   protected void setUp() throws Exception
   {
      super.setUp();
      sec = new WSSecurityDispatcher();
   }
View Full Code Here

Examples of org.jboss.ws.extensions.security.WSSecurityDispatcher

         WSSecurityConfiguration configuration = getSecurityConfiguration(msgContext);
         if (configuration != null)
         {
            CommonMessageContext ctx = (CommonMessageContext)msgContext;
            SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
            new WSSecurityDispatcher().decodeMessage(configuration, soapMessage, null);
         }
      }
      catch (SOAPException ex)
      {
         log.error("Cannot handle inbound ws-security", ex);
View Full Code Here

Examples of org.jboss.ws.extensions.security.WSSecurityDispatcher

            CommonMessageContext ctx = (CommonMessageContext)msgContext;
            SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
           
            String user = (String)ctx.get(BindingProvider.USERNAME_PROPERTY);
            String pass = (String)ctx.get(BindingProvider.PASSWORD_PROPERTY);
            new WSSecurityDispatcher().encodeMessage(configuration, soapMessage, null, user, pass);
         }
      }
      catch (SOAPException ex)
      {
         log.error("Cannot handle outbound ws-security", ex);
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.