Tuesday, February 18, 2014

ESB Performance Round 7.5

WSO2 ESB team has published the results of the latest ESB performance study "ESB Performance Round 7.5".

This performance comparison was conducted for WSO2 ESB 4.8.1 against a number of leading open source ESBs.
Results clearly shows that the WSO2 ESB outperforms all the other open-source ESBs.


And one noticeable fact is that Mule ESB has gained some performance over UltraESB for CBRProxy and CBRSOAPHeaderProxy test cases which wasn't the case with performance round 7.

Tuesday, December 3, 2013

[WSO2 ESB] XSLT Mediator - XSLT Imports


There can be situations where we want to import xslt scripts to the main xslt script defined in XSLT mediator.
This requirement can be achieved using Resources in XSLT mediator.

Imported xslt file has to be defined as a XSLT Resource.

Following is a sample.

I have following two xslt files.

xslt1.xslt

 
     
         
             
                 
             
             
                 
             
             
                 
             
             
                 
             
         
     
 


xslt2.xslt

 
     
     
         
             
                 
             
         
     
 

xslt1.xslt is included by the xslt2. Both files are stored in the registry under conf:/

Following is a sample proxy service configuration.
 
    
    
       
          
             
          
          
         

Note the resource element of xslt mediator configuration.

  
        
 
Here location should be matched to the 'href' of and key should point to the registry path of the included xslt file. 

Following is the request format to test this proxy configuration.

 
     
     
         
             
                Isuru 
                Udana 
                Male 
                26 
                SriLanka 
             
             
                Ishan 
                Jayawardena 
                Male 
                26 
                SriLanka 
             
         
     

Sunday, October 13, 2013

Synapse get-property function


Get property function retrieves a property from the message context at the given scope. If the scope is not specified, property is retrieved from the default synapse scope.

Syntax:
get-property(String scope, String propertyName)
get-property(String propertyName)


Supported Scopes

  • default
  • axis2
  • transport
  • registry
  • system


Default scope

Message context properties resides in synapse scope can be retrieved from the default scope. Apart from user defined properties, following special properties can be retrieved from the default scope.
Syntax:

get-property('default', String propertyName)
get-property(String propertyName)


Special Properties supported by get-property function in Default Scope
(Extracted from http://docs.wso2.org/display/ESB470/XPath+Extension+Functions)

Name Return Value
To Incoming URL as a String or empty string if a To address is not defined.
From From address as a String or empty string if a From address is not defined
Action SOAP Action header value as a String or empty string if a Action is not defined
FaultTo SOAP FautTo header value as a String or empty string if a FaultTo address is not defined
ReplyTo ReplyTo header value as a String or empty string if a ReplyTo address is not defined
MessageID A unique identifier (UUID) for the message as a String . This id is guaranteed to be unique.
FAULT TRUE if the message has a fault or empty string if message doesn't have a fault
MESSAGE_FORMAT Returns pox, get, soap11, soap12 depending on the message. If a message type is unknown this returns soap12
OperationName Operation name corresponding to the message.


Axis2 scope

Message context properties resides in axis2 scope can be retrieved from the axis2 scope.
Syntax:
get-property('axis2', String propertyName)


Transport scope

Message context properties resides in transport scope can be retrieved from the transport scope.
Syntax:
get-property('transport', String propertyName)


Registry scope

Properties resides in registry can be retrieved from the registry scope.
Syntax:
get-property('registry', String registryPath@propertyName)
get-property('registry', String registryPath)


System scope

Java System properties can be retrieved from the system scope. Syntax:
get-property('system', String propertyName)

Note: system scope is only available in synapse 3.0 or later versions and WSO2 ESB 4.8.0 or later versions.