Examples of WebContext


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

    * @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

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

    * @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

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

         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

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

      // 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

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

         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

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

      // #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

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

      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

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

         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

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

      }
      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

Examples of org.jmanage.webui.util.WebContext

            throws IOException, ServletException{

        final String requestPath = mapping.getPath();
        logger.fine("Start Request Path:" + requestPath);

        WebContext context = null;
        ActionForward resultForward = null;
        try{
            context = WebContext.get(request);
            /* ensure user is logged-in (except for login page)*/
            resultForward = ensureLoggedIn(context, request, response, mapping);
            if(resultForward == null){
                /*  execute the action  */
                resultForward = action.execute(mapping, form, request, response);
            }
        }catch (Exception e){
            logger.log(Level.FINE, "Exception on Request: " + requestPath, e);
            /* process exception */
            resultForward =
                    processException(request, response, e, form, mapping);
        }finally{
            /* release resources */
            if(context != null)
                context.releaseResources();
            /* logging */
            String resultForwardPath = (resultForward == null) ?
                    "none" : resultForward.getPath();
            if(resultForwardPath == null){
                /* the path attribute of resultForward was null */
 
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.