View Source

{section}
{column}

This view is located in the bottom left part of the Petals perspective.
It is in charge of listing Petals services from various sources.

{column}
{column:width=350px}
{panel:title=Table of contents}{toc}{panel}
{column}
{section}

h1. Petals Services

A Petals services is defined by 3 properties:
* An interface name (a WSDL port type in fact, so a QName).
* An service name (a WSDL service in fact, so a QName).
* An end-point name (a simple string).

A Petals service has a name, implements an interface (and so has a list of operations that can be invoked), and is available at a given end-point.

{tip}
For a given interface, we may find several services that implement it.
For a given service, we may find several end-points at which this service is available.
{tip}

h1. Indexing Petals Services

A physical Petals service is a service which was deployed in Petals ESB.
But a Petals service may also be virtual. As an example, it can be a service which is about to be deployed in Petals.
It is not yet deployed, but it can be considered as a service.

\\
In fact, any JBI descriptor (jbi.xml) that declares a _provides_ section (a service provider) can be considered as a Petals service.
Any Service-Unit (SU) project may declare Petals services.
Any service assembly, that it is deployed or not, defines Petals services.

\\
This is what the *Petals Services* view does: it can list Petals services from various sources.
For a given source, the view lists all the Petals services as a triplet _( interface, service, end-point )_.

\\ !PetalsStudio_Perspective_Services_5.jpg!

\\
{tip}
Populating this view is very important, in particular when you want to define service consumers.
Indeed, the view is used to ease the selection of a service to consume and to fill-in automatically some fields.
{tip}

h1. Sources of Petals Services

There are currently 3 types of sources for Petals services.

h3. Work space

The first one, and always here, is the *work space source*.
It lists all the virtual Petals services defined in SU projects.

!PetalsStudio_Perspective_Services_1.jpg!

h3. External work space

The second source type is an *external work space*.
If you have created SU projects in different workspaces, it is possible to list the Petals services defined in this other workspace.

Creating such a source is achieved by right-clicking the Petals Services view and selecting *New > Workspace Folder*.
A directory selection dialog appears and invites you to select the workspace root directory.

!PetalsStudio_Perspective_Services_2.jpg!

h3. Directory of service assemblies

The third source of Petals services is a *directory containing (zipped) service assemblies*.
Using this solution is much more lighter than importing a service assembly in the workspace, if you only want to create a service consumer.

Creating such a source is achieved by right-clicking the Petals Services view and selecting *New > SA Folder*.
A directory selection dialog appears and invites you to select the directory containing the service assemblies.
Notice that only the service assemblies directly under this folder are searched.

!PetalsStudio_Perspective_Services_3.jpg!