Package org.jboss.wsf.spi.annotation

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


         sepMetaData.setConfigName(configName, configFile);
   }

   protected void processWebContext(Deployment dep, Class<?> wsClass, String linkName, ServerEndpointMetaData sepMetaData)
   {
      WebContext anWebContext = wsClass.getAnnotation(WebContext.class);

      if (anWebContext == null)
         return;

      boolean isJSEEndpoint = (dep.getType() == DeploymentType.JAXWS_JSE);

      // context-root
      if (anWebContext.contextRoot().length() > 0)
      {
         if (isJSEEndpoint)
         {
            log.warn("@WebContext.contextRoot is only valid on EJB endpoints");
         }
         else
         {
            String contextRoot = anWebContext.contextRoot();
            if (contextRoot.startsWith("/") == false)
               contextRoot = "/" + contextRoot;

            sepMetaData.setContextRoot(contextRoot);
         }
      }

      // url-pattern
      if (anWebContext.urlPattern().length() > 0)
      {
         if (isJSEEndpoint)
         {
            log.warn("@WebContext.urlPattern is only valid on EJB endpoints");
         }
         else
         {
            String urlPattern = anWebContext.urlPattern();
            sepMetaData.setURLPattern(urlPattern);
         }
      }

      // auth-method
      if (anWebContext.authMethod().length() > 0)
      {
         if (isJSEEndpoint)
         {
            log.warn("@WebContext.authMethod is only valid on EJB endpoints");
         }
         else
         {
            String authMethod = anWebContext.authMethod();
            sepMetaData.setAuthMethod(authMethod);
         }
      }

      // transport-guarantee
      if (anWebContext.transportGuarantee().length() > 0)
      {
         if (isJSEEndpoint)
         {
            log.warn("@WebContext.transportGuarantee is only valid on EJB endpoints");
         }
         else
         {
            String transportGuarantee = anWebContext.transportGuarantee();
            sepMetaData.setTransportGuarantee(transportGuarantee);
         }
      }

      // secure wsdl access
      sepMetaData.setSecureWSDLAccess(anWebContext.secureWSDLAccess());
   }
View Full Code Here

         sepMetaData.setConfigName(configName, configFile);
   }

   protected void processWebContext(Deployment dep, Class<?> wsClass, String linkName, ServerEndpointMetaData sepMetaData)
   {
      WebContext anWebContext = wsClass.getAnnotation(WebContext.class);

      if (anWebContext == null)
         return;

      boolean isJSEEndpoint = (dep.getType() == DeploymentType.JAXWS_JSE);

      // context-root
      if (anWebContext.contextRoot().length() > 0)
      {
         if (isJSEEndpoint)
         {
            log.warn("@WebContext.contextRoot is only valid on EJB endpoints");
         }
         else
         {
            String contextRoot = anWebContext.contextRoot();
            if (contextRoot.startsWith("/") == false)
               contextRoot = "/" + contextRoot;

            sepMetaData.setContextRoot(contextRoot);
         }
      }

      // url-pattern
      if (anWebContext.urlPattern().length() > 0)
      {
         if (isJSEEndpoint)
         {
            log.warn("@WebContext.urlPattern is only valid on EJB endpoints");
         }
         else
         {
            String urlPattern = anWebContext.urlPattern();
            sepMetaData.setURLPattern(urlPattern);
         }
      }

      // auth-method
      if (anWebContext.authMethod().length() > 0)
      {
         if (isJSEEndpoint)
         {
            log.warn("@WebContext.authMethod is only valid on EJB endpoints");
         }
         else
         {
            String authMethod = anWebContext.authMethod();
            sepMetaData.setAuthMethod(authMethod);
         }
      }

      // transport-guarantee
      if (anWebContext.transportGuarantee().length() > 0)
      {
         if (isJSEEndpoint)
         {
            log.warn("@WebContext.transportGuarantee is only valid on EJB endpoints");
         }
         else
         {
            String transportGuarantee = anWebContext.transportGuarantee();
            sepMetaData.setTransportGuarantee(transportGuarantee);
         }
      }

      // secure wsdl access
      sepMetaData.setSecureWSDLAccess(anWebContext.secureWSDLAccess());
   }
View Full Code Here

         sepMetaData.setConfigName(configName, configFile);
   }

   protected void processWebContext(Deployment dep, Class<?> wsClass, String linkName, ServerEndpointMetaData sepMetaData)
   {
      WebContext anWebContext = wsClass.getAnnotation(WebContext.class);

      if (anWebContext == null)
         return;

      boolean isJSEEndpoint = (dep.getType() == DeploymentType.JAXWS_JSE);

      // context-root
      if (anWebContext.contextRoot().length() > 0)
      {
         if (isJSEEndpoint)
         {
            log.warn("@WebContext.contextRoot is only valid on EJB endpoints");
         }
         else
         {
            String contextRoot = anWebContext.contextRoot();
            if (contextRoot.startsWith("/") == false)
               contextRoot = "/" + contextRoot;

            sepMetaData.setContextRoot(contextRoot);
         }
      }

      // url-pattern
      if (anWebContext.urlPattern().length() > 0)
      {
         if (isJSEEndpoint)
         {
            log.warn("@WebContext.urlPattern is only valid on EJB endpoints");
         }
         else
         {
            String urlPattern = anWebContext.urlPattern();
            sepMetaData.setURLPattern(urlPattern);
         }
      }

      // auth-method
      if (anWebContext.authMethod().length() > 0)
      {
         if (isJSEEndpoint)
         {
            log.warn("@WebContext.authMethod is only valid on EJB endpoints");
         }
         else
         {
            String authMethod = anWebContext.authMethod();
            sepMetaData.setAuthMethod(authMethod);
         }
      }

      // transport-guarantee
      if (anWebContext.transportGuarantee().length() > 0)
      {
         if (isJSEEndpoint)
         {
            log.warn("@WebContext.transportGuarantee is only valid on EJB endpoints");
         }
         else
         {
            String transportGuarantee = anWebContext.transportGuarantee();
            sepMetaData.setTransportGuarantee(transportGuarantee);
         }
      }

      // secure wsdl access
      sepMetaData.setSecureWSDLAccess(anWebContext.secureWSDLAccess());

      // virtual hosts
      String[] virtualHosts = anWebContext.virtualHosts();
      if (virtualHosts != null & virtualHosts.length > 0)
      {
         sepMetaData.setVirtualHosts(virtualHosts);
      }
   }
View Full Code Here

/*  95 */       sepMetaData.setConfigName(configName, configFile);
/*     */   }
/*     */
/*     */   protected void processWebContext(Deployment dep, Class<?> wsClass, String linkName, ServerEndpointMetaData sepMetaData)
/*     */   {
/* 100 */     WebContext anWebContext = (WebContext)wsClass.getAnnotation(WebContext.class);
/*     */
/* 102 */     if (anWebContext == null) {
/* 103 */       return;
/*     */     }
/* 105 */     boolean isJSEEndpoint = dep.getType() == Deployment.DeploymentType.JAXWS_JSE;
/*     */
/* 108 */     if (anWebContext.contextRoot().length() > 0)
/*     */     {
/* 110 */       if (isJSEEndpoint)
/*     */       {
/* 112 */         log.warn("@WebContext.contextRoot is only valid on EJB endpoints");
/*     */       }
/*     */       else
/*     */       {
/* 116 */         String contextRoot = anWebContext.contextRoot();
/* 117 */         if (!contextRoot.startsWith("/")) {
/* 118 */           contextRoot = "/" + contextRoot;
/*     */         }
/* 120 */         sepMetaData.setContextRoot(contextRoot);
/*     */       }
/*     */
/*     */     }
/*     */
/* 125 */     if (anWebContext.urlPattern().length() > 0)
/*     */     {
/* 127 */       if (isJSEEndpoint)
/*     */       {
/* 129 */         log.warn("@WebContext.urlPattern is only valid on EJB endpoints");
/*     */       }
/*     */       else
/*     */       {
/* 133 */         String urlPattern = anWebContext.urlPattern();
/* 134 */         sepMetaData.setURLPattern(urlPattern);
/*     */       }
/*     */
/*     */     }
/*     */
/* 139 */     if (anWebContext.authMethod().length() > 0)
/*     */     {
/* 141 */       if (isJSEEndpoint)
/*     */       {
/* 143 */         log.warn("@WebContext.authMethod is only valid on EJB endpoints");
/*     */       }
/*     */       else
/*     */       {
/* 147 */         String authMethod = anWebContext.authMethod();
/* 148 */         sepMetaData.setAuthMethod(authMethod);
/*     */       }
/*     */
/*     */     }
/*     */
/* 153 */     if (anWebContext.transportGuarantee().length() > 0)
/*     */     {
/* 155 */       if (isJSEEndpoint)
/*     */       {
/* 157 */         log.warn("@WebContext.transportGuarantee is only valid on EJB endpoints");
/*     */       }
/*     */       else
/*     */       {
/* 161 */         String transportGuarantee = anWebContext.transportGuarantee();
/* 162 */         sepMetaData.setTransportGuarantee(transportGuarantee);
/*     */       }
/*     */
/*     */     }
/*     */
/* 167 */     sepMetaData.setSecureWSDLAccess(anWebContext.secureWSDLAccess());
/*     */
/* 170 */     String[] virtualHosts = anWebContext.virtualHosts();
/* 171 */     if (((virtualHosts != null ? 1 : 0) & (virtualHosts.length > 0 ? 1 : 0)) != 0)
/*     */     {
/* 173 */       sepMetaData.setVirtualHosts(virtualHosts);
/*     */     }
/*     */   }
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.