Package org.wso2.carbon.jarservices
Class JarServiceCreatorAdmin
java.lang.Object
org.wso2.carbon.core.AbstractAdmin
org.wso2.carbon.jarservices.JarServiceCreatorAdmin
public class JarServiceCreatorAdmin
extends org.wso2.carbon.core.AbstractAdmin
-
Field Summary
FieldsFields inherited from class org.wso2.carbon.core.AbstractAdmin
axisConfig, configurationContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateAndDeployService(String directoryPath, String serviceHierarchy, String serviceGroupName, Service[] data) Creates and deploys a service.Service[]getClassMethods(String directoryPath, Service[] services) This method will list all the public methods for the given classes.Methods inherited from class org.wso2.carbon.core.AbstractAdmin
getAxisConfig, getConfigContext, getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamp
-
Field Details
-
bundleContext
public static org.osgi.framework.BundleContext bundleContext
-
-
Constructor Details
-
JarServiceCreatorAdmin
public JarServiceCreatorAdmin()
-
-
Method Details
-
upload
public UploadArtifactsResponse upload(String serviceGroupName, Resource wsdl, Resource[] resources) throws DuplicateServiceGroupException, JarUploadException -
getClassMethods
public Service[] getClassMethods(String directoryPath, Service[] services) throws org.apache.axis2.AxisFault, DuplicateServiceException This method will list all the public methods for the given classes.- Parameters:
directoryPath- Temp dir innto which all jars were uploadedservices- Selected classes- Returns:
- All methods in the selected classes
- Throws:
org.apache.axis2.AxisFault- ErrorDuplicateServiceException- If a service with a given name already exists
-
createAndDeployService
public void createAndDeployService(String directoryPath, String serviceHierarchy, String serviceGroupName, Service[] data) throws org.apache.axis2.AxisFault, DuplicateServiceException, DuplicateServiceGroupException Creates and deploys a service. This AAR will contain all the classe from the jar file corresponding toarchiveId. In addition, a services.xml will be created, and all of theserviceClasseswill be added as services.- Parameters:
directoryPath- archive idserviceHierarchy- hierarchical part of the serviceserviceGroupName- the serviceGroupNamedata- info array. data contains the excluded method names.- Throws:
org.apache.axis2.AxisFault- will be thrownDuplicateServiceException- If a service which already exists is trying to be createdDuplicateServiceGroupException- If the sepcified service group already exists
-