当前位置: 首页>>代码示例>>Java>>正文


Java JBossWebservicesMetaData类代码示例

本文整理汇总了Java中org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData的典型用法代码示例。如果您正苦于以下问题:Java JBossWebservicesMetaData类的具体用法?Java JBossWebservicesMetaData怎么用?Java JBossWebservicesMetaData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


JBossWebservicesMetaData类属于org.jboss.wsf.spi.metadata.webservices包,在下文中一共展示了JBossWebservicesMetaData类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: BasicConfigResolver

import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData; //导入依赖的package包/类
public BasicConfigResolver(ArchiveDeployment dep, Class<?> implementorClass) {
   String epConfigName = null;
   String epConfigFile = null;
   JSEArchiveMetaData jsemd = dep.getAttachment(JSEArchiveMetaData.class);
   JBossWebservicesMetaData wsmd = dep.getAttachment(JBossWebservicesMetaData.class);
   //first check JSEArchiveMetaData as that has the actual merged value for POJO deployments
   if (jsemd != null) {
      epConfigName = jsemd.getConfigName();
      epConfigFile = jsemd.getConfigFile();
   } else if (wsmd != null) {
      epConfigName = wsmd.getConfigName();
      epConfigFile = wsmd.getConfigFile();
   }
   this.configNameOverride = epConfigName;
   this.configFileOverride = epConfigFile;
   this.implementorClass = implementorClass;
   this.deploymentRoot = dep.getRootFile();
   this.ann = implementorClass.getAnnotation(EndpointConfig.class);
}
 
开发者ID:jbossws,项目名称:jbossws-common,代码行数:20,代码来源:BasicConfigResolver.java

示例2: startDeploymentBus

import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData; //导入依赖的package包/类
private void startDeploymentBus(final Deployment dep)
{
   BusFactory.setThreadDefaultBus(null);
   ClassLoader origClassLoader = SecurityActions.getContextClassLoader();
   try
   {
      final ArchiveDeployment aDep = (ArchiveDeployment) dep;
      final ResourceResolver deploymentResolver = aDep.getResourceResolver();
      final org.apache.cxf.resource.ResourceResolver resolver = new JBossWSResourceResolver(deploymentResolver);

      //set the runtime classloader (pointing to the deployment unit) to allow CXF accessing to the classes;
      //use origClassLoader (which on AS7 is set to ASIL aggregation module's classloader by TCCLDeploymentProcessor) as
      //parent to make sure user provided libs in the deployment do no mess up the WS endpoint's deploy if they duplicates
      //libraries already available on the application server modules.
      SecurityActions.setContextClassLoader(new DelegateClassLoader(dep.getClassLoader(), origClassLoader));
      DDBeans metadata = dep.getAttachment(DDBeans.class);
      BusHolder holder = new BusHolder(metadata);

      Configurer configurer = holder.createServerConfigurer(dep.getAttachment(BindingCustomization.class), new WSDLFilePublisher(aDep), aDep);
      holder.configure(resolver, configurer, dep.getAttachment(JBossWebservicesMetaData.class), dep);
      dep.addAttachment(BusHolder.class, holder);
   }
   finally
   {
      BusFactory.setThreadDefaultBus(null);
      SecurityActions.setContextClassLoader(origClassLoader);
   }
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:29,代码来源:BusDeploymentAspect.java

示例3: getProperties

import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData; //导入依赖的package包/类
private static Map<String, String> getProperties(JBossWebservicesMetaData wsmd) {
   Map<String, String> props;
   if (wsmd != null) {
      props = wsmd.getProperties();
   } else {
      props = Collections.emptyMap();
   }
   return props;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:10,代码来源:BusHolder.java

示例4: parse

import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData; //导入依赖的package包/类
@Override
public JBossWebservicesMetaData parse(URL url)
{
   return new JBossWebservicesFactory(url).load(url);
}
 
开发者ID:jbossws,项目名称:jbossws-common,代码行数:6,代码来源:JBossWebservicesDescriptorParserImpl.java

示例5: enableServerAuthentication

import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData; //导入依赖的package包/类
public boolean enableServerAuthentication(Deployment dep, JBossWebservicesMetaData wsmd)
{
   String securityDomain = null;
   if (wsmd != null)
   {
      securityDomain = wsmd.getProperty(JaspiServerAuthenticator.JASPI_SECURITY_DOMAIN);
   }
   if (securityDomain == null)
   {
      return false;
   }
   ApplicationPolicy appPolicy = SecurityConfiguration.getApplicationPolicy(securityDomain);
   if (appPolicy == null)
   {
      Loggers.ROOT_LOGGER.noApplicationPolicy(securityDomain);
      return false;
   }
   BaseAuthenticationInfo bai = appPolicy.getAuthenticationInfo();
   if (bai == null || bai instanceof AuthenticationInfo)
   {
      Loggers.ROOT_LOGGER.noJaspiApplicationPolicy(securityDomain);
      return false;
   }
   JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai;

   String contextRoot = dep.getService().getContextRoot();
   String appId = "localhost " + contextRoot;
   AuthConfigFactory factory = AuthConfigFactory.getFactory();
   Properties properties = new Properties();
   AuthConfigProvider provider = new JBossWSAuthConfigProvider(properties, factory);
   provider = factory.getConfigProvider(JBossWSAuthConstants.SOAP_LAYER, appId, null);

   JBossCallbackHandler callbackHandler = new JBossCallbackHandler();
   try
   {
      ServerAuthConfig serverConfig = provider.getServerAuthConfig(JBossWSAuthConstants.SOAP_LAYER, appId,
            callbackHandler);
      Properties serverContextProperties = new Properties();
      serverContextProperties.put("security-domain", securityDomain);
      serverContextProperties.put("jaspi-policy", jai);
      Bus bus = dep.getAttachment(Bus.class);
      serverContextProperties.put(Bus.class, bus);
      String authContextID = dep.getSimpleName();
      ServerAuthContext sctx = serverConfig.getAuthContext(authContextID, null, serverContextProperties);
      JaspiServerAuthenticator serverAuthenticator = new JaspiServerAuthenticator(sctx);
      bus.getInInterceptors().add(new JaspiSeverInInterceptor(serverAuthenticator));
      bus.getOutInterceptors().add(new JaspiSeverOutInterceptor(serverAuthenticator));
      return true;
   }
   catch (Exception e)
   {
      Loggers.DEPLOYMENT_LOGGER.cannotCreateServerAuthContext(securityDomain, e);
   }
   return false;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:56,代码来源:DefaultJASPIAuthenticationProvider.java


注:本文中的org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。