Posts

Showing posts from 2013

Migrating WSO2 API Manager 1.5.0 to 1.6.0

WSO2 API Manager latest version 1.6.0 got released recently. This post provides instructions on how to migrate your data from API Manager 1.5.0 to 1.6.0. If you had already used API Manager 1.5.0 and need to migrate your data to the latest version you can follow this. You can download WSO2 API Manager 1.6.0 from here . You can download the latest migration scripts from https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/products/apimgt/1.6.0/modules/distribution/resources/migration-1.5.0_to_1.6.0 Checkout the migration kit by executing below command. %> svn co https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/products/apimgt/1.6.0/modules/distribution/resources/migration-1.5.0_to_1.6.0 Shutdown AM 1.5.0 if it is running.  Backup your API Manager Databases of your AM 1.5.0 instance. Execute relevant sql script in migration-1.5.0_to_1.6.0 against your API Manager Database. (ex:If your database is mysql run mysql.sql against your APIM mysql

Migrating WSO2 API Manager 1.4.0 to 1.5.0

Migrating WSO2 API Manager 1.4.0 to 1.5.0 WSO2 API Manager latest version 1.5.0 got released recently. This post provides instructions on how to migrate your data from API Manager 1.4.0 to 1.5.0. If you had already used API Manager 1.4.0 and need to migrate your data to the latest version you can follow this. You can download WSO2 API Manager 1.5.0 from here . You can download the latest migration scripts from  https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/products/apimgt/1.6.0/modules/distribution/resources/migration-1.4.0_to_1.5.0/ Checkout the migration kit by executing below command. %> svn co  https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/products/apimgt/1.6.0/modules/distribution/resources/migration-1.4.0_to_1.5.0/ 1. Shutdown APIM 1.4.0 if it is running. 2. Backup your WSO2 Carbon Database(User Store and Registry) and API Manager Databases of your APIM 1.4.0 instance. 3. Execute relevant sql script in ' migration-1.4

How to add additional headers to WSO2 API Manager Swagger Console

Image
WSO2 API Manager has integrated Swagger to allow API consumers to explore APIs through a interactive console. When integrating Swagger with WSO2 API Manager we had to support CORS between API Store and the API Gateway. So in order to send any headers from Swagger, we need to add those required headers to the response coming from the API Gateway as 'Access-Control-Allow-Headers' . By default below set of headers are allowed to be send from swagger. authorization,Access-Control-Allow-Origin,Content-Type So if you need to add any additional headers to Swagger UI, then we should add that header to list of 'Access-Control-Allow-Headers'. There are 2 options to modify 'Access-Control-Allow-Headers'. 1. Modify the Synapse configuration of APIs and add modified set of headers to OutSequence. If you choose this method, you have to modify API configuration of each API and add the 'Access-Control-Allow-Headers'. For that go to Management Console of API

CSV to XML transformation with WSO2 ESB Smooks Mediator

This post provides a sample CSV to XML transformation with WSO2 ESB.  WSO2 ESB supports executing Smooks features through 'Smooks Mediator'.  Latest ESB can be downloaded from here .  We are going to transform the below CSV to an XML message. Lakmali,Erandi,Female,20,SriLanka Lakmali,Baminiwatta,Female,20,SriLanka This is the format of the XML output message. here <people> <person number="1"> <firstname>Lakmali</firstname> <lastname>Erandi</lastname> <gender>Female</gender> <age>20</age> <country>SriLanka</country> </person> <person number="2"> <firstname>Lakmali</firstname> <lastname>Baminiwatta</lastname> <gender>Female</gender> <age>20</age> <country>SriLanka</country> </person> </people> First lets write the smooks configuration to transform above CSV to giv

Huge Message Processing with WSO2 ESB Smooks Mediator

Smooks is a powerful framework for processing, manipulating and transforming XML and non XML data. WSO2 ESB supports executing Smooks features through 'Smooks Mediator'.  One of the main features introduced in Smooks v1.0 is the ability to process huge messages (Gbs in size) [1]. Now with the WSO2 ESB 4.5.0 release (and later), Huge Message Processing feature is supported through Smooks Mediator! Smooks supports three types of processing for huge messages which are, 1. one-to-one transformation 2. splitting and routing 3. persistence This post shows how to process large input messages using Splitting and routing approach.  Step 1: Create sample Huge Input file.  This post assumes the input message is in the following format. <order id="332"> <header> <customer number="123">Joe</customer> </header> <order -items="-items"> <order -item="-item&quo