This tutorial is intended to follow the Plan a PXE System tutorial and also uses the [GeoIp Example] packaged with the distribution in ./examples/GeoIp.
Once the pieces are available, building a SAR file for the GeoIp example – or most other systems with a single BPEL process bound to concrete protocols – from the commandline only requires two commands (not counting the initial cd):
And that's the only thing necessary to build a deployable g.sar. (You can compare the JAR-based deployment method used by the pxe command in the Quick Start.)
The rest of this tutorial goes through the longer version step-by-step with additional detail.
The first step is to construct the resource repository that will be used by the BPEL compiler and eventually added to the system deployment archive. The resource repository is intended to represent a snapsnot of the URL-world, including file:, http:, etc., that the system can use later to access resources without using the filesystem or network.
To create a ZIPRR called g.rr with the rradd command:
The rrls lists the contents of the resource repository:
So far, g.rr only contains the wrapper WSDL created earlier, instead of the imported WSDL as well, and the system expects to be able to resolve all imports within the resource repository. The -wsdl flag for rradd will have the desired effect:
The BPEL process GeoIp.bpel can either be compiled using the WSDL cached in the resource repository:
Or, the bpelc command can create a temporary resource repository:
In either case, the result will be a file called GeoIpProcess.cbp in the current directory. (The .cbp suffix stands for "compiled BPEL process".) Recall that this is the same value that was put into the compiledProcess property in the system descriptor in the prelude to this tutorial.
The last step is to actually build the SAR file with the sarcreate command:
This will build a SAR file called g.sar with the common resource repository g.rr that we built above, the compiled BPEL process as a named resource GeoIpProcess.cbp, and the descriptor pxe-system.xml.
As with bpelc, sarcreate supports the shortcut syntax where the resource repository is automatically constructed:
In this case, the URI for the root WSDL from the system descriptor is dereferenced as a URL, so the above command has the same effect as:
To see how to deploy a SAR from the commandline, see [Deploy a PXE System from the Commandline].