本文整理汇总了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);
}
示例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);
}
}
示例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;
}
示例4: parse
import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData; //导入依赖的package包/类
@Override
public JBossWebservicesMetaData parse(URL url)
{
return new JBossWebservicesFactory(url).load(url);
}
示例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;
}