POLL

We are looking for more information to tailor our training to better meet the needs of our customers. Please indicate all options that apply.

I would like to attend specialized training from Intalio on BPM as it relates to my application area:


I would like to attend specialized training from Intalio on BPM as it relates to my job function:


I would like to attend specialized training from Intalio on BPM as it relates to my industry:

Login

Subscribe

MAIN arrow Reference Guides arrow Generating web services using Axis2

Generating web services using Axis2

Print E-mail

zipsendjmssource 27/11/2007,00:01 10.90 Kb

 

Steps to generate Java code from WSDL file:

 

Note: Explanation is given by using the example of Send JMS Message using ActiveMQ sample, In the similar manner you can create any webservice in axis2

 

  1. Download axis2- 1.3 version, after which you need to set environment variable for axis2-1.3 (AXIS2_HOME)
  2. Download Axis2Codegenerator so as to generate the java classes from the wsdl
    Note: Download only the zip file for �Code Generator Wizard - Eclipse Plug-in�
  3. Extract the zip file and paste Axis2_Codegen_Wizard_1.3.0 folder into the plugins folder of your designer
    Note: Make sure designer is not open
  4. Open your designer go to MenuBar->File->Other->Axis2Wizards->Axis2 CodeGenerator, and click Next
  5. Select the 1st option (Java source code from WSDL) and click Next
  6. Give the path where you have pasted SendJMS.wsdl in your system and click Next.
    1.  In the next window use the below given options and then click Next
      Codegen option: custom
      Check the checkboxes given before:Generate server side code,Generate a default services.xml,Generate an Interface for Skeleton.
  7. Provide a path where you want to save all the java files created say C:\sample.
  8. Check for the checkbox given before Add the Axis2 codegen jars to the codegen resulted project.
  9. Check for the checkbox given before Add Axis2 libraries to the codegen resulted project.
  10. Click the browse button and set the path where your axis2-1.3 is places, say C:\axis2-1.3 and then Check Libs and then click on Finish.
  11. Open the sample folder where you'll find src folder.
  12. Expand this folder and open the SendJMSServiceWSSkeleton.java file.
  13. Copy and paste the code given in SendJMSServiceWSSkeleton.java from the attached src folder into this file.
    Note: Make sure you don't delete anything and change the object names as generated by the generator
  14. Now after adding the code to skeleton, you need to build all the files, so as to generate .aar file.
  15. Go to command prompt, give the path of the folder where all your java files are placed, in your case it should be C:\sample.
  16. Use this command:C:\sample>ant.
  17. This will build all the files and create a build folder if your build is successful.
  18. After the build is successful, again go to the sample folder and expand the folders: build->lib where you'll find SendJMSServiceWS.aar file.

 

Steps to obtain wsdl file:

 

  1. Now you need to upload this .aar file into the server:
  2. Make sure Intalio-bpms server is already started.
  3. Open a web browser, provide url as: http://localhost:8080/axis2/ that takes to login screen for axis2.
  4. Click on the "Administration" link.
  5. Login with the following credentials:
    username: "admin" (without quotes).
    password: "axis2" (without quotes).
  6. Click on the link to "Upload Service".
  7. Browse to location of "SendJMSServiceWS.aar" to "Upload a AxisService Archive File page.
  8. Now click on Available Services link and refresh the webpage
    Note: You will see the list of the available services.
  9. Verify that "SendJMSServiceWS" link is present there.
  10. Click on "SendJMSServiceWS" link it displays respective wsdl file.
  11. Save the wsdl file and further you can use it in your project

 

 

Last Updated ( Mar 18 2008 )
  Next >