Skip to main content

Posts

Showing posts from March, 2014

WSO2 ESB HTTP transport properties tutorial

WSO2 ESB uses the property mediator to change the behavior of the messages flowing through the ESB mediation engine. HTTP transport level properties mentioned below can be used to access and change the http level properties. You can get a general idea about ESB properties from this blog post. http://soatutorials.blogspot.com/2014/03/wso2-esb-properties-tutorial.html HTTP Transport properties POST_TO_URI This property makes the outgoing URL of the ESB a complete URL. This is important when we talk through a Proxy Server. You can set this property as below. <property name="POST_TO_URI" scope="axis2" value="true"/> Here is an example in which we can use this property. <?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse"        name="SampleProxy"        transports="https,http"        statistics="disable"        trace...

WSO2 ESB properties tutorial

WSO2 ESB provides properties as a way to control different aspects of the messages flowing through the mediation engine. They will not change the content (payload) of the message but they will be used to change the behavior of the message flowing through the ESB. Property mediator is used to access or modify the properties defined in the WSO2 ESB. https://docs.wso2.org/display/ESB481/Property+Mediator You can define a property mediator inside the ESB configuration language as below if you are setting a static value for the property. <property name="TestProperty" value="Chanaka" scope="default" type="STRING"> If you are setting a dynamic value for the property, then you can use the following method. <property name="TestProperty" expression=" //m0:getQuote/m0:request/m0:symbol"      xmlns:m0 = " http://services.samples/xsd"   scope="default" type="STRING"> In the above ...

Simple Git commands to getting started with Git

Git is an increasingly popular source control mechanism which most of the organizations are moving in to. With the extensive use of Git, sometimes developers need to learn git quickly. In this blog post, I will write about 10 of the most useful git commands to getting started with Git. git init - Initialize a local git repository git clone "repo_url" - Clone an existing git repository to your local machine git add -A dir_name - Add an entire directory with its files to your local git repository git pull - update your existing local repository with a remote repository git commit -m "comment" - Commit your local changes to your local git repository git push - Push your local changes to the remote git repository which you have cloned this repository from. Updating your own repository with changes committed to a remote(upstream) repository git remote add upstream "repo_url" - Add the upstream git fetch upstream - Fetch the changes ...

WSO2 ESB creating a response for a "GET" request

When you are creating REST APIs with WSO2 ESB, you may need to send some response message back to the user when something goes wrong. In this kind of scenario, you can create a payload inside the ESB and send it back. For doing this, you can use the below configuration. <api xmlns=" http://ws.apache.org/ ns/synapse " name="LoopBackProxy" context="/loopback">    <resource methods="POST GET">       <inSequence>          <property name="NO_ENTITY_BODY" scope="axis2" action="remove"></property>          <log level="full"></log>          <payloadFactory media-type="xml">             <format>                <m:messageBeforeLoopBack xmlns:m=" http://services...