Package org.jboss.wsf.spi.annotation

Examples of org.jboss.wsf.spi.annotation.WebContext


    * @param endpoint EJB webservice endpoint
    * @return authentication method or null if not specified
    */
   public String getAuthMethod(final Endpoint endpoint)
   {
      final WebContext webContext = this.getWebContextAnnotation(endpoint);
      final boolean hasAuthMethod = (webContext != null) && (webContext.authMethod().length() > 0);

      return hasAuthMethod ? webContext.authMethod() : super.getAuthMethod(endpoint);
   }
View Full Code Here


    * @param endpoint EJB webservice endpoint
    * @return whether WSDL access have to be secured
    */
   public boolean isSecureWsdlAccess(final Endpoint endpoint)
   {
      final WebContext webContext = this.getWebContextAnnotation(endpoint);
      final boolean hasSecureWsdlAccess = (webContext != null) && (webContext.secureWSDLAccess());

      return hasSecureWsdlAccess ? true : super.isSecureWsdlAccess(endpoint);
   }
View Full Code Here

    * @param endpoint EJB webservice endpoint
    * @return transport guarantee or null if not specified
    */
   public String getTransportGuarantee(final Endpoint endpoint)
   {
      final WebContext webContext = this.getWebContextAnnotation(endpoint);
      final boolean hasTransportGuarantee = (webContext != null) && (webContext.transportGuarantee().length() > 0);

      return hasTransportGuarantee ? webContext.transportGuarantee() : super.getTransportGuarantee(endpoint);
   }
View Full Code Here

         Boolean secureWSDLAccess = null;
         String transportGuarantee = null;
         String beanAuthMethod = null;

         WebContext anWebContext = (WebContext)ep.getTargetBeanClass().getAnnotation(WebContext.class);
         if (anWebContext != null)
         {
            if (anWebContext.authMethod().length() > 0)
               beanAuthMethod = anWebContext.authMethod();
            if (anWebContext.transportGuarantee().length() > 0)
               transportGuarantee = anWebContext.transportGuarantee();
            if (anWebContext.secureWSDLAccess())
               secureWSDLAccess = anWebContext.secureWSDLAccess();
         }

         EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
         if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
         {
View Full Code Here

      // Use the virtual hosts from @WebContext.virtualHosts
      for (Endpoint ep : dep.getService().getEndpoints())
      {
         Class implClass = ep.getTargetBeanClass();
         WebContext anWebContext = (WebContext)implClass.getAnnotation(WebContext.class);
         if (anWebContext != null && anWebContext.virtualHosts() != null && anWebContext.virtualHosts().length > 0)
         {
            String[] anVirtualHosts = anWebContext.virtualHosts();
            // Avoid modifying the annotation values.
            String[] temp = new String[anVirtualHosts.length];
            System.arraycopy(anVirtualHosts, 0, temp, 0, anVirtualHosts.length);
            Arrays.sort(temp);
View Full Code Here

         Boolean secureWSDLAccess = null;
         String transportGuarantee = null;
         String beanAuthMethod = null;

         WebContext anWebContext = (WebContext)ep.getTargetBeanClass().getAnnotation(WebContext.class);
         if (anWebContext != null)
         {
            if (anWebContext.authMethod().length() > 0)
               beanAuthMethod = anWebContext.authMethod();
            if (anWebContext.transportGuarantee().length() > 0)
               transportGuarantee = anWebContext.transportGuarantee();
            if (anWebContext.secureWSDLAccess())
               secureWSDLAccess = anWebContext.secureWSDLAccess();
         }

         EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
         if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
         {
View Full Code Here

      // #3 For EJB use @WebContext.urlPattern
      if (urlPattern == null)
      {
         Class beanClass = ep.getTargetBeanClass();
         WebContext anWebContext = (WebContext)beanClass.getAnnotation(WebContext.class);
         if (anWebContext != null && anWebContext.urlPattern().length() > 0)
            urlPattern = anWebContext.urlPattern();
      }

      return urlPattern;
   }
View Full Code Here

      if (contextRoot == null)
      {
         for (Endpoint ep : dep.getService().getEndpoints())
         {
            Class implClass = ep.getTargetBeanClass();
            WebContext anWebContext = (WebContext)implClass.getAnnotation(WebContext.class);
            if (anWebContext != null && anWebContext.contextRoot().length() > 0)
            {
               if (contextRoot != null && contextRoot.equals(anWebContext.contextRoot()) == false)
                  throw new IllegalStateException("Context root must be the same for all deployed endpoints");

               contextRoot = anWebContext.contextRoot();
            }
         }
      }

      // #3 Use the explicit context root from webservices/context-root
View Full Code Here

         Boolean secureWSDLAccess = null;
         String transportGuarantee = null;
         String beanAuthMethod = null;

         WebContext anWebContext = (WebContext)ep.getTargetBeanClass().getAnnotation(WebContext.class);
         if (anWebContext != null)
         {
            if (anWebContext.authMethod().length() > 0)
               beanAuthMethod = anWebContext.authMethod();
            if (anWebContext.transportGuarantee().length() > 0)
               transportGuarantee = anWebContext.transportGuarantee();
            if (anWebContext.secureWSDLAccess())
               secureWSDLAccess = anWebContext.secureWSDLAccess();
         }

         EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
         if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
         {
View Full Code Here

      }
      else
      {
         //TODO Unify annotation scans
         Class implClass = ep.getTargetBeanClass();
         WebContext anWebContext = (WebContext)implClass.getAnnotation(WebContext.class);
         if (anWebContext != null)
         {
            transportGuarantee = anWebContext.transportGuarantee();
         }
      }
      return "CONFIDENTIAL".equals(transportGuarantee);
   }
View Full Code Here

TOP

Related Classes of org.jboss.wsf.spi.annotation.WebContext

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.