Creating a SCA application for Petals

Introduction

A SCA application run in Petals can be easily created with Petals Studio.
There are three creation patterns proposed in the studio. This is what this page illustrates.

Getting started

In the menu, select File > New > Service Unit Project.
If you do not see it, go into File > New > Other... Then, select Service Unit Project under the Petals category.


A wizard opens up, showing three drop-down lists.
In the Use Case list, select Use a Petals technical service.
In the Petals Component list, select SCA // petals-se-sca.
In the Component Version list, select the version of the Petals-SE-SCA that you are using in Petals.


In the scope of this page, we will use the version 1.1 of the component.
Click Next. The next page gives you the choice between 3 creation ways.

Creating an empty SCA application

Give the composite a name and complete its target namespace.
By selecting Create an empty SCA application, the resulting project will only contain an empty composite.
You will have to complete everything.


Clicking Next leads you to the project page, which expects the project name and location.
By default, the project name is generated from the composite name.


Click Finish to complete the wizard.
It results in the creation of a Petals SCA project...


... with an empty composite.

Implementing a Petals service with SCA

Give the composite a name and complete its target namespace.
By selecting Implement a native Petals service with SCA, the resulting project will contain a basic SCA application, with a component, a promoted service, an interface on the service and a component implementation. Both (and only) the Java interface and the Java implementation will need to be completed. The composite does not require any change.


Clicking Next leads you to the project page, which expects the project name and location.
By default, the project name is generated from the composite name.


Click Finish to complete the wizard.
It results in the creation of a Petals SCA project...


... with an almost complete SCA application.

Orchestrating Petals services with SCA

Give the composite a name and complete its target namespace.
By selecting Build a composition of Petals services, the resulting project will contain a basic SCA application, with a component, a promoted service, an interface on the service, a component implementation and references to Petals services. These references will already be usable, meaning the data-binding between the service's WSDL definition and Java is already done. Both (and only) the Java interface and the Java implementation will need to be completed. The composite does not require any change.


Clicking Next leads you to the project page, which expects the project name and location.
By default, the project name is generated from the composite name.


Click Next to select the Petals services the SCA application may invoke.
The selection is achieved by clicking Add. A selection dialog shows up, providing filtering assistance.
When you have selected your service, click OK. And repeat the operation until you have all the services you want to invoke.
Note that it is also possible to create SCA references that taget Petals services later on (during the edition).


Click Finish to complete the wizard.
It results in the creation of a Petals SCA project...


... with an almost complete SCA application.

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