invokesoapusingaxis.zip 22/06/2007,05:35 2.00 Mb
Description:
This use case illustrates route to invoke process as webservice from axis java client code which has been developed using 'Apache Axis'. For proper functionality import the API's that we get when we set the classpath with jars provided. To invoke the process provide 'Endpoint Url' of web service in the client code and attain corresponding results. This use-case is taking the example of 'Hello World' process.
Use case dependencies:
- message.xsd:The schema used is "start" which is of "string" type
- Jdk: jdk1.5
- Apache Axis version: axis-1.1
- Java File: ST08AxisClient.java
- Jar Files:
- axis.jar
- axis-ant.jar
- commons-discovery-0.2.jar
- commons-logging-1.0.4.jar
- jaxrpc.jar
- log4j-1.2.8.jar
- saaj.jar
- wsdl4j-1.5.1.jar
Requirements:
1. Intalio|BPMS Server-5.0
2. Intalio|BPMS Designer-5.0
3. InvokeSoapUsingAxis.bpm (bpm file created for this project).
Process Download & Import:
- Download 'InvokeSoapUsingAxis.zip'.
- Go to File > Import...
- Select 'Existing Projects into Workspace', in the wizard, click on Next >
- Browse to select the downloaded archive file.
- Click to Finish.
- Update project builders by right click on project; go to BPMS Designer Tools > Update BPMS Builders.
Please follow these below instructions to remake the process
Preconditions:
1. Make sure Intalio|BPMS Server is up and running fine.
2. For the first time, go to "File > New > select "Intalio|BPMS Business Process Project".
3. Give Project name as "InvokeSoapUsingAxis", click to finish.
Note: Make sure you uncheck "Deploy forms" choice.
Steps to remake the process:
- Right click on the project; go to New > "Business Process Diagram".
- Provide File name as "InvokeSoapUsingAxis", and click to finish.
- A pool with a task is available in BPMN Editor Pane, name default pool as 'Client' and task as 'send'.
- Right click on Client pool and select "Set pool non executable".
- Add new pool by click on BPMN Editor (select "Add Pool" option from pop up menu) and name it as "InvokeSoapUsingAxis".
- Focus on send task in Client pool, drag the out going message icon from boundary and release mouse control onto InvokeSoapUsingAxis pool to select the option "Connect to a new Task", name the task as "receive".
- Focus on receive task in InvokeSoapUsingAxis pool, a sequence flow icon will be available on boundary of the task, drag the outgoing sequence flow icon from "receive" task and release mouse control to select the option "Connect to a new Task", name the task as "result".
- Drag the outgoing message icon from "result" task and connect to "send" task in the Client Pool.
Import schema files from zip file into the project (You can also create your own schema from File > New > Other > XML > XML Schema).
- Drag and drop message.xsd > tns:start1 schema node on to incoming message flow from "send1" task to "receive1" message intermediate event.
- A message "Set schema element 'start1' as the content of the message" will prompt you, click on it.
Defining Outgoing Mapping:
- Make sure Mapper view is visible (go to Windows > Show View > Mapper).
- In the process model select "result" task.
- Make Mapper Palette view visible (go to Windows > Show View > Mapper Palette).
- Place the view to other location to make an ease of dnd of any function onto the Mapper.
- Dnd "concat()" function onto Mapper from Palette view (go to Functions on Strings->Functions on String Values).
- Click on "creates a new operator" button, dnd textbox onto the Mapper, provide string value as "World".
- Click on "$thisReceiveRequestMsg.body" node in left side of Mapper and then click on left edge of "concat()" function which will make an association.
- Click on right edge of "world" and then click on left edge of "concat()" function which will make an association.
- Click on right edge of "concat()" function and then click on "$thisReceiveResponseMsg.body" node in right side of Mapper which will make an association.
- Save the process model.
- Now your process is fully implemented to and is valid to deploy and execute within Intalio|BPMS Server.
Process Deployment & Execution:
- Click on Deploy Project to Intalio|BPMS Server button in tool bar.
- Make sure you select all runtime files while exporting to Intalio|BPMS Server.
- Also verify & check "Deploy processes" choice before click on Finish button.
- Create new folder say 'InvokeSoapUsingAxis' in any drive and copy 'ST08AxisClient.java' file into it.
- Export lib folder attached into 'InvokeSoapUsingAxis' folder or you can also create lib folder and copy all the jar files provided into it.
- Again export "pathST08.bat" (where classpath is set for all the jar files) into 'InvokeSoapUsingAxis' folder or you can create a .bat file in 'InvokeSoapUsingAxis' folder and set class path for all the jar files in it.
- Make sure that you have set the classpath properly.
- Copy 'Endpoint url' from InvokeSoapUsingAxis-InvokeSoapUsingAxis.wsdl file .
Note: The wsdl is the one that'll be created after deploying the process.
- Paste this url corresponding to the "String endpoint" given in the 'ST08AxisClient.java' file.
- Provide the schema used and its data type in:
call.addParameter(new QName("http://www.example.org/message", "start"), new
QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, ParameterMode.IN);
Note: Incase the Parameter being send is of type other than 'String' then changes are required to be made as per requirement.
- On the command prompt give the absolute path of 'InvokeSoapUsingAxis' folder say
C:\ InvokeSoapUsingAxis >
- Run 'pathST08.bat' file corresponding to the path.
- Compile 'ST08AxisClient.java'.08AxisClient.java".
- After compiling java file interpret the file and send the parameter as
"C:\ InvokeSoapUsingAxis >java ST08AxisClient Hello
Note: Hello is being send as a command line argument.
- Output will be displayed as:
using:
http://localhost:8080/ode/processes/InvokeSoapUsingAxis/InvokeSoapUsingAxis/InvokeSoapUsingAxis/Client
Got result : Helloworld
Note: A warning is displayed before the output"- Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled."But it does not effect the output.