Working with Service Unit projects

Definition

When you want to create a service-unit for Petals with the studio, you have to create a service-unit project.
A service-unit project contains a JBI descriptor and other resources, that depend on the target component.
A service-unit project (also called SU project) contains meta-data (such as the name of the target component, its version...).
A SU project can be referenced by a Service-Assembly project (SA project).

Here is the typical structure of a SU project.

src
   main
      java
      jbi
          jbi.xml
          Other resources (e.g. *.jar, *.wsdl)
pom.xml

SU projects are associated with a builder in charge of validating the jbi.xml file and the coherence of the associated resources.

Creation

The creation of a SU project can be achieved by different means:

  • By creating a Petals service (provider) (File > New > Petals > Petals Service Provider).
  • By creating a Petals service consumer (File > New > Petals > Petals Service Consumer).
  • By exporting a croquis into Petals projects.
  • By importing an existing Service Assembly.

The creation is detailed more precisely in various tutorials of the studio.

Export for Petals

If your SU project is referenced by a SA project, you should export the SA project instead.
Indeed, in this case, the service-unit export will be done through the export of the SA project.

SU and SA projects are compatible with the Petals Maven plug-in.
The packaging can be done with both the Studio and Maven.

Fast export

The fast export is a shortcut to create a service assembly from a SU project in few seconds.
The created service assembly is saved at the root of the SU project.

To export a SU project quickly, right-click it and select Petals > Fast Export for Petals.

Complete export

The complete export provides numerous options to export one or several SU projects at once.
Select File > Export > Petals > Service-Unit.


A wizard starts.
The top part lists all the SU projects contained in the workspace. Select the ones you want to export and the export mode.

Distinct export, in a same directory

Every selected SU project will be exported, each one in its own service assembly.
All the service assemblies are placed in a same directory. The directory location must be specified.

Distinct export, in the project directories

Every selected SU project will be exported, each one in its own service assembly.
Each created service assembly is placed in the SU project. This is equivalent to making a Fast export on every selected SU project.

All-in-one export...

All the selected SU projects will be exported together in a single service assembly.
The created service assembly will be saved at the specified location.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.