This document explains the installation and usage of Axis2 plug-in for IntelliJ IDEA.
When you click on either one of them, a window (Page 1) will appear asking you to select one of the following two options.
Page 1:If you want to create a service archive obviously you must select "Create a service archive" option. Like wise, if u want to generate java class file from a WSDL file you must select the radio button option "WSDL2Java code generation".
Select "WSDL2Java code generation" and click on the button "OK" to generate code from a WSDL file. Then the following window will appear.
WSDL2Java Page 2:
Once the WSDL file is selected you will be able to move onto the next page. The "Browse" button can be used to easily browse for a file rather than having to type the whole path.
Once the WSDL file is selected, click on the "Next" button which will take you to the page below.
WSDL2Java Page 3:
This page gives the user the option of selecting default or custom code generation options. There are three default code generation options in all. The first enables the user to generate both client and server code under default configurations while the second generates just the client side under default configurations. The third option generates server side code under default configurations.
Note:
Here's some information on the options for selection:
Service Archive Page 2:
The page below will appear asking the user to select the archive type
In Axis2, the user can deploy a single service or a service group. Therefore, you can select either "Single service archive" or "Service group archive" for the archive type you want to create.
If you already have a services.xml you can skip some of the steps in the wizard by selecting the radio button option "I already have services.xml" and clicking on "Next" button. If you do not have the services.xml, select the radio button option "Generate services.xml" and click on the "Next" button, in which case the tool will create the services.xml for you.
Depending on the options you selected on this page there can be three sub wizards:
When you click on "Next" button, wizard will move to the page below
Service Archive (sub wizards 1 & 2) Page 4:
Here you select service specific external libraries (third party libraries) and service WSDL files. If you want to add multiple WSDL files to a single service type you can do that as well.
To add libraries first click on the browse button to browse for library files and then click on the "Add" button. Once added the selected file will appear in the list box.
To add WSDLs, first click on the browse button to browse for WSDL file and then click the "Add" button to add the file to the list.
After adding external libraries and service WSDL files click on the "Next" button to move to next page.
Service Archive (sub wizards 1 & 2) Page 5:
This page allows you to select service implementation class. In the case of service group, same page will be looped to select multiple service implementation classes. This process is explained in detail below.
Select a service implementation class by browsing and clicking on the "Load" button to load all the public methods in that class, after which you can select the methods that you want to publish using the check boxes.
Note : If you do not select the correct class path from the "Class location selection" window, the public methods which are available in the selected class file will not be loaded.
In "Service Name" text box you can type the name of the service you want, but remember that the service name should be unique throughout the system.
When you have completed this particular service click on the button "Next". In the case of a service group when you click on the "Next" button for that particular service the following dialog box will appear with option to add more service(s) to a service group.
If you click on "Yes", you have to follow the same procedure to add some other service(s) to service group.
If you click on "No", the button "Next" will be enabled and you can go to next page.
Note: From this point onwards the steps are similar to all the sub wizards.
Service Archive (sub wizards 1 & 2) Page 6:
This page displays the services.xml file, either the one given by you (in the case of I already have services.xml) or the one generated by the system (in the case of "generate services.xml")
This page is editable and provide a way to add parameters and module references to any level.
Note : When you click on either the "+Parameter" or the "+ModuleRef" buttons remember that corresponding text will be added to the current mouse position. Therefore, click on the location you want to add the parameter or module references and then click relevant button (+Parameter or +ModuleRef).
+Parameter button:
If you click on the "+Parameter" button a window will appear asking to give parameter name and parameter value.
Note that you can also manually add parameters (without clicking on the "+Parameter" button ) to any where in the document as you wish.
+ModuleRef button:
Likewise, adding module references can be done by clicking on the "+ModuleRef" button in the page. You have to type the name of the module to be engaged as shown in the following figure.
When you complete this page press the "Next" button to go to final page.
Service Archive (sub wizards 1 & 2) Page 7:
Next step is to select output file location, the location in which archive file should be created.
In the "Archive Name" text box, type the name of the archive file you want to place. This name will finally become the service group name.
Note : Do not include file extension when you type archive name. System will generate that for you.
When you are done, click the "Finish" button. If everything has been done successfully you will see following message.
Note: Pages 6 & 7 of sub wizards 1 & 2 are common to sub wizard 3 from its page 3 onwards.
In the case where services.xml is already available, the steps are as follows:
Service Archive (sub wizard 3) Page 3:
This page allows you to select both location of services.xml and the location of service classes directory. Click on the "Select" buttons and browse the file system to find required document and location.
Click on the "Next" button which will take you to a page which allows you to add third party libraries and WSDL's in the same manner as "Sub Wizard 1 & Sub Wizard 2" section's Page 6 - Edit service descriptors. Note that Sub Wizard 3 from this point takes the same pages as 6 to 7 of Sub Wizards 1 & 2.