Saturday, November 8, 2014

[WSO2 ESB] [4.8.1] How to Convert XML to JSON Array

Following API Demonstrate this functionality.

Try above api with a rest client with following sample requests.

1)Multiple Stocks.
XML request: JSON response : 2) Single Stock
XML request: JSON response (As an array): This is with following message formatter and builder
        <messageformatter class="org.apache.synapse.commons.json.JsonStreamFormatter" contenttype="application/json" />

        <messageformatter class="org.apache.synapse.commons.json.JsonStreamFormatter" contenttype="application/json" />

Wednesday, November 5, 2014

[Active-MQ] PortOffset

1) Changing transport ports. Edit /conf/activemq.xml
and change ports numbers in following configuration.

2) Changing web console port. Edit /conf/jetty.xml
and change following port in following config.

[Active-MQ] Setting up AMQ with MySQL database.

1) Create MySQL database.

2) Download activeMQ and extract it.
3) Edit /conf/activemq.xml
4) Add following configuration.

5) Copy mysql jdbc driver (mysql-connector-java-5.1.25-bin.jar) in the directory "activemq_home/lib/optional"

6) Start ActiveMQ server using $ ./activemq start ( To stop the server use ./activemq stop )

7) Log in to activeMQ management console using http://localhost:8161/ with admin:admin credentials.

8) Create a queue and send a message to the queue with persistence enabled.

9) You can see the message in database.

Saturday, November 1, 2014

Packt offers its library subscription with an additional $150 worth of free content

Packt provides full online access to over 2000 books and videos to give users the knowledge they need, when they need it. From innovative new solutions and effective learning services to cutting edge guides on emerging technologies, Packt’s extensive library has got it covered.

For a limited time only, Packt is offering 5 free eBook or Video downloads in the first month of a new annual subscription – up to $150 worth of extra content. That’s in addition to one free download a month for the rest of the year.

This special PacktLib Plus deal expires on 4th November, 2014.

Check out the deal here