Tuesday, January 11, 2011

Apache Synapse Enterprise Service Bus (ESB) - 2.0.0 Released

The Apache Synapse ESB is a robust, lightweight and highly scalable and distributed open source Enterprise Service Bus (ESB). It supports SOAP Web services as well as Legacy services over transports such as JMS, Apache VFS File systems, Mail etc, and SOAP, REST/POX, plain text and binary message payloads. (Please see http://synapse.apache.org for more details)

Installation Prerequisites
Apache Synapse requires a J2SE runtime of version 1.5.x or later. Running the samples also requires Apache Ant 1.7.x or later. Although Synapse would run with a JDK > 1.5.x, the Script mediator may not properly function on these JDKs. Building Synapse from source requires JDK 1.5.x or later, and Apache Maven 2.1.0 or later

Quick start
Please see the http://synapse.apache.org/Synapse_Quickstart.html guide

Building the Samples
Please see the documents http://synapse.apache.org/Synapse_Samples.html and http://synapse.apache.org/Synapse_Samples_Setup.html

Synapse configuration language
Please see the document http://synapse.apache.org/Synapse_Configuration_Language.html

Extending Synapse
Please see the document http://synapse.apache.orgs/Synapse_Extending.html

Known Issues and limitations
  • SYNAPSE-180 Does not support throttling by concurrency within a cluster
  • SYNAPSE-186 Does not support HTTP some of the REST operations (such as put/delete etc)
  • SYNAPSE-181 Does not yet support JTA transactions
  • SYNAPSE-330 Does not yet support load balancing with session affinity using SOAP sessions
  • SYNAPSE-280 Does not preserve CDATA sections within payloads
  • SYNAPSE-307 The XSLT mediator will not report errors encountered in a provided stylesheet
  • The Synapse JMS implementation supports JMS 1.0.2b, however due to licensing issues we includethe JMS 1.1 spec JAR from Apache Geronimo (geronimo-jms_1.1_spec-1.1.jar) instead. If you have any issues with JMS 1.0.x, please download the Sun JMS 1.0.2b JAR and replace supplied JAR from Geronimo.
Frequently asked questions
  • How can I change the default logging level of Synapse? Edit the lib/log4j.properties and set the line "log4j.category.org.apache.synapse=INFO" to "log4j.category.org.apache.synapse=DEBUG" and restart Synapse.
  • If you get an error related to WS-Security or when using it, check to ensure that your JDK uses the "Unlimited Strength Jurisdiction Policy Files". These could be downloaded from http://java.sun.com/javase/downloads/index_jdk5.jsp Refer to the associated documentation for instructions on how to install it to your JDK.
  • If you encounter issues with your JDK related to XML processing, try placing the Xerces jar files xercesImpl-2.8.0.jar and xml-apis-1.3.03.jar in your /jre/lib/endorsed/ directory.
Reporting Problems

New features in the Synapse 2.0.0 release
  • New, fine-grained configuration model
  • Hot deployment and hot update support for configuration artifacts
  • Priority based mediation support
  • Comprehensive eventing capabilities with WS-Eventing support
  • Secure vault for encrypting passwords in configuration files
  • File locking support in the VFS transport for concurrent polling
  • URLRewrite medaitor for fast and simple URL rewriting
  • Synapse configuration observer API
  • Multiple identity support in the HTTPS transport
  • Enhanced JMX monitoring support for the NHTTP transport
  • Dead letter channel implementation (experimental)
  • Synapse XAR Maven plugin for generating configuration artifacts

Wednesday, January 5, 2011

SFTP file transer with WSO2 ESB.

The VFS transport implementation is based on Apache Commons VFS implementation. VFS (Virtual File System) transport implementation is a module which belongs to the Apache Synapse project. It has a set of service level parameters that needs to be specified for each service.

VFS service level parameters and their descriptions can be found in [1] and the endpoint formats can be found in [2].

Following is a sftp sample for ESB 3.0.1. It copies a file from one sftp location to another sftp folder. SFTPVFSProxy is the proxy service which copies file from one sftp location to another.

If you need further information or need help troubleshooting this sample refer [5].

<proxy name="SFTPVFSProxy" transports="vfs" startOnLoad="true" xmlns="http://ws.apache.org/ns/synapse">
<log level="full"/>
<property name="File" expression="fn:concat('test-', get-property('transport', 'FILE_PATH'))" scope="default"/>
<property name="transport.vfs.ReplyFileName" expression="fn:concat(fn:substring-after(get-property('MessageID'), 'urn:uuid:'), '.xml')" scope="transport"/>
<property name="OUT_ONLY" value="true"/>
<endpoint name="endpoint_urn_uuid_A1546EFFD75FC9CCED785986339425964585275">
<address uri="vfs:sftp://heshan:password@"/>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.PollInterval">15</parameter>
<parameter name="transport.vfs.MoveAfterProcess">vfs:sftp://heshan:password@</parameter>
<parameter name="transport.vfs.FileURI">vfs:sftp://heshan:password@</parameter>
<parameter name="transport.vfs.MoveAfterFailure">vfs:sftp://heshan:password@</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.xml</parameter>
<parameter name="transport.vfs.ContentType">application/xml</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
Following is the XML file (test.xml) that is being moved.

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
<getQuote xmlns="http://services.samples">

If you are interested in trying out more VFS samples, refer [3] and [4].