本文整理汇总了Java中org.apache.axis2.description.AxisServiceGroup.setServiceGroupName方法的典型用法代码示例。如果您正苦于以下问题:Java AxisServiceGroup.setServiceGroupName方法的具体用法?Java AxisServiceGroup.setServiceGroupName怎么用?Java AxisServiceGroup.setServiceGroupName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis2.description.AxisServiceGroup
的用法示例。
在下文中一共展示了AxisServiceGroup.setServiceGroupName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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());
}
}
示例2: 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);
}
}
示例3: createServiceGroupForService
import org.apache.axis2.description.AxisServiceGroup; //导入方法依赖的package包/类
private AxisServiceGroup createServiceGroupForService(AxisService svc) throws AxisFault {
AxisServiceGroup svcGroup = new AxisServiceGroup();
svcGroup.setServiceGroupName(svc.getName());
svcGroup.addService(svc);
svcGroup.addParameter(new Parameter(CarbonConstants.PRESERVE_SERVICE_HISTORY_PARAM, "true"));
return svcGroup;
}
示例4: createServiceGroupForService
import org.apache.axis2.description.AxisServiceGroup; //导入方法依赖的package包/类
private AxisServiceGroup createServiceGroupForService(AxisService svc) throws AxisFault {
AxisServiceGroup svcGroup = new AxisServiceGroup();
svcGroup.setServiceGroupName(svc.getName());
svcGroup.addService(svc);
// Checking configured using files param is not a good solution. We must figure out a way to handle this
// at Carbon persistence manager layer.
if (svc.getParameter(CarbonConstants.PRESERVE_SERVICE_HISTORY_PARAM) != null &&
svc.getParameter(BusinessProcessConstants.CONFIGURED_USING_BPEL_PKG_CONFIG_FILES) == null) {
svcGroup.addParameter(new Parameter(CarbonConstants.PRESERVE_SERVICE_HISTORY_PARAM, "true"));
}
return svcGroup;
}
示例5: loadServiceGroup
import org.apache.axis2.description.AxisServiceGroup; //导入方法依赖的package包/类
public static AxisServiceGroup loadServiceGroup(File serviceFile,
ConfigurationContext configCtx)
throws AxisFault {
try {
DeploymentFileData currentDeploymentFile = new DeploymentFileData(serviceFile, null);
DeploymentClassLoader classLoader = Utils.createClassLoader(serviceFile,
configCtx.getAxisConfiguration().isChildFirstClassLoading());
currentDeploymentFile.setClassLoader(classLoader);
AxisServiceGroup serviceGroup = new AxisServiceGroup();
serviceGroup.setServiceGroupClassLoader(classLoader);
// Drop the extension and take the name
String fileName = serviceFile.getName();
String serviceGroupName = fileName.substring(0, fileName.lastIndexOf("."));
serviceGroup.setServiceGroupName(serviceGroupName);
AxisConfiguration axisConfig = configCtx.getAxisConfiguration();
ArchiveReader archiveReader = new ArchiveReader();
HashMap wsdlServices = archiveReader.processWSDLs(currentDeploymentFile);
InputStream serviceXml = classLoader.getResourceAsStream("META-INF/services.xml");
ArrayList serviceList = archiveReader.buildServiceGroup(serviceXml,
currentDeploymentFile,
serviceGroup,
wsdlServices, configCtx);
fillServiceGroup(serviceGroup, serviceList, null, axisConfig);
return serviceGroup;
} catch (Exception e) {
throw new DeploymentException(e);
}
}
示例6: testServiceGroup
import org.apache.axis2.description.AxisServiceGroup; //导入方法依赖的package包/类
public void testServiceGroup() throws AxisFault {
final String SERVICE1 = "serevice1";
final String SERVICE2 = "serevice2";
final String SERVICE4 = "serevice4";
final String SERVICE_GROUP2 = "ServiceGroup2";
config = ConfigurationContextFactory.createEmptyConfigurationContext()
.getAxisConfiguration();
// First create a ServiceGroup with S1 and S4
AxisServiceGroup axisServiceGroup1 = new AxisServiceGroup();
axisServiceGroup1.setServiceGroupName("ServiceGroup1");
AxisService service1 = new AxisService();
service1.setName(SERVICE1);
axisServiceGroup1.addService(service1);
AxisService service4 = new AxisService();
service4.setName(SERVICE4);
axisServiceGroup1.addService(service4);
config.addServiceGroup(axisServiceGroup1);
// Now create another ServiceGroup with S2 and S4
AxisServiceGroup axisServiceGroup2 = new AxisServiceGroup();
axisServiceGroup2.setServiceGroupName(SERVICE_GROUP2);
AxisService service2 = new AxisService();
service2.setName(SERVICE2);
axisServiceGroup2.addService(service2);
AxisService service24 = new AxisService();
service24.setName(SERVICE4);
axisServiceGroup2.addService(service24);
try {
// This should fail!
config.addServiceGroup(axisServiceGroup2);
} catch (AxisFault axisFault) {
// This is expected because S4 was a duplicate name to an already existing service
assertTrue("Caught the wrong fault!", axisFault.getMessage().indexOf(SERVICE4) > -1);
}
AxisService service = config.getService(SERVICE1);
assertNotNull("Service 1 wasn't deployed!", service);
service = config.getService(SERVICE4);
assertNotNull("Service 4 wasn't deployed!", service);
service = config.getService(SERVICE2);
assertNull("Service 2 wasn't supposed to be deployed!", service);
assertNull("ServiceGroup2 wasn't supposed to be deployed!",
config.getServiceGroup("service2"));
}
示例7: addService
import org.apache.axis2.description.AxisServiceGroup; //导入方法依赖的package包/类
/**
* Add an AxisService to our global configuration. Since services must
* be in ServiceGroups, we construct an anonymous AxisServiceGroup around
* the passed AxisService and then call addServiceGroup().
*
* @param service an AxisService to deploy.
* @throws AxisFault if something goes wrong (invalid service, service is
* already deployed, etc...)
*/
public synchronized void addService(AxisService service) throws AxisFault {
AxisServiceGroup axisServiceGroup = new AxisServiceGroup();
axisServiceGroup.setServiceGroupName(service.getName());
axisServiceGroup.setParent(this);
axisServiceGroup.addService(service);
addServiceGroup(axisServiceGroup);
// processEndpoints(service, service.getAxisConfiguration());
}