Index Changes

Difference between version and version     

Back to How To Use Web Service Across Project By Reference, or How To Use Web Service Across Project By Reference Info


At line 6 changed 1 line.
Copying wsdl from one project to another can accomplish this task but this can lead to duplication of wsdls and as a side effect when the original wsdl contract changes, it is hard to find out who is using it and need to redo changes everywhere wsdl is copied.
Copying wsdl from one project to another can accomplish this task but this can lead to duplication of wsdls. Also the side effect is that when the original wsdl contract changes, it is hard to find out who is using it and user needs to redo changes everywhere, the wsdl is copied.
At line 14 changed 1 line.
The assumption is that user is familiar with concept of bpel, understand bpel project as available in netbeans and is able to deploy bpel projects to openesb bpel engine.
The assumption is that user is familiar with concept of bpel, understand bpel and composite app project as available in netbeans and is able to deploy bpel projects to [openesb |https://open-esb.dev.java.net/][bpel engine|https://open-esb.dev.java.net/BPELSE.html].
At line 16 added 7 lines.
!!! Technical Details:
Refering resource (wsdl/xsd) by reference uses catalog.xml at each project and updates it as new resources from
other projects are added. Catalog.xml acts as a redirection mechanism where the resource is referred by a system id which maps to the physical location of the resource. An artifact (ex bpel or wsdl) can refer to the resource from
another project using this system id.
At line 20 changed 1 line.
(1) Create a bpel project (We use Synchronous Sample project as available in netbeans)
(1) Create a bpel project (We use SynchronousSample bpel project as available in netbeans which also creates a composite app project which can be used to deploy this bpel project)
At line 32 added 16 lines.
The bpel project is shown below. Note it has one wsdl file which specifies the web service implemented in the bpel process.
[{Image src='http://wiki.open-esb.java.net/attach/HowToUseWebServiceAcrossProjectByReference/SynchronousSampleProject.JPG' align='center' }]
(2) Create another bpel project and composite app project which can deploy this bpel project:
[{Image src='http://wiki.open-esb.java.net/attach/HowToUseWebServiceAcrossProjectByReference/CallSynchronousSampleProject.JPG' align='center' }]
In this project we will call the service as implemented in SynchronousSample project of step (1).
(3) Add wsdl service by reference:
There are two ways to do it:
At line 49 added 1 line.
* (a)one is to right click on "Referenced Resources" node on the project as shown below:
At line 51 added 39 lines.
[{Image src='http://wiki.open-esb.java.net/attach/HowToUseWebServiceAcrossProjectByReference/CallSynchronousSampleProjectAddProjectResourceReference.JPG' align='center' }]
Then select "Add Project Resource" option to browse to the location of the wsdl file in another project. (In our case
SynchronousSample project as created in step (1)).
[{Image src='http://wiki.open-esb.java.net/attach/HowToUseWebServiceAcrossProjectByReference/CallSynchronousSampleProjectAddProjectResourceReferenceFileDialog.JPG' align='center' }]
Once we select the wsdl file, the "Referenced Resources" node on the project gets updated and it shows the referenced
resource:
[{Image src='http://wiki.open-esb.java.net/attach/HowToUseWebServiceAcrossProjectByReference/CallSynchronousSampleProjectReferencedResourcesNode.JPG' align='center' }]
Above mechanism should be available in most SOA projects.
* (b)Another option is to directly drag and drop wsdl from SynchronousSample project created in Step (1), to another
project created in Step (2). This is bpel project specific functionality and may not be available in other
SOA projects:
[{Image src='http://wiki.open-esb.java.net/attach/HowToUseWebServiceAcrossProjectByReference/CallSynchronousSampleProjectAddProjectResourceReferenceDnd.JPG' align='center' }]
(4) Under the cover a project level catalog.xml file gets updated and one catalog entry is added for this referenced wsdl. catalog.xml provides the functionality to be able to refer a resource of another project:
[{Image src='http://wiki.open-esb.java.net/attach/HowToUseWebServiceAcrossProjectByReference/CallSynchronousSampleProjectCatalogXml.JPG' align='center' }]
(5) When the project is build, it creates a service unit jar file for deployment to the project specific engine. (In this case bpel engine). This service unit jar packages a catalog.xml and also all the referenced resources from other projects:
[{Image src='http://wiki.open-esb.java.net/attach/HowToUseWebServiceAcrossProjectByReference/CallSynchronousSampleProjectServiceUnitCatalogAndReferencedResources.JPG' align='center' }]
(6) Once a resource from another project is added, The dialogs in the project which refers artifacts from another project shows the referenced resources as well, so that user can select them. For example when creating a bpel variable
the wsdl file (and messages declared in it) from other project is also listed:
[{Image src='http://wiki.open-esb.java.net/attach/HowToUseWebServiceAcrossProjectByReference/CallSynchronousSampleProjectAddVariable.JPG' align='center' }]

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-10) was last changed on 10-Sep-08 16:21 PM, -0700 by RiteshAdval