Examples of JSEArchiveMetaData


Examples of org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData

     * @param dep webservice deployment
     * @return universal JSE meta data model
     */
    JSEArchiveMetaData create(final Deployment dep) {
        final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
        final JSEArchiveMetaData jseArchiveMD = new JSEArchiveMetaData();

        // set context root
        final String contextRoot = this.getContextRoot(dep, jbossWebMD);
        jseArchiveMD.setContextRoot(contextRoot);

        // set servlet url patterns mappings
        final Map<String, String> servletMappings = this.getServletUrlPatternsMappings(jbossWebMD);
        jseArchiveMD.setServletMappings(servletMappings);

        // set servlet class names mappings
        final Map<String, String> servletClassNamesMappings = this.getServletClassMappings(jbossWebMD);
        jseArchiveMD.setServletClassNames(servletClassNamesMappings);

        // set security domain
        final String securityDomain = jbossWebMD.getSecurityDomain();
        jseArchiveMD.setSecurityDomain(securityDomain);

        // set wsdl location resolver
        final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(jbossWebMD.getWebserviceDescriptions());
        jseArchiveMD.setPublishLocationAdapter(resolver);

        // set security meta data
        final List<JSESecurityMetaData> jseSecurityMDs = this.getSecurityMetaData(jbossWebMD.getSecurityConstraints());
        jseArchiveMD.setSecurityMetaData(jseSecurityMDs);

        // set config name and file
        this.setConfigNameAndFile(jseArchiveMD, jbossWebMD);

        return jseArchiveMD;
View Full Code Here

Examples of org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData

    @Override
    public void start(final Deployment dep) {
        if (WSHelper.isJseDeployment(dep)) {
            this.log.debug("Creating JBoss agnostic JSE meta data for deployment: " + dep.getSimpleName());
            if (WSHelper.hasAttachment(dep, JBossWebMetaData.class)) {
                final JSEArchiveMetaData jseMetaData = this.metaDataBuilderJSE.create(dep);
                dep.addAttachment(JSEArchiveMetaData.class, jseMetaData);
            }
        }
        else if (WSHelper.isJaxwsEjbDeployment(dep)) {
            this.log.debug("Creating JBoss agnostic EJB3 meta data for deployment: " + dep.getSimpleName());
View Full Code Here

Examples of org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData

    * Read the transport guarantee from web.xml
    */
   protected void initTransportGuaranteeJSE(Deployment dep, ServerEndpointMetaData sepMetaData, String servletLink) throws IOException
   {
      String transportGuarantee = null;
      JSEArchiveMetaData webMetaData = dep.getAttachment(JSEArchiveMetaData.class);
      if (webMetaData != null)
      {
         Map<String, String> servletMappings = webMetaData.getServletMappings();
         String urlPattern = servletMappings.get(servletLink);

         if (urlPattern == null)
            throw new WSException("Cannot find <url-pattern> for servlet-name: " + servletLink);

         List<JSESecurityMetaData> securityList = webMetaData.getSecurityMetaData();
         for (JSESecurityMetaData currentSecurity : securityList)
         {
            if (currentSecurity.getTransportGuarantee() != null && currentSecurity.getTransportGuarantee().length() > 0)
            {
               for (JSEResourceCollection currentCollection : currentSecurity.getWebResources())
View Full Code Here

Examples of org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData

               initEndpointAddress(dep, sepMetaData);
               initEndpointBinding(wsdlEndpoint, sepMetaData);

               EJBArchiveMetaData apMetaData = dep.getAttachment(EJBArchiveMetaData.class);
               JSEArchiveMetaData webMetaData = dep.getAttachment(JSEArchiveMetaData.class);
               if (apMetaData != null)
               {
                  wsMetaData.setSecurityDomain(apMetaData.getSecurityDomain());

                  // Copy the wsdl publish location from jboss.xml
                  String wsdName = serviceMetaData.getWebserviceDescriptionName();
                  String wsdlPublishLocation = apMetaData.getWsdlPublishLocationByName(wsdName);
                  serviceMetaData.setWsdlPublishLocation(wsdlPublishLocation);

                  // Copy <port-component> meta data
                  EJBMetaData bmd = apMetaData.getBeanByEjbName(linkName);
                  if (bmd == null)
                     throw new WSException("Cannot obtain UnifiedBeanMetaData for: " + linkName);

                  String configName = apMetaData.getConfigName();
                  String configFile = apMetaData.getConfigFile();
                  if (configName != null || configFile != null)
                     sepMetaData.setConfigName(configName, configFile);

                  EJBSecurityMetaData smd = bmd.getSecurityMetaData();
                  if (smd != null)
                  {
                     String authMethod = smd.getAuthMethod();
                     sepMetaData.setAuthMethod(authMethod);
                     String transportGuarantee = smd.getTransportGuarantee();
                     sepMetaData.setTransportGuarantee(transportGuarantee);
                     Boolean secureWSDLAccess = smd.getSecureWSDLAccess();
                     sepMetaData.setSecureWSDLAccess(secureWSDLAccess);
                  }
               }
               else if (webMetaData != null)
               {
                  wsMetaData.setSecurityDomain(webMetaData.getSecurityDomain());

                  String targetBean = webMetaData.getServletClassNames().get(linkName);
                  sepMetaData.setServiceEndpointImplName(targetBean);

                  // Copy the wsdl publish location from jboss-web.xml
                  String wsdName = serviceMetaData.getWebserviceDescriptionName();
                  String wsdlPublishLocation = webMetaData.getWsdlPublishLocationByName(wsdName);
                  serviceMetaData.setWsdlPublishLocation(wsdlPublishLocation);

                  String configName = webMetaData.getConfigName();
                  String configFile = webMetaData.getConfigFile();
                  if (configName != null || configFile != null)
                     sepMetaData.setConfigName(configName, configFile);

                  initTransportGuaranteeJSE(dep, sepMetaData, linkName);
               }
View Full Code Here

Examples of org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData

         if (anEndpointConfig.configFile().length() > 0)
            configFile = anEndpointConfig.configFile();
      }
     
      JSEArchiveMetaData jseMetaData = dep.getAttachment(JSEArchiveMetaData.class);
      if (jseMetaData != null)
      {
         if (jseMetaData.getConfigName() != null)
            configName = jseMetaData.getConfigName();
         if (jseMetaData.getConfigFile() != null)
            configFile = jseMetaData.getConfigFile();
      }
     
      EJBArchiveMetaData ejbMetaData = dep.getAttachment(EJBArchiveMetaData.class);
      if (ejbMetaData != null)
      {
View Full Code Here

Examples of org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData

    * Read the transport guarantee from web.xml
    */
   protected void initTransportGuaranteeJSE(Deployment dep, ServerEndpointMetaData sepMetaData, String servletLink) throws IOException
   {
      String transportGuarantee = null;
      JSEArchiveMetaData webMetaData = dep.getAttachment(JSEArchiveMetaData.class);
      if (webMetaData != null)
      {
         Map<String, String> servletMappings = webMetaData.getServletMappings();
         String urlPattern = servletMappings.get(servletLink);

         if (urlPattern == null)
            throw new WSException("Cannot find <url-pattern> for servlet-name: " + servletLink);

         List<JSESecurityMetaData> securityList = webMetaData.getSecurityMetaData();
         for (JSESecurityMetaData currentSecurity : securityList)
         {
            if (currentSecurity.getTransportGuarantee() != null && currentSecurity.getTransportGuarantee().length() > 0)
            {
               for (JSEResourceCollection currentCollection : currentSecurity.getWebResources())
View Full Code Here

Examples of org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData

         if (anEndpointConfig.configFile().length() > 0)
            configFile = anEndpointConfig.configFile();
      }
     
      JSEArchiveMetaData jseMetaData = dep.getAttachment(JSEArchiveMetaData.class);
      if (jseMetaData != null)
      {
         if (jseMetaData.getConfigName() != null)
            configName = jseMetaData.getConfigName();
         if (jseMetaData.getConfigFile() != null)
            configFile = jseMetaData.getConfigFile();
      }
     
      EJBArchiveMetaData ejbMetaData = dep.getAttachment(EJBArchiveMetaData.class);
      if (ejbMetaData != null)
      {
View Full Code Here

Examples of org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData

/*     */       }
/*  72 */       if (anEndpointConfig.configFile().length() > 0) {
/*  73 */         configFile = anEndpointConfig.configFile();
/*     */       }
/*     */     }
/*  76 */     JSEArchiveMetaData jseMetaData = (JSEArchiveMetaData)dep.getAttachment(JSEArchiveMetaData.class);
/*  77 */     if (jseMetaData != null)
/*     */     {
/*  79 */       if (jseMetaData.getConfigName() != null)
/*  80 */         configName = jseMetaData.getConfigName();
/*  81 */       if (jseMetaData.getConfigFile() != null) {
/*  82 */         configFile = jseMetaData.getConfigFile();
/*     */       }
/*     */     }
/*  85 */     EJBArchiveMetaData ejbMetaData = (EJBArchiveMetaData)dep.getAttachment(EJBArchiveMetaData.class);
/*  86 */     if (ejbMetaData != null)
/*     */     {
View Full Code Here

Examples of org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData

/* 145 */           initEndpointEncodingStyle(sepMetaData);
/*     */
/* 147 */           initEndpointAddress(dep, sepMetaData);
/*     */
/* 149 */           EJBArchiveMetaData apMetaData = (EJBArchiveMetaData)dep.getAttachment(EJBArchiveMetaData.class);
/* 150 */           JSEArchiveMetaData webMetaData = (JSEArchiveMetaData)dep.getAttachment(JSEArchiveMetaData.class);
/* 151 */           if (apMetaData != null)
/*     */           {
/* 153 */             wsMetaData.setSecurityDomain(apMetaData.getSecurityDomain());
/*     */
/* 156 */             String wsdName = serviceMetaData.getWebserviceDescriptionName();
/* 157 */             String wsdlPublishLocation = apMetaData.getWsdlPublishLocationByName(wsdName);
/* 158 */             serviceMetaData.setWsdlPublishLocation(wsdlPublishLocation);
/*     */
/* 161 */             EJBMetaData bmd = apMetaData.getBeanByEjbName(linkName);
/* 162 */             if (bmd == null) {
/* 163 */               throw new WSException("Cannot obtain UnifiedBeanMetaData for: " + linkName);
/*     */             }
/* 165 */             String configName = apMetaData.getConfigName();
/* 166 */             String configFile = apMetaData.getConfigFile();
/* 167 */             if ((configName != null) || (configFile != null)) {
/* 168 */               sepMetaData.setConfigName(configName, configFile);
/*     */             }
/* 170 */             EJBSecurityMetaData smd = bmd.getSecurityMetaData();
/* 171 */             if (smd != null)
/*     */             {
/* 173 */               String authMethod = smd.getAuthMethod();
/* 174 */               sepMetaData.setAuthMethod(authMethod);
/* 175 */               String transportGuarantee = smd.getTransportGuarantee();
/* 176 */               sepMetaData.setTransportGuarantee(transportGuarantee);
/* 177 */               Boolean secureWSDLAccess = Boolean.valueOf(smd.getSecureWSDLAccess());
/* 178 */               sepMetaData.setSecureWSDLAccess(secureWSDLAccess.booleanValue());
/*     */             }
/*     */           }
/* 181 */           else if (webMetaData != null)
/*     */           {
/* 183 */             wsMetaData.setSecurityDomain(webMetaData.getSecurityDomain());
/*     */
/* 185 */             String targetBean = (String)webMetaData.getServletClassNames().get(linkName);
/* 186 */             sepMetaData.setServiceEndpointImplName(targetBean);
/*     */
/* 189 */             String wsdName = serviceMetaData.getWebserviceDescriptionName();
/* 190 */             String wsdlPublishLocation = webMetaData.getWsdlPublishLocationByName(wsdName);
/* 191 */             serviceMetaData.setWsdlPublishLocation(wsdlPublishLocation);
/*     */
/* 193 */             String configName = webMetaData.getConfigName();
/* 194 */             String configFile = webMetaData.getConfigFile();
/* 195 */             if ((configName != null) || (configFile != null)) {
/* 196 */               sepMetaData.setConfigName(configName, configFile);
/*     */             }
/* 198 */             initTransportGuaranteeJSE(dep, sepMetaData, linkName);
/*     */           }
View Full Code Here

Examples of org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData

/*     */
/*     */   protected void initTransportGuaranteeJSE(Deployment dep, ServerEndpointMetaData sepMetaData, String servletLink)
/*     */     throws IOException
/*     */   {
/* 250 */     String transportGuarantee = null;
/* 251 */     JSEArchiveMetaData webMetaData = (JSEArchiveMetaData)dep.getAttachment(JSEArchiveMetaData.class);
/*     */     String urlPattern;
/*     */     Iterator i$;
/* 252 */     if (webMetaData != null)
/*     */     {
/* 254 */       Map servletMappings = webMetaData.getServletMappings();
/* 255 */       urlPattern = (String)servletMappings.get(servletLink);
/*     */
/* 257 */       if (urlPattern == null) {
/* 258 */         throw new WSException("Cannot find <url-pattern> for servlet-name: " + servletLink);
/*     */       }
/* 260 */       List securityList = webMetaData.getSecurityMetaData();
/* 261 */       for (i$ = securityList.iterator(); i$.hasNext(); ) { currentSecurity = (JSESecurityMetaData)i$.next();
/*     */
/* 263 */         if ((currentSecurity.getTransportGuarantee() != null) && (currentSecurity.getTransportGuarantee().length() > 0))
/*     */         {
/* 265 */           for (JSESecurityMetaData.JSEResourceCollection currentCollection : currentSecurity.getWebResources())
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.