Blog | soa

« soa » Feed

7f6b01a84f1fc5acd2765285708ad76c

Développement d'un web service sur JBossWs (Bottom-Up)

2010-10-26 12:44

Write comment

Cet article présente la création d’un Service Web sur le serveur d'application JBoss en utilisant la méthode bottom-up ainsi qu'une présentation du framework JBossWs qui a été intégré a JBoss AS depuis sa version 4.2.


Une rapide présentation de JBossWs :


JBossWs implémente les spécifications JAX-WS pour la définition des services web. Cette norme définit un ensemble d’annotations qui permettent la transformation d’un POJO (ou EJB3) en service web. Les annotations sont interprétées par le serveur d’application afin de transformer les classes Java en service web, il offre aussi d'autres services tel que le support des EJB3 , Ws-Security, WS-Policy ... et il s'intègre aussi facilement avec Apache CXF et GlassFish Metro


Une rapide présentation de JAX-WS:


JAX-WS (Java API for XML based Web Services) est une nouvelle API, mieux architecturée, qui remplace l'API JAX-RPC, mais n'est pas compatible avec elle.

Elle propose un modèle de programmation pour produire (côté serveur) ou consommer (côté client) des services web qui communiquent via des messages XML de type SOAP.


JAX-WS permet la mise en œuvre de plusieurs spécifications :

  • Respect des spécifications SOAP.
  • Permet le développement de services web orientés RPC (literal) ou orienté documents (literal/encoded/literal wrapped)

Lorsque vous développez un service web (Endpoint ), vous avez la possibilité de partir d'un code Java (bottom-up), ou depuis le contrat (WSDL) qui définit votre service (top-down).

S'il s'agit d'un nouveau service (pas de contrat existant), l'approche bottom-up est le chemin le plus rapide, vous n'avez besoin que d'ajouter quelques annotations à vos classes pour obtenir un service opérationnel.

Toutefois, si vous développez un service avec un contrat déjà défini, il est beaucoup plus simple d'utiliser l'approche top-down, depuis l'outil fourni par votre framework (wsconsume pour JBossWs) qui va générer le code annoté pour vous.


Un exemple simple :

Read more…

C5ff5a3ddf913cafb29ba973fed5e642

Building a BPEL proccess with Netbeans BPEL Designer (part 1)

2010-10-29 01:18

Write comment

1. Abstract

The main goal of this tutorial is to produce a sample web service for a travel agency portal that will be consumed by visitors looking for travel-related information, the web service will return travel costs, destination weather and any more available information.

To provide such service, we need to call a bunch of fine grained web services via a web service orchestration engine using a standardized language called BPEL "Business Process Execution Language".

Zero line coding...

In this tutorial we're not going to write any line of code, we will use a powerful BPEL Designer to build the process only by Drag-n-Drop actions (thanks to Netbeans BPEL Designer).

The figure below is an overall description about how BPEL orchestration works.
Using a BPEL Designer, a Business expert will produce a Process flow that will be executed with a BPEL Engine (application side - Sun BPEL engine).





During this first part of the tutorial, we'll get the focus on the basics:
  • Installing Glassfish ESB on a remote Linux server (headless mode)
  • Adding the SOA Plugin to your Netbeans
  • Integrating the Glassfish ESB with the Netbeans IDE
Let's start !!

Read more…

6c4a91744a9f857f00ddd8802edb7465

JBoss SOA Platform: How to create a file listener ESB project

2010-11-01 12:58

Write comment

Am going to cover a simple how-to guide to create a simple project with one ESB service, this one will poll a directory looking for a file with a given suffix, when a matching file is placed in the poll directory, it will read the contents of the file and send them as a message on the ESB.

I will consider the JBoss SOA Platform to deploy the ESB project, and will be using the JBoss Developer Studio to achieve it.

To create our ESB project, we need to select "File | New | Other":




As shown above, select "ESB Project" from the "ESB" folder and select and Click "Next".



There are three things we need to specify as shown above:
  1. Provide a name “FilePollerProject”.
  2. Select the appropriate tar­get runtime from the dropdown.
    Am not going to cover the SOA-P runtime installation in this tutorial, you may look into the documentation or contact us for commercial JBoss support.
  3. Choose the ESB version which is 4.4 for this lab.
Now, you can click "Finish" to get the project created.



As show above, the project was created and the ESB configuration editor was automatically opened. This is actu­ally the editor for the jboss­esb.xml file which you can find in the project by navigating to "esbcontent | META­INF | jboss­esb.xml" in the project explorer on the left of the JBDS window.

Now we need to create a gateway "provider". This is how we get messages onto the ESB.

Read more…

 Nbre d'élements: 3/
3