Before you proceed, review the requirements in this section.
Prerequisites
This tutorial assumes that you have basic knowledge of the following technologies:
Composite Applications and Service-oriented Architecture (SOA)
Web Services
Software Needed for This Tutorial
Before you begin, download and install the following software:
NetBeans 6.0
Select the Download All option. The Download All option includes the SOA pack and GlassFish V2 application server, which are required for this tutorial.
This tutorial illustrates the basic steps to create a project that references an XML file that belongs to another project. Use the principals in this tutorial to streamline the reuse of XML files within a set of project.
In the tutorial you create two projects. The first project is one of the SOA Blue Print Sample projects provided with NetBeans 6.0. The second is a BPEL Module project. From the BPEL Module project, you reference an XML schema file from the Blue Print Sample project.
This sections shows how to create a reference to the BpelModule1 project from the BluePrint1 project. Once the reference is created, resources in the Blue Print project can be accessed by the BPEL Module project.
To establish a reference between the projects:
In the Projects window, right-click the BluePrint1 project and select Properties.
In the Project Properties dialog, under Categories, select Project References.
Select Add Project.
In the Add Project dialog, select the BpelModule1 project and click Add Project.
Import an XML Schema File Using a Project Reference
In this section you add an XML schema file to the BPEL Module project. You then modify the XML schema file using the XML schema structures referenced from a file in the Blue Print Sample project.
To add an XML schema file to the BPEL Module project:
In the Project Window, right click BpelModule1 node and select New > Other to open the New File wizard.
With BpelModule1 as the selected project, make the following selections and then click Next:
Categories: XML File Types: Loan Application Sample Schema
Accept the default Name and Location, and click Finish.
The NetBeans IDE adds the new file to the BpelModule1 project and opens the file in the Schema View of the XML Editor.
To import the Loan Application Schema File into the Blue Print Sample project:
In the Project Window, expand the BluePrint1 > Process Files node and select purchaseOrder.xsd.
Double-click purchaseOrder.xsd to open this file for editing.
If the Schema View is not selected in the editor, select Schema.
In the leftmost column of the editor, right-click Referenced Schemas and choose Add > Import.
In the Add Import Dialog expand the following node:
By File > BpelModule > Process Files
Select newLoanApplication.xsd for importing and click OK.
Deploy the Blue Print Sample Composite Application
In this section you deploy the Blue Print Sample composite application, which contains the cross project reference.
To deploy the Blue Print Sample composite application:
In the Projects window, right-click BluePrint1Application and select Deploy.
This to verify that the application builds and deploys with the referenced XML schema file.