Archive

Articles taggués ‘PEtALS’

Petals ESB 3.0-SNAPSHOT Command Line Interface

23/09/2009 Aucun commentaire

The current petals ESB snapshot comes with a new feature : A new command line interface.
This interface uses the petals ESB Web services which are now embedded within the container. There is no launcher for the CLI right now but it should come soon. For now, here are some snippets :

Connecting to http://localhost:7600/petals/ws ...
PEtALS CLI. Tape 'help' for help.

/> h
PEtALS prompt usage:
 - a, addart                Upload an artifact to the petals server
 - c, connect               Connects the client to a petals server
 - e, endpoint              Displays the list of endpoints
 - i, info                  Displays the container information
 - ic, install              Deals with the component installation and uninstallation
 - j, jbiart                Displays the list of JBI artefacts
 - q, stop                  Stops the container
 - r, repo                  Displays the petals repository content
 - t, topology              Displays the petals topology
 - x, shutdown              Shutdown the container

/>
/> t
 Displays the petals topology
==============================
 + Container #1
  - Name       : NODE-EBM-00
  - Address    : node00.ebmwebsourcing.com
 + Container #2
  - Name       : NODE-OVH-00
  - Address    : node00.ovh.net

/> e
 Displays the list of endpoints
================================
 + Endpoint #1
  - Name       : ProductWebServicePort
  - Service    : {http://productws. partner.soa4all.com/}ProductWebServiceService
  - Interfaces : {http://productws. partner.soa4all.com/}ProductWebService,
  - Location (component / container / domain)   : petals-bc-soap / NODE-EBM-00 / subdomain1
 + Endpoint #2
  - Name       : IWebShopPort
  - Service    : {http://mamboofive.partner.soa4all.com/}IWebShopService
  - Interfaces : {http://mamboofive. partner.soa4all.com/}IWebShop,
  - Location (component / container / domain)   : petals-bc-soap / NODE-EBM-00 / subdomain1
 + Endpoint #3
  - Name       : HanivalProductWSPort
  - Service    : {http://hanivalproductws. partner.net/}HanivalProductWSService
  - Interfaces : {http://hanivalproductws. partner.net/}HanivalProductWS,
  - Location (component / container / domain)   : petals-bc-soap / NODE-EBM-00 / subdomain1
 + Endpoint #4
  - Name       : SemanticSpaceAggImplPort
  - Service    : {http://ws.aggregator.space.dsb.soa4all.eu/}SemanticSpaceAggImplService
  - Interfaces : {http://ws.aggregator.space.dsb.soa4all.eu/}SemanticSpaceWS,
  - Location (component / container / domain)   : petals-bc-soap / NODE-OVH-00 / subdomain1
 + Endpoint #5
  - Name       : SemanticSpaceWSImplServiceEndpointOVH
  - Service    : {http://ws.space.dsb.soa4all.eu/}SemanticSpaceWSImplService
  - Interfaces : {http://ws.space.dsb.soa4all.eu/}SemanticSpaceWS,
  - Location (component / container / domain)   : petals-bc-soap / NODE-OVH-00 / subdomain1
 + Endpoint #6
  - Name       : SemanticSpaceWSImplServiceEndpointEBM
  - Service    : {http://ws.space.dsb.soa4all.eu/}SemanticSpaceWSImplService
  - Interfaces : {http://ws.space.dsb.soa4all.eu/}SemanticSpaceWS,
  - Location (component / container / domain)   : petals-bc-soap / NODE-EBM-00 / subdomain1

/>

… will be extended with more services too.

Categories: PEtALS Tags:

Tutorial from The Server Labs on SCA JBI and PEtALS ESB

15/07/2009 Aucun commentaire

Jacobo Matute from TheServerLabs wrote a very good tutorial on its blog about developping a SCA based application using JBI and especially using PEtALS SCA features. You can find the article here.

Categories: PEtALS, SCA Tags: ,

PEtALS Architecture document published

07/07/2009 Aucun commentaire

The PEtALS Architecture document I wrote last winter has just been published. You can get it from the OW2 PEtALS web site or read from my slideshare account.

Categories: PEtALS Tags: , ,

Proxify Web Services in PEtALS with Maven

02/06/2009 Aucun commentaire

This is quite the same thing than the previous post where I introduced how to expose JAXWS service in PEtALS ESB with Maven. This time, let’s proxify a Web service in PEtALS with Maven.

Here is the Maven descriptor snippet :

<build>
	<plugins>
		<plugin>
			<groupId>org.ow2.petals</groupId>
			<artifactId>maven-petals-wsproxy</artifactId>
			<version>1.0-SNAPSHOT</version>
			<executions>
				<execution>
					<id>generate-jbi</id>
					<phase>package</phase>
					<configuration>
						<wsdl>

http://localhost:8080/Service?wsdl

						</wsdl>
					</configuration>
					<goals>
						<goal>wsproxy</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
	</plugins>
</build>

This will generate a JBI Service Assembly that you can then deploy intoo PEtALS to proxify the service defined in http://localhost:8080/Service?wsdl

You can give it a try, the snapshot version is available on the OW2 Maven repository

Categories: PEtALS Tags: , ,

Easily expose JAXWS in PEtALS with Maven

26/05/2009 Aucun commentaire

Since I am always using command line tools such as Maven or Ant to create my project and to package them, I have just created a new Maven plugin to easily and quickly expose a JAXWS service in PEtALS with Maven. This plugin will generate the JBI Service Unit and Service Assembly from a Maven java project with just a few lines of Maven settings…

As an example, the following interface :

package org.ow2.petals;
 
import javax.jws.WebMethod;
import javax.jws.WebService;
 
@WebService
public interface Service {
 
	@WebMethod
	String ping(String input);
}

and its implementation :

package org.ow2.petals;
 
public class ServiceImpl implements Service {
	public String ping(String input) {
		return input;
	}
}

will generate a Service Assembly idirectly deployable to PEtALS by the help of the Maven plugin :

<build>
	<plugins>
		<plugin>
			<groupId>org.ow2.petals</groupId>
			<artifactId>maven-petals-jaxws2jbi</artifactId>
			<version>1.0-SNAPSHOT</version>
			<executions>
				<execution>
					<id>generate-jbi</id>
					<phase>package</phase>
					<configuration>
						<className>
							org.ow2.petals.ServiceImpl
						</className>
					</configuration>
					<goals>
						<goal>java2jbi</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
	</plugins>
</build>

The plugin takes the Service class, generates its associated WSDL file and the JBI descriptor and then package all into a Service Assembly.

Categories: PEtALS Tags: , ,

SCA and PEtALS ESB, Yes We Can!

07/05/2009 Aucun commentaire

This news has not been published on the PEtALS Web Site (why?) but yes we now have some SCA (Service Component Architecture) tools available with PEtALS ESB!

This work is a result of the ScorWare project in which eBM WebSourcing was involved in.

The SCA feature is provided in PEtALS by the SCA JBI Service Engine (link to the component and link to the documentation)

The main advantage of SCA over other approaches, like BPEL or EIP, is that you can define the composition with Java instead of XML. The SCA composite defines services, which are exposed in the bus. It also defines references, which point to services that might be called or used by the composite at runtime. These references define possible dependencies. And eventually, your composite embeds a Java implementation which allows you to manipulate the references as simple Java objects. This makes the user job easier, in particular to call a service operation or test conditions on a service call result.

For more details on SCA, on tools and more, take a look at the links below :

  • SCA is a specification defined by the Open SOA consortium.
  • SCA is in standardization process by the OASIS Consortium.
  • OW2 FraSCAti is the SCA platform the SCA service engine is based on.
  • Eclipse SCA Tools exist and are hosted by the SOA Tools Platform project. They can be used with the SCA service engine.
  • PEtALS Eclipse tools complete the STP SCA tools for PEtALS specifics (PEtALS Maven plug-in support, packaging for PEtALS…).
Categories: PEtALS Tags: , ,

JSR181 Servive Engine sample : Talk to Twitter

01/04/2009 Aucun commentaire

Just for fun…

The current article will show you that the JSR181 Service Engine really provides an easy way to create JBI services. Since creating simple HelloWorld service is quite boring, let’s talk to twitter micro blogging site.

I will use the Twitter4J API () to talk to Twitter (right all the Twitter job is done here… The current article is not a Twitter tutorial but just a small PEtALS one…).

Interface definition

package net.chamerling.petals.twitter;
 
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
 
/**
 * @author chamerling
 *
 */
@WebService
public interface TwitterService {
 
	@WebMethod
	public String update(@WebParam(name = "id") String login,
			@WebParam(name = "password") String password,
			@WebParam(name = "status") String status) throws TwitterServiceException;
 
	@WebMethod
	public String[] getTimeLine(@WebParam(name = "id") String login,
			@WebParam(name = "password") String password,
			@WebParam(name = "user") String user) throws TwitterServiceException;
}

Implementation (quick)

package net.chamerling.petals.twitter;
 
import java.util.ArrayList;
import java.util.List;
 
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
 
import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterException;
 
/**
 * @author chamerling
 *
 */
@WebService(serviceName = "TwitterService", name = "TwitterService", targetNamespace = "http://twitter.chamerling.net/petals")
public class TwitterServiceImpl implements TwitterService {
 
	/*
	 * (non-Javadoc)
	 * @see net.chamerling.petals.twitter.TwitterService#update(java.lang.String, java.lang.String, java.lang.String)
	 */
	@WebMethod
	public String update(@WebParam(name = "id") String login,
			@WebParam(name = "password") String password,
			@WebParam(name = "status") String status) throws TwitterServiceException {
		String result = null;
		try {
			Status s = getTwitter(login, password).update(status);
			result = s.getText();
		} catch (twitter4j.TwitterException e) {
			throw new TwitterServiceException(e.getMessage());
		}
		return result;
	}
 
	/*
	 * (non-Javadoc)
	 * @see net.chamerling.petals.twitter.TwitterService#getTimeLine(java.lang.String, java.lang.String, java.lang.String)
	 */
	@WebMethod
	public String[] getTimeLine(@WebParam(name = "id") String login,
			@WebParam(name = "password") String password,
			@WebParam(name = "user") String user) throws TwitterServiceException {
		Twitter twitter = getTwitter(login, password);
		List result = new ArrayList();
		List status = null;
		try {
			if (user == null) {
				status = twitter.getUserTimeline();
			} else {
				status = twitter.getUserTimeline(user);
			}
		} catch (TwitterException e) {
			throw new TwitterServiceException(e.getMessage());
		}
 
		for (Status status2 : status) {
			result.add(status2.getText());
		}
 
		return result.toArray(new String[0]);
	}
 
	/**
	 * TODO : Some work to do for caching...
	 * 
	 * @param login
	 * @param password
	 * @return
	 */
	private Twitter getTwitter(String login, String password) {
		return new Twitter(login, password);
	}
}

Put all of this in a JSR181 Service Unit, ie create the good Service Unit descriptor (cf to source attchment), package it (use PEtALS Maven plugin) and that’s all. JSR181 makes it easy ;o)

So now you can publish some status to Twitter with PEtALS.
I have created a test acount here http://twitter.com/chamerlingtest on which I have published messages with PEtALS.

Service Unit sources are available here : http://dl.getdropbox.com/u/73785/blog/twitter-jsr181.zip

Categories: PEtALS, SOCIAL Tags: , ,

Going to SOA4All project first year review

27/03/2009 Aucun commentaire

Next week at the SOA4All project first year review (Brussels NESSI office), I will show a prototype of the SOA4All Distributed Service Bus based on PEtALS ESB and on a P2P based library.
Like in every middleware demo, it is always difficult to show something ‘sexy’ since exchanging XML messages is not… This time I have a web portal based on GWT which is connected to the Bus which is more funky. The main point is how message are exchanged between PEtALS nodes with P2P and semantic techniques. I think this feature will be available in PEtALS before the end of the project (year 2011), so stay tuned.

Categories: PEtALS, soa4all Tags: , ,

New SOA Governance Solution : OW2-Dragon

14/01/2009 Aucun commentaire

The Dragon SOA Governance solution (http://dragon.ow2.org) has just been released. Dragon is a high performance SOA Governance solution. It allows you organize, enforce and reconfigure your Service Oriented infrastructure.

There are a lot of cool features and as you can see in the following figure and one of the main goals is to connect Dragon to existing SOA platforms such as PEtALS ESB (http://petals.ow2.org).

I have worked with the Olivier (the Dragon product leader) to define the connector API and I have implemented it on the PEtALS side.

I hope publish a PEtALS snapshot this month wich will be connected to Dragon… Stay  tuned !

Categories: dragon, Governance Tags: , , , ,

PEtALS Distributed Service Bus Illustrated

28/11/2008 Aucun commentaire

Here are some slides extracted from a SOA4All presentation I gave last month in a technical meeting. It introduces the distributed aspects of PEtALS and also give some deployment and orchestration samples.