Generating a web service
Procedure
1. Go to Web Service definitions.
2. In the elements list, select the web service definition you want to generate as a web service.
3. In the Package name field, change the name as required.
For example, change the Package name as ‘com.planon’ with ‘Person’ as linked BO. By default, the system name is displayed as
WS. {System name}.

The
Package name represents the folder structure in which the Web service definition is generated.
In the above example, com.planon, the ‘planon’ folder is created in the ‘com’ folder.
4. On the action panel, click Generate web service. The web service files are downloaded as a zip file that will be available in your browser's download location.
The zip file will contain the jars and all the other required files to make local adjustments to the web service. If you want to adjust the web service, you will need to compile it locally outside of Planon
For this purpose, the zip file contains a build.txt file, which has instructions on how to do this.
The src folder contains a folder named in accordance with the respective web service definition. This folder contains subfolders for each of the business objects linked to the web service definition.
<source directory>
|- src/
|- META-INF
| - services.xml
|- ws/
|- <wsdefinition name>/
|- <BusinessObjectname >/
|- <BusinessObject.java>
|- <BusinessObjectFilter.java>
|- <BusinessObjectService.java>
|- PlanonSessionService.java
- test/
|- ws/
|- <wsdefinition name>/
|- < BusinessObject name >
|- <BusinessObject Client.java>
|- <BusinessObject ClientStub.java>
|- build.xml|
The META-INF/services.xml file has the required service definition for Axis2. It contains the information required to expose your business object as a web service.
Note that this file does not contain the WSDL of your web service.
The src/ws/<wsdefinition name> folder contains all the necessary web service source files which are placed in their respective folders (the folder name is same as that of the BO).
For example, if you generated a web service definition for Person BO:
- the Person.java file represents the actual business object (as POJO),
- the PersonFilter.java file is used for filtering on persons and
- the PersonService.java file provides the actual Web service: it defines the basic CRUD operations for adding, reading, deleting and updating persons in Planon ProCenter.
The PlanonSessionService.java file is required for logging on and off from the Planon ProCenter framework using Web services.
The test/ ws/<wsdefinition name> folder contains a sample client for your web service, for example,PersonClient.java, which is placed in its respective folder (the folder name is same as that of the BO), together with a utility class PersonClientStub.java.
You can use these sources to make a quick test for your web service using Java.