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 projects.
In this tutorial you create two projects. The first project is one of the
SOA BluePrint 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 BluePrint Sample project.
This section 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 BluePrint 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 box, expand the following node:
By File > BpelModule1 > Process Files
Select newLoanApplication.xsd for importing and click OK.