本文整理汇总了Java中org.apache.axis2.description.AxisServiceGroup类的典型用法代码示例。如果您正苦于以下问题:Java AxisServiceGroup类的具体用法?Java AxisServiceGroup怎么用?Java AxisServiceGroup使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AxisServiceGroup类属于org.apache.axis2.description包,在下文中一共展示了AxisServiceGroup类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTenantAxisService
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
/**
* Get the details of a deployed webapp for tenants
*
* @param serviceURL URI path
* @return meta data for webapp
*/
private static AxisService getTenantAxisService(String tenant, String serviceURL) throws AxisFault {
ConfigurationContextService contextService = IntegratorComponent.getContextService();
ConfigurationContext configContext;
ConfigurationContext tenantContext;
if (null != contextService) {
// Getting server's configContext instance
configContext = contextService.getServerConfigContext();
String[] urlparts = serviceURL.split("/");
//urlpart[0] is tenant domain
tenantContext = TenantAxisUtils.getTenantConfigurationContext(tenant, configContext);
AxisService tenantAxisService = tenantContext.getAxisConfiguration().getService(urlparts[1]);
if (tenantAxisService == null) {
AxisServiceGroup axisServiceGroup = tenantContext.getAxisConfiguration().getServiceGroup(urlparts[1]);
if (axisServiceGroup != null) {
return axisServiceGroup.getService(urlparts[2]);
} else {
// for dss samples
return tenantContext.getAxisConfiguration().getService(urlparts[2]);
}
} else {
return tenantAxisService;
}
}
return null;
}
示例2: getOperationClient
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
private static OperationClient getOperationClient(MessageContext partnerMessageContext,
ConfigurationContext clientConfigCtx)
throws AxisFault {
AxisService anonymousService =
AnonymousServiceFactory.getAnonymousService(Constants.registrationService,
Constants.REGISTRATION_PORT,
clientConfigCtx.getAxisConfiguration(), Constants.HUMANTASK_COORDINATION_MODULE_NAME);
anonymousService.getParent().addParameter("hiddenService", "true");
ServiceGroupContext sgc = new ServiceGroupContext(clientConfigCtx, (AxisServiceGroup) anonymousService.getParent());
ServiceContext serviceCtx = sgc.getServiceContext(anonymousService);
AxisOperation axisAnonymousOperation = anonymousService.getOperation(ServiceClient.ANON_OUT_IN_OP);
Options clientOptions = cloneOptions(partnerMessageContext.getOptions());
clientOptions.setExceptionToBeThrownOnSOAPFault(false);
/* This value doesn't overrideend point config. */
clientOptions.setTimeOutInMilliSeconds(60000);
return axisAnonymousOperation.createClient(serviceCtx, clientOptions);
}
示例3: getOperationClient
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
private static OperationClient getOperationClient(ServiceInvocationContext partnerMessageContext,
ConfigurationContext clientConfigCtx)
throws AxisFault {
AxisService anonymousService =
AnonymousServiceFactory.getAnonymousService(partnerMessageContext.getService(),
partnerMessageContext.getPort(),
clientConfigCtx.getAxisConfiguration(), partnerMessageContext.getCaller());
anonymousService.engageModule(clientConfigCtx.getAxisConfiguration().getModule("UEPModule"));
anonymousService.getParent().addParameter(
"hiddenService", "true");
ServiceGroupContext sgc = new ServiceGroupContext(
clientConfigCtx, (AxisServiceGroup) anonymousService.getParent());
ServiceContext serviceCtx = sgc.getServiceContext(anonymousService);
// get a reference to the DYNAMIC operation of the Anonymous Axis2 service
AxisOperation axisAnonymousOperation = anonymousService.getOperation(
partnerMessageContext.isTwoWay() ? ServiceClient.ANON_OUT_IN_OP :
ServiceClient.ANON_OUT_ONLY_OP);
Options clientOptions = cloneOptions(partnerMessageContext.getInMessageContext().getOptions());
clientOptions.setExceptionToBeThrownOnSOAPFault(false);
/* This value doesn't overrideend point config. */
clientOptions.setTimeOutInMilliSeconds(60000);
return axisAnonymousOperation.createClient(serviceCtx, clientOptions);
}
示例4: getOperationClient
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
public static OperationClient getOperationClient(BPELMessageContext partnerMessageContext,
ConfigurationContext clientConfigCtx)
throws AxisFault {
AxisService anonymousService =
AnonymousServiceFactory.getAnonymousService(partnerMessageContext.getService(),
partnerMessageContext.getPort(),
clientConfigCtx.getAxisConfiguration(), partnerMessageContext.getCaller());
anonymousService.engageModule(clientConfigCtx.getAxisConfiguration().getModule("UEPModule"));
anonymousService.getParent().addParameter(
BPELConstants.HIDDEN_SERVICE_PARAM, "true");
ServiceGroupContext sgc = new ServiceGroupContext(
clientConfigCtx, (AxisServiceGroup) anonymousService.getParent());
ServiceContext serviceCtx = sgc.getServiceContext(anonymousService);
// get a reference to the DYNAMIC operation of the Anonymous Axis2 service
AxisOperation axisAnonymousOperation = anonymousService.getOperation(
partnerMessageContext.isTwoWay() ? ServiceClient.ANON_OUT_IN_OP :
ServiceClient.ANON_OUT_ONLY_OP);
Options clientOptions = cloneOptions(partnerMessageContext.getInMessageContext().getOptions());
clientOptions.setExceptionToBeThrownOnSOAPFault(false);
/* This value doesn't overrideend point config. */
clientOptions.setTimeOutInMilliSeconds(60000);
return axisAnonymousOperation.createClient(serviceCtx, clientOptions);
}
示例5: deployService
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
private void deployService(List alreadyDeployed, DeploymentFileData archiveFileData) throws AxisFault {
File file = archiveFileData.getFile();
File wsdlFile;
File scriptFile;
if (file.toString().endsWith(".wsdl")) {
wsdlFile = file;
scriptFile = getScriptForWSDL(wsdlFile);
} else {
scriptFile = file;
wsdlFile = getWSDLForScript(scriptFile);
}
if (scriptFile != null && wsdlFile != null && !alreadyDeployed.contains(scriptFile.toURI()) && scriptFile.exists() && wsdlFile.exists()) {
AxisService axisService = createService(wsdlFile, scriptFile);
AxisServiceGroup axisServiceGroup = new AxisServiceGroup(axisConfig);
axisServiceGroup.setServiceGroupClassLoader(axisService.getClassLoader());
axisServiceGroup.setServiceGroupName(axisService.getName());
axisServiceGroup.addService(axisService);
realAxisConfig.addServiceGroup(axisServiceGroup);
alreadyDeployed.add(scriptFile.toURI());
log.info("Deployed script service '" + axisService.getName() + "' for script: " + scriptFile.getName());
}
}
示例6: createMockMessageContext
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
public static MessageContext createMockMessageContext(String payload) throws AxisFault {
MessageContext inMC = new MessageContext();
SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
OMDocument omDoc = OMAbstractFactory.getSOAP11Factory().createOMDocument();
omDoc.addChild(envelope);
envelope.getBody().addChild(TestUtils.createOMElement(payload));
inMC.setEnvelope(envelope);
AxisConfiguration axisConfig = new AxisConfiguration();
AxisService as = new AxisService();
as.setName("ScriptService");
AxisServiceGroup asg = new AxisServiceGroup(axisConfig);
asg.addService(as);
as.addParameter(new Parameter("script.js",
"function invoke(inMC, outMC) { outMC.setPayloadXML(" +
payload + ")}"));
ConfigurationContext cfgCtx = new ConfigurationContext(axisConfig);
ServiceGroupContext sgc = cfgCtx.createServiceGroupContext(asg);
inMC.setAxisService(as);
inMC.setServiceContext(sgc.getServiceContext(as));
return inMC;
}
示例7: execute
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
public void execute(ConfigurationContext configCtx) throws ClusteringFault {
List serviceGroupNames = new ArrayList();
AxisConfiguration axisConfig = configCtx.getAxisConfiguration();
for (Iterator iter = axisConfig.getServiceGroups(); iter.hasNext();) {
AxisServiceGroup serviceGroup = (AxisServiceGroup) iter.next();
boolean excludeSG = false;
for (Iterator serviceIter = serviceGroup.getServices(); serviceIter.hasNext();) {
AxisService service = (AxisService) serviceIter.next();
if (service.getParameter(AxisModule.MODULE_SERVICE) != null ||
service.isClientSide()) { // No need to send services deployed through modules or client side services
excludeSG = true;
break;
}
}
//TODO: Exclude all services loaded from modules. How to handle data services etc.?
if (!excludeSG) {
serviceGroupNames.add(serviceGroup.getServiceGroupName());
}
}
this.serviceGroupNames =
(String[]) serviceGroupNames.toArray(new String[serviceGroupNames.size()]);
}
示例8: execute
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
public void execute(ConfigurationContext configContext) throws ClusteringFault {
ServiceGroupContext sgCtx =
configContext.getServiceGroupContext(serviceGroupContextId);
// If the ServiceGroupContext is not found, create it
if (sgCtx == null) {
AxisServiceGroup axisServiceGroup =
configContext.getAxisConfiguration().getServiceGroup(serviceGroupName);
if(axisServiceGroup == null){
return;
}
sgCtx = new ServiceGroupContext(configContext, axisServiceGroup);
sgCtx.setId(serviceGroupContextId);
configContext.addServiceGroupContextIntoSoapSessionTable(sgCtx); // TODO: Check this
}
if (log.isDebugEnabled()) {
log.debug("Gonna update SG prop in " + serviceGroupContextId + "===" + sgCtx);
}
propertyUpdater.updateProperties(sgCtx);
}
示例9: init
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
public static void init(AxisConfiguration configuration) {
classLoaders.put("system", configuration.getSystemClassLoader());
classLoaders.put("axis2", ClassLoaderUtil.class.getClassLoader());
for (Iterator iter = configuration.getServiceGroups(); iter.hasNext(); ) {
AxisServiceGroup group = (AxisServiceGroup) iter.next();
ClassLoader serviceGroupClassLoader = group.getServiceGroupClassLoader();
if (serviceGroupClassLoader != null) {
classLoaders.put(getServiceGroupMapKey(group), serviceGroupClassLoader);
}
}
for (Object obj : configuration.getModules().values()) {
AxisModule module = (AxisModule) obj;
ClassLoader moduleClassLoader = module.getModuleClassLoader();
if (moduleClassLoader != null) {
classLoaders.put(getModuleMapKey(module), moduleClassLoader);
}
}
}
示例10: processModuleRefs
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
/**
* Gets the list of modules that is required to be engaged globally.
* If the required module is not found this will return the error code 1: which is
* "Error 1: Required module is not found"
*
* @param moduleRefs <code>java.util.Iterator</code>
* @throws org.apache.axis2.deployment.DeploymentException
* <code>DeploymentException</code>
*/
protected void processModuleRefs(Iterator moduleRefs, AxisServiceGroup axisServiceGroup)
throws DeploymentException {
while (moduleRefs.hasNext()) {
OMElement moduleref = (OMElement) moduleRefs.next();
OMAttribute moduleRefAttribute = moduleref.getAttribute(new QName(TAG_REFERENCE));
if (moduleRefAttribute != null) {
String refName = moduleRefAttribute.getAttributeValue();
if (axisConfig.getModule(refName) == null) {
throw new DeploymentException(MODULE_NOT_FOUND_ERROR + refName);
} else {
axisServiceGroup.addModuleref(refName);
}
}
}
}
示例11: undeploy
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
public void undeploy(String fileName) {
//find the hierarchical part of the service group name
String serviceHierarchy = Utils.getServiceHierarchy(fileName, this.directory);
fileName = serviceHierarchy + Utils.getShortFileName(fileName);
try {
AxisServiceGroup serviceGroup =
axisConfig.removeServiceGroup(fileName);
if(configCtx != null) {
configCtx.removeServiceGroupContext(serviceGroup);
}
super.undeploy(fileName);
log.info(Messages.getMessage(DeploymentErrorMsgs.SERVICE_REMOVED,
fileName));
} catch (AxisFault axisFault) {
//May be a faulty service
log.debug(Messages.getMessage(DeploymentErrorMsgs.FAULTY_SERVICE_REMOVAL,
axisFault.getMessage()), axisFault);
axisConfig.removeFaultyService(fileName);
}
}
示例12: configureAddressing
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
private void configureAddressing(AxisServiceGroup serviceGroup) {
EndpointContextMap map =
(EndpointContextMap) configCtx.getProperty(org.apache.axis2.jaxws.Constants.ENDPOINT_CONTEXT_MAP);
if (map == null) {
map = EndpointContextMapManager.getEndpointContextMap();
configCtx.setProperty(org.apache.axis2.jaxws.Constants.ENDPOINT_CONTEXT_MAP, map);
}
Iterator<AxisService> iterator = serviceGroup.getServices();
while (iterator.hasNext()) {
AxisService axisService = iterator.next();
Parameter param =
axisService.getParameter(EndpointDescription.AXIS_SERVICE_PARAMETER);
EndpointDescription ed = (EndpointDescription) param.getValue();
QName serviceName = ed.getServiceQName();
QName portName = ed.getPortQName();
EndpointKey key = new EndpointKey(serviceName, portName);
map.put(key, axisService);
}
}
示例13: buildServiceGroup
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
/**
* To build a AxisServiceGroup for a given services.xml
* You have to add the created group into AxisConfig
*
* @param servicesxml InputStream created from services.xml or equivalent
* @param classLoader ClassLoader to use
* @param serviceGroupName name of the service group
* @param configCtx the ConfigurationContext in which we're deploying
* @param archiveReader the ArchiveReader we're working with
* @param wsdlServices Map of existing WSDL services
* @return a fleshed-out AxisServiceGroup
* @throws AxisFault if there's a problem
*/
public static AxisServiceGroup buildServiceGroup(InputStream servicesxml,
ClassLoader classLoader,
String serviceGroupName,
ConfigurationContext configCtx,
ArchiveReader archiveReader,
HashMap wsdlServices) throws AxisFault {
DeploymentFileData currentDeploymentFile = new DeploymentFileData(null, null);
currentDeploymentFile.setClassLoader(classLoader);
AxisServiceGroup serviceGroup = new AxisServiceGroup();
serviceGroup.setServiceGroupClassLoader(classLoader);
serviceGroup.setServiceGroupName(serviceGroupName);
AxisConfiguration axisConfig = configCtx.getAxisConfiguration();
try {
ArrayList serviceList = archiveReader.buildServiceGroup(servicesxml,
currentDeploymentFile,
serviceGroup,
wsdlServices, configCtx);
fillServiceGroup(serviceGroup, serviceList, null, axisConfig);
return serviceGroup;
} catch (XMLStreamException e) {
throw AxisFault.makeFault(e);
}
}
示例14: processModuleRefs
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
/**
* Gets the list of modules that is required to be engaged globally.
*
* @param moduleRefs <code>java.util.Iterator</code>
* @throws DeploymentException <code>DeploymentException</code>
*/
protected void processModuleRefs(Iterator moduleRefs, AxisServiceGroup axisServiceGroup)
throws DeploymentException {
// try {
while (moduleRefs.hasNext()) {
OMElement moduleref = (OMElement) moduleRefs.next();
OMAttribute moduleRefAttribute = moduleref.getAttribute(new QName(TAG_REFERENCE));
if (moduleRefAttribute != null) {
String refName = moduleRefAttribute.getAttributeValue();
axisServiceGroup.addModuleref(refName);
// if (axisConfig.getModule(refName) == null) {
// throw new DeploymentException(
// Messages.getMessage(DeploymentErrorMsgs.MODULE_NOT_FOUND, refName));
// } else {
// axisServiceGroup.addModuleref(refName);
// }
}
}
// } catch (AxisFault axisFault) {
// throw new DeploymentException(axisFault);
// }
}
示例15: processServiceModuleConfig
import org.apache.axis2.description.AxisServiceGroup; //导入依赖的package包/类
protected void processServiceModuleConfig(Iterator moduleConfigs, ParameterInclude parent,
AxisServiceGroup axisService)
throws DeploymentException {
while (moduleConfigs.hasNext()) {
OMElement moduleConfig = (OMElement) moduleConfigs.next();
OMAttribute moduleName_att = moduleConfig.getAttribute(new QName(ATTRIBUTE_NAME));
if (moduleName_att == null) {
throw new DeploymentException(
Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE_CONFIG));
} else {
String module = moduleName_att.getAttributeValue();
ModuleConfiguration moduleConfiguration =
new ModuleConfiguration(module, parent);
Iterator parameters = moduleConfig.getChildrenWithName(new QName(TAG_PARAMETER));
processParameters(parameters, moduleConfiguration, parent);
axisService.addModuleConfig(moduleConfiguration);
}
}
}