SOA Friday #7

Some weekly SOA news:

Category: camel se, glassfish, glassfish esb, netbeans, open-esb

Posted by: Mike Wright on: November 21, 2008

Tags:

Adding a BPEL front-end to the Camel router

Currently I’m working on refactoring the Camel router to two BPELs example to add a BPEL front-end.  (I’ll be updating this post soon with links to the tutorial steps and screen captures.)

Previously I created/tested separate Composite Application projects for testing the database and file processes.

Then I created/tested a Composite Application project for testing the Camel router using the above processes.

What I’ve now done is create a new Composite Application project reusing the Camel and BPEL projects.   In the next tutorial I show how to create a “front-end” BPEL process to invoke the Camel router in this new application.

Category: camel se, open source, open-esb

Posted by: Mike Wright on: October 31, 2008

Tags:

Building the Camel to BPEL example

I’m working on documenting some new Camel SE examples including the steps needed to build and run the Camel to BPEL example.  (coming soon, the BPEL to Camel example, and the Camel directly to BCs example).

For Camel to BPEL, the client sends a request via SOAP to the Camel router.

The router checks the content of the message to decide which BPEL to route to.

One BPEL maps the order to a shipment record and writes it to a file.

The other BPEL maps the order to a different shipment record and inserts in into a database.

Category: camel se, open-esb

Posted by: Mike Wright on: October 29, 2008

Tags:

Camel SE and wire-tap EIP

Working on the Open ESB Camel SE, developing a more real world content-based-routing example, the new example now provides some logging.

By using the multiple String argument form of to (Fluent Builders Java DSL) I was able to have some POJOs get control before and after a message was sent to a target BPEL process.

PORouter3/PORouter/PORouterCamelJBIModule/src:
org/camelse/examples/porouter/AppRouteBuilder.java
  // Routes based on expression evaluation
  //(POJOs write messages to log)
  from(jbiInURI).
    choice().
      when(orderPriceGT500).
        to("bean:LogPOJO1", jbiBpel2DbURI,"bean:LogPOJO1").
     otherwise().
        to("bean:LogPOJO2", jbiBpel2FileURI,"bean:LogPOJO2");

Each POJO logs the message with the POJO’s name (so I can see which route was taken).  This is a slightly different approach to Apache Camel’s wire-tap EIP.

The order in which the messages appear within the log (and the timestamps) distinguish before from after for each POJO.

Category: camel se, open source, open-esb

Posted by: Mike Wright on: October 24, 2008

Tags:

Namespace-aware Camel routing

The early Open ESB Camel SE examples use a simple input message with an Apache Camel Enterprise Integration Patterns (EIPs) content-based-routing XPath expression.

I needed to work on a more realistic example involving messages with namespace qualified elements, so I updated the routing logic to pass a Map of namespaces to the XPathBuilder before configuring Fluent Builders Java DSL content-based-routing.

  // Sets up a namespace-qualified XPath expression
  XPathBuilder orderPriceGT500 =
    new XPathBuilder("//po:OrderInfo/po:OrderPrice > 500");
  Map nsm = new HashMap();
  nsm.put("po", "http://www.globalcompany.com/ns/order");
  orderPriceGT500.setNamespaces(nsm);

and:

  // Routes based on expression evaluation
  from(jbiInURI).choice().when(orderPriceGT500).to(jbiBpel2DbURI).
    otherwise().to(jbiBpel2FileURI);

Category: camel se, open source, open-esb

Posted by: Mike Wright on: October 23, 2008

Tags: