Package org.jboss.wsf.spi.metadata.j2ee

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());
            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


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

      try
      {
         // JSE endpoints
         if (unit.getAttachment(JBossWebMetaData.class) != null)
         {
            JSEArchiveMetaData webMetaData = webMetaDataAdapter.buildMetaData(dep, unit);
            if (webMetaData != null)
               dep.addAttachment(JSEArchiveMetaData.class, webMetaData);

            if (dep instanceof ArchiveDeployment)
            {
View Full Code Here

      }
     
      if (contextRoot == null)
         contextRoot = jbossWebMetaData.getContextRoot();
     
      JSEArchiveMetaData umd = new JSEArchiveMetaData();
      umd.setContextRoot(contextRoot);
      umd.setServletMappings(getServletMappings(jbossWebMetaData));
      umd.setServletClassNames(getServletClassMap(jbossWebMetaData));
      umd.setSecurityDomain(jbossWebMetaData.getSecurityDomain());
      umd.setPublishLocationAdapter(getPublishLocationAdpater(jbossWebMetaData));
      umd.setSecurityMetaData(getSecurityMetaData(jbossWebMetaData.getSecurityContraints()));

      setConfigNameAndFile(umd, jbossWebMetaData);
     
      return umd;
   }
View Full Code Here

               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

    * 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

    @Override
    public void start(final Deployment dep) {
        if (WSHelper.isJaxwsJseDeployment(dep)) {
            if (WSHelper.hasAttachment(dep, JBossWebMetaData.class)) {
                WSLogger.ROOT_LOGGER.tracef("Creating JBoss agnostic JAXWS POJO meta data for deployment: %s", dep.getSimpleName());
                final JSEArchiveMetaData jseMetaData = jaxwsPojoMDBuilder.create(dep);
                dep.addAttachment(JSEArchiveMetaData.class, jseMetaData);
            }
        }
        if (WSHelper.isJaxwsEjbDeployment(dep)) {
            WSLogger.ROOT_LOGGER.tracef("Creating JBoss agnostic JAXWS EJB meta data for deployment: %s", dep.getSimpleName());
View Full Code Here

   protected String getExplicitPattern(Deployment dep, Endpoint ep)
   {
      String urlPattern = null;

      // #1 For JSE lookup the url-pattern from the servlet mappings
      JSEArchiveMetaData webMetaData = dep.getAttachment(JSEArchiveMetaData.class);
      if (webMetaData != null)
      {
         String epName = ep.getShortName();
         urlPattern = webMetaData.getServletMappings().get(epName);
         if (urlPattern == null)
            throw new IllegalStateException("Cannot obtain servlet mapping for: " + epName);
      }

      // #2 Use the explicit urlPattern from port-component/port-component-uri
View Full Code Here

   protected String getExplicitContextRoot(Deployment dep)
   {
      String contextRoot = null;

      // #1 Use the explicit context root from the web meta data
      JSEArchiveMetaData webMetaData = dep.getAttachment(JSEArchiveMetaData.class);
      if (webMetaData != null)
         contextRoot = webMetaData.getContextRoot();

      // #2 Use the explicit context root from @WebContext.contextRoot
      if (contextRoot == null)
      {
         for (Endpoint ep : dep.getService().getEndpoints())
View Full Code Here

   protected boolean isConfidentialTransportGuarantee(Deployment dep, Endpoint ep)
   {
      String transportGuarantee = null;
      if (DeploymentType.JAXWS_JSE == dep.getType())
      {
         JSEArchiveMetaData webMetaData = dep.getAttachment(JSEArchiveMetaData.class);
         if (webMetaData != null)
         {
            String servletLink = ep.getShortName();
            Map<String, String> servletMappings = webMetaData.getServletMappings();
            String urlPattern = servletMappings.get(servletLink);
  
            if (urlPattern == null)
               throw new RuntimeException("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

TOP

Related Classes of org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData

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.