[jboss-user] [JBoss jBPM] - A tutorial to deploy a Netbeans created BPEL process under J

ZazzaZ do-not-reply at jboss.com
Sat Sep 15 11:10:08 EDT 2007


Hi,
this is a tutorial to deploy a Netbeans created bpel to 
jboss 4.0.5 + jbpm-bpel 1.1.3 beta.
So no reply as bug report is necessary.

Suppose the name of the .bpel is processo.bpel and 
you have all the wsdl the bpel requires in the same dir.

You've to replace processo with your process name

Follow these steps


1)Go to examples dir of your jbpm-bpel installation and 
create a folder with the same name of the .bpel file.

In this tutorial processo.

1.1 Copy from hello example the build file and replace
"hello" with your process dir name (processo)

1.2 Create dir src. Inside src,  bpel. Inside bpel META-INF.


1.3 In bpel dir copy all the files .bpel and .wsdl.


1.4 In META-INF copy bpel-application from hello/src/bpel/META-INF 
and open it replacing hello with processo.

1.5 If jboss server isn't up, make it running (run.sh or rub.bat)

1.6 From example/process run ant deploy-definition

1.7 You've done a successfull deploy if you got a 200 code response
from the server.

2) From example/process run ant generate-service

This operation will create under the target dir under example/processo
some files...

3) The hottest part. Making artifacts...

3.1 From hello/src/main/resources copy all files and dir to processo/src/main/resources

3.2 Open wscompile.xml and replace hello with processo

E.g.

<?xml version="1.0"?>

  


3.3 Same operation for wstools.xml

Esempio

<?xml version="1.0"?>

  
    <package-namespace package="org.jbpm.bpel.tutorial.processo"
      namespace="http://jbpm.org/examples/processo" />
  
  <wsdl-java file="wsdl/processo-service.wsdl">
    
  </wsdl-java>



3.4 Go to target/resources/web and open processo-service.wsdl
and processo-binding.wsdl. You can now read important info to
correctly fill the fields of files for artifacts.

3.5 Go to src/main/resources/web and open webservice.xml and web.xml

3.6 In  web.xml modify the word Greeter with the one you prefer.

3.7 Modify webservice.xml as follows:

3.4.1 web service description name: whatever you want
3.4.2 wsdl-file: the one tool-generated and that you can find under target/resources/web
      It is the -service.wsdl terminating file (processo-service.wsdl).
3.4.3 port-component-name : The one you find in the (processo)-service.wsdl as attribute name of port. 
3.4.4 service-endpoint-interface: whatever you want. This name will be used to generate a class.
3.4.5 servlet-link: the one you type in web.xml for tag servlet-name
3.4.6 handler-name: whatever you want


3.5 Go to examples/processo and console type ant generate-artifacts


4) The last step: deploy and interface writing

In web.xml you specified a servlet class 

 <servlet-class>org.jbpm.bpel.tutorial.processo.Client_Impl</servlet-class>


In src/main/java you have to recreate the same dir structure 
(/src/main/java/org/jbpm/bpel/tutorial/processo) and the file 
(Client_Impl.java).
This class has to implement the interface Client that has been create in
example/target/java/.....
Implement the interface.


4.1 Go to processo-binding you find in target/resources/web/wsdl and add
import for client. I.e. the webservice providing the info for the receive
and reply operation underthe bpel file



Don't type ant deploy or you'll see org.jboss.ws.WSException in server log
saying it isn't able to find the port type in the specified namespace


4.2 Modificy jaxrpc-mapping.xml and processo-service.wsdl. To find the proper values
you have to find the wsdl of the Client. Es Client.wsdl

4.2.1 --> jaxrpc-mapping.xml
<port-name>ClientPortType</port-name>
<java-port-name>ClientPortType</java-port-name>

You can read this values from Client.wsdl in field

 <wsdl:portType name="ClientPortType">

Do the same with

<wsdl-port-type xmlns:portTypeNS="http://j2ee.netbeans.org/wsdl/Client">portTypeNS:ClientPortType</wsdl-port-type>
<wsdl-binding xmlns:bindingNS="http://j2ee.netbeans.org/wsdl/Client">bindingNS:ClientBinding</wsdl-binding>

and type for binding the value you find for Client.wsdl for binding

<wsdl:binding name="ClientBinding" type="tns:ClientPortType">


4.3 In examples/processo type ant deploy and if you read in server log something like 

INFO  [TomcatDeployer] deploy, ctxPath=/processo, warUrl=.../tmp/deploy/tmp28869processo-exp.war/
WARN  [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.graph.def.CompositeActivity - this operation breaks ==
INFO  [IntegrationConfigurator] Message reception enabled for process: HelloWorld
INFO  [WSDLFilePublisher] WSDL published to: file:/home/zazzaz/Tesi_Workflow/jboss-4.0.5.GA/server/default/data/wsdl/processo.war/processo-service.wsdl
INFO  [ServiceEndpointManager] WebService started: http://zazzaz-desktop:8080/processo/client


you won!


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084745#4084745

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084745



More information about the jboss-user mailing list