MAIN arrow Samples-5.1 arrow File Handling Process using Axis2

File Handling Process using Axis2

Print E-mail

zip filehandling 04/02/2008,05:49 62.95 Kb

 

Description:

This use case illustrates functionality of creating, reading, updating and deleting file.
The process has been implemented by creating a wsdl that performs all the operations, and invoking this wsdl in intalio process.
The WSDL file "FileHandlingServiceWS.wsdl" is generated from "Axis2" Application Server which performs the following operations:

  • WriteFile: operation that adds data to an existing file or creates a new file and inserts data in it.

  • DeleteFile: operation that deletes a file from the location specified.

  • ReadFile: operation that reads data from the file specified on local system.


In the process all three operations are invoked at same time, its upon user to check out of 3 checkboxes which one he needs to perform.
"FileName" specifies absolute path of the file in local system like "C:\my folder\mydocument.txt" and "FileData" specifies the data that is to be added or deleted like "Hello! This is the data".


In the process all three operations are invoked at same time, its upon user to check out of 3 checkboxes which one he needs to perform.
"FileName" specifies absolute path of the file in local system like "C:\my folder\mydocument.txt" and "FileData" specifies the data that is to be added or deleted like "Hello! This is the data".


Use case dependencies:

file.xsd: Schema used is of "complex" type.

 

Requirements:

  1. Intalio|BPMS Server-5.1.1

  2. Intalio|BPMS Designer-5.1.1

 

Preconditions:

  1. Make sure Intalio|BPMS Server is up and running fine.
  2. Make sure the Process Explorer pane does not contain any Intalio|BPMS Business Process Project with same name.

 

Process Download & Import:

  1. Download 'FileHandling.zip'.

  2. Go to File > Import...

  3. In Import wizard,select “Existing Projects into Workspace”,click on Next >

  4. Select the “Select archive file” radio button.

  5. Browse to select downloaded archive file,

  6. Click on Finish.

  7. Update project builders by right click on project; go to BPMS Designer Tools > Update BPMS Builders.

 

filehandling.jpg

Work Scenario in the Axis 2:

To upload "FileHandlingServiceWS.aar" in the Axis2:

  1. Make sure Intalio-bpms server is already started.

  2. Open a web browser, provide url as: http://localhost:8080/axis2/., that takes to login screen for axis2.

  3. Click on the "Administration" link.

  4. Login with the following credentials:

    username: "admin" (without quotes).

    password: "axis2" (without quotes).

  5. Click on the link to "Upload Service".

  6. Browse to location of "FileHandlingServiceWS.aar" to "Upload a AxisService Archive File " page.

  7. Now click on Available Services link and refresh the webpage

    Note: You will see the list of the available services.

  8. Verify that "FileHandlingServiceWS" link is present there.

  9. Click on "FileHandlingServiceWS" link it displays respective wsdl file.
    Note: This wsdl displays users Ip address in place of localhost in soap address location.you need to save this wsdl file on your system and you need to use this wsdl in place of the existing wsdl.

 

Explanation of the files used:

  1. FileProcess.bpm: bpm file created for this purpose.
  2. FileHandlingServiceWS.aar:This file is required to be uploaded in the server i.e. in http://localhost:8080/axis2 so that the service can be deployed.
  3. FileHandlingServiceWS.wsdl:This is the wsdl that is required to be invoke in the process.

 

Process Deployment & Execution:

  1. Click on Deploy Project to Intalio|BPMS Server button in tool bar.

  2. Make sure you select all runtime files while exporting to Intalio|BPMS Server.

  3. Click on Finish button.

  4. Open a web browser, provide url as: http://localhost:8080/bpms-console which takes to login screen for bpms-console.

  5. Login with the following credentials:
    username: 'admin' (without quotes).
    password: 'changeit' (without quotes).

  6. Bpms-console will be available with deployed processes list.

  7. You should see "FileProcess:Server" process with a package name "FileHandling", select it and click to Start.

  8. This should generate a form with three check boxes fields naming "receiveRead", "receiveWrite" & "receiveDelete".

  9. Check the checkbox for "receiveWrite" and click to Invoke.

  10. Again a form generates with an input field to map input data.

  11. Type 'C:\myfolder\mydocument.txt Process' in name field & "Hello Intalio" in data field, then click on Submit button.

  12. This will replace the page with an output like "receiveWriteResponse: Data added to new file".

  13. Similarly, you can obtain results for other check box "receiveRead" & "receiveDelete".

 

Last Updated ( Feb 04 2008 )
  < Prev Next >