<< CompApp/CASA FAQ

How to create a custom SE Service Unit project type?


OK, you have implemented a custom service engine and will like to extend the NetBeans SOA tooling to support your SE. The following is an outline of basic steps needed to achive this.

Basic steps

1. Define SU jar content and layout

The first step is to define the content and layout of your service unit jar file. Please read the JBI spec to understand the SU jar format requirements. For SOA tooling integration, there are two requirements:

  • A SU jbi.xml must be included which defines the provides and consumes endpoints of the service unit. An example of a BPEL SU jbi.xml is shown below:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jbi xmlns=""
     xmlns:ns2="" version="1.0">
    <services binding-component="false">
        <provides endpoint-name="partnerlinktyperole1_myRole" 
  • The associated WSDL and XSD files that define the provides and consumes endpoints must be made available to CompApp/CASA. This is normally done by including these files directly in the SU jar. However, alternative solutions can be considered if needed. For example, NetBeans EJB projects do not always have WSDL included. So, it provides a WSDL export action to allow the user to copy service WSDL to CompApp project directly.

2. Implement custom editors (Optional)

If there is any need to create custom editors in NetBeans, there are many tutorials and examples showing how this can be done. For SOA tooling integration, there is no mandatory requirement on editors.

3. Implement a custom SU project type

The most important step is to implement a NetBeans project type for the service engine. For SOA tooling integration, there are several requirements on the SU project module:

  • Implement a NetBeans ant project type
  • Implement
    interface and add it to the project lookup. This interface has a method, {getBuildArtifacts()}, to return a list of AntArtifact generated by the project.
  • Return a
    with the SOA tooling artifact type in one of its type property. There are several standard AntArtifcat properties that are needed. These properties tell CompApp/CASA the type of artifact, its location, how to build it, and how to remove it.
  • type - a type with SOA prefix "CAPS.asa:", e.g.
  • locationProperty - the project-relative location of the artifact, e.g.
  • eval - a location property evaluator, e.g.
  • targetName - the Ant target to build the artifact, e.g.
  • cleanTargetName - the Ant target to delete the artifact, e.g.
The following is an example implementation of a SOA tooling AntArtifact, i.e., an AntArtifact with "
" prefix:
public AntArtifact[] getBuildArtifacts() {
  return new AntArtifact[]{helper.createSimpleAntArtifact(
      "CAPS.asa:sun-bpel-engine",             // Artifcat type
      "build/su.jar",                         // Artifcat location
      helper.getStandardPropertyEvaluator(),  // Evaluator
      "dist_se",                              // Ant build target
      "clean"),                               // Ant clean target
  • In the layer.xml of SU project module, add a <JbiComponents> element for each of the service engine supported by the project. Attach to each SE, the following attributes:
  • id - the name of service engine, e.g.,
  • description - a description, e.g.,
    Java EE service engine
  • type - the JBI component type, e.g.,

The following is an example of this layer.xml entry:

<folder name="JbiComponents">
   <!-- JBI Component -->
   <file name="sun-javaee-engine">
      <attr name="id" stringvalue="sun-javaee-engine"/>
      <attr name="description" stringvalue="Java EE service engine."/>
      <attr name="type" stringvalue="Engine"/>

Summary of SOA tooling requirements

This is a short summary of SOA tooling integration requirements for NetBeans SU project type. There are four key requirements:

  1. generate SU jbi.xml
  2. add an implementation of
    in project lookup
  3. return a SOA tooling type
  4. add a
    entry in module's layer.xml

Using Component Development Toolkit (CDK)

OpenESB provides a Component Development Toolkit (CDK) for generating project templates for generic SE and BC components. CDK can also generate a generic template for NetBeans SU project. There is a demo, JBI CDK Service Engine Deployment Plugin (JBIModule) Demo, showing how to create the SU project template using the CDK.


  • Component Development Toolkit wiki page
  • NetBeans SU project template demo
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo