Package org.jboss.ws.metadata.wsse

Examples of org.jboss.ws.metadata.wsse.Port


      return operationConfig != null ? operationConfig : configuration.getDefaultConfig();
   }

   private Config selectOperationConfig(WSSecurityConfiguration configuration, QName portName, QName opName)
   {
      Port port = configuration.getPorts().get(portName != null ? portName.getLocalPart() : null);
      if (port == null)
         return configuration.getDefaultConfig();

      Operation operation = port.getOperations().get(opName != null ? opName.toString() : null);
      if (operation == null)
      {
         //if the operation name was not available or didn't match any wsse configured operation,
         //we fall back to the port wsse config (if available) or the default config.
         Config portConfig = port.getDefaultConfig();
         return (portConfig == null) ? configuration.getDefaultConfig() : portConfig;

      }
      return operation.getConfig();
   }
View Full Code Here


    */
   public void testPortRoles() throws Exception
   {
      WSSecurityConfiguration wsConfig = load("jboss-wsse-port-roles.xml");

      Port port = wsConfig.getPorts().get("TestPort");
      Config config = port.getDefaultConfig();
      Authorize authorize = config.getAuthorize();
      assertFalse("Unchecked", authorize.isUnchecked());
      List<Role> roles = authorize.getRoles();

      assertEquals("Expected 2 roles", 2, roles.size());
View Full Code Here

    */
   public void testPortRole() throws Exception
   {
      WSSecurityConfiguration wsConfig = load("jboss-wsse-port-role.xml");

      Port port = wsConfig.getPorts().get("TestPort");
      Config config = port.getDefaultConfig();
      Authorize authorize = config.getAuthorize();
      assertFalse("Unchecked", authorize.isUnchecked());
      List<Role> roles = authorize.getRoles();

      assertEquals("Expected 1 roles", 1, roles.size());
View Full Code Here

    */
   public void testPortUnchecked() throws Exception
   {
      WSSecurityConfiguration wsConfig = load("jboss-wsse-port-unchecked.xml");

      Port port = wsConfig.getPorts().get("TestPort");
      Config config = port.getDefaultConfig();
      Authorize authorize = config.getAuthorize();
      assertTrue("Unchecked", authorize.isUnchecked());
      List<Role> roles = authorize.getRoles();

      assertEquals("Expected 0 roles", 0, roles.size());
View Full Code Here

      return operationConfig != null ? operationConfig : configuration.getDefaultConfig();
   }

   private Config selectOperationConfig(WSSecurityConfiguration configuration, QName portName, QName opName)
   {
      Port port = configuration.getPorts().get(portName != null ? portName.getLocalPart() : null);
      if (port == null)
         return configuration.getDefaultConfig();

      Operation operation = port.getOperations().get(opName != null ? opName.toString() : null);
      if (operation == null)
      {
         //if the operation name was not available or didn't match any wsse configured operation,
         //we fall back to the port wsse config (if available) or the default config.
         Config portConfig = port.getDefaultConfig();
         return (portConfig == null) ? configuration.getDefaultConfig() : portConfig;

      }
      return operation.getConfig();
   }
View Full Code Here

      return operationConfig != null ? operationConfig : configuration.getDefaultConfig();
   }
  
   private static Config selectOperationConfig(WSSecurityConfiguration configuration, QName portName, QName opName)
   {
      Port port = configuration.getPorts().get(portName != null ? portName.getLocalPart() : null);
      if (port == null)
         return configuration.getDefaultConfig();

      Operation operation = port.getOperations().get(opName != null ? opName.toString() : null);
      if (operation == null)
      {
         //if the operation name was not available or didn't match any wsse configured operation,
         //we fall back to the port wsse config (if available) or the default config.
         Config portConfig = port.getDefaultConfig();
         return (portConfig == null) ? configuration.getDefaultConfig() : portConfig;

      }
      return operation.getConfig();
   }
View Full Code Here

      return !configuration.getPorts().isEmpty();
   }

   private Config selectOperationConfig(WSSecurityConfiguration configuration, QName portName, QName opName)
   {
      Port port = configuration.getPorts().get(portName != null ? portName.getLocalPart() : null);
      if (port == null)
         return configuration.getDefaultConfig();

      Operation operation = port.getOperations().get(opName != null ? opName.toString() : null);
      if (operation == null)
      {
         //if the operation name was not available or didn't match any wsse configured operation,
         //we fall back to the port wsse config (if available) or the default config.
         Config portConfig = port.getDefaultConfig();
         return (portConfig == null) ? configuration.getDefaultConfig() : portConfig;

      }
      return operation.getConfig();
   }
View Full Code Here

/*  83 */     return newList;
/*     */   }
/*     */
/*     */   private static Config getConfig(WSSecurityConfiguration config, String portName, String opName)
/*     */   {
/*  88 */     Port port = (Port)config.getPorts().get(portName);
/*  89 */     if (port == null) {
/*  90 */       return config.getDefaultConfig();
/*     */     }
/*  92 */     Operation operation = (Operation)port.getOperations().get(opName);
/*  93 */     if (operation == null)
/*     */     {
/*  95 */       Config portConfig = port.getDefaultConfig();
/*  96 */       return portConfig == null ? config.getDefaultConfig() : portConfig;
/*     */     }
/*     */
/* 100 */     return operation.getConfig();
/*     */   }
View Full Code Here

      return newList;
   }

   private static Config getConfig(WSSecurityConfiguration config, String portName, String opName)
   {
      Port port = config.getPorts().get(portName);
      if (port == null)
         return config.getDefaultConfig();

      Operation operation = port.getOperations().get(opName);
      if (operation == null)
      {
         Config portConfig = port.getDefaultConfig();
         return (portConfig == null) ? config.getDefaultConfig() : portConfig;

      }

      return operation.getConfig();
View Full Code Here

      return operationConfig != null ? operationConfig : configuration.getDefaultConfig();
   }

   private static Config selectOperationConfig(WSSecurityConfiguration configuration, QName portName, QName opName)
   {
      Port port = configuration.getPorts().get(portName != null ? portName.getLocalPart() : null);
      if (port == null)
         return configuration.getDefaultConfig();

      Operation operation = port.getOperations().get(opName != null ? opName.toString() : null);
      if (operation == null)
      {
         //if the operation name was not available or didn't match any wsse configured operation,
         //we fall back to the port wsse config (if available) or the default config.
         Config portConfig = port.getDefaultConfig();
         return (portConfig == null) ? configuration.getDefaultConfig() : portConfig;

      }
      return operation.getConfig();
   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.metadata.wsse.Port

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.