Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.
barjo edited this page Jul 18, 2012 · 20 revisions

Welcome to the RoSe arvensis wiki!

Synopsis

An example of how to dynamically create an endpoint for each available HelloWorld OSGi services.

With rose-json.conf

{ 
  "machine" : { 
    "id" : "rose-server",
    "host" : "localhost",
    "connection" : [ { "out" : { "service_filter" : "(objectClass=org.acme.HelloWorld)"} } ],
    "component" : [ { "factory" : "RoSe_exporter.cxf", "properties" : { "cxf.servlet.name" : "/ws" } } ] 
  }
}

With the API

import static org.ow2.chameleon.rose.api.Machine;
import static org.ow2.chameleon.rose.api.MachineBuilder.machine;
[...]

//create the rose-server machine
Machine server = machine(context, "rose-server").host("localhost").create();
//Add the cxf exporter to the machine
server.exporter("RoSe_exporter.cxf").withProperty("cxf.servlet.name", "/ws").create();
//Add an out connection, wich will create an endpoint for each HelloWorld services.
server.out("(objectClass=org.acme.HelloWorld)").add();

The list of available endpoint created with the cxf exporter is published on http://localhost/ws.

Documentation

The core javadoc is now available on http://barjo.github.com/arvensis/apidocs/.