Skip to main content

Posts

How to use WSO2 Carbon Admin services to assign permissions to user goups

This is the way of setting permissions for a role using a “carbon admin service”. Basically, this is an http post request. The endpoint is :  https://localhost:9445/services/UserAdmin.UserAdminHttpsSoap11Endpoint Replace localhost and port according management console information That should be like <esb host name>:<management console https port> Request Payload : <soapenv:Envelope xmlns:soapenv=” http://schemas.xmlsoap.org/soap/envelope/ ” xmlns:xsd=” http://org.apache.axis2/xsd “>    <soapenv:Header/>    <soapenv:Body>       <xsd:setRoleUIPermission>          <!–Optional:–>          <xsd:roleName>cg_publisher</xsd:roleName>          <!–Zero or more repetitions:–>          <xsd:rawResources>/perm...

Understanding the database scripts of WSO2 products

WSO2 Carbon based products require some databases to be created for operation. Every WSO2 product comes with a folder named dbscripts (CARBON_HOME/dbscripts) and that folder contains database scripts for different types of databases. These scripts creates 3 set of tables by default. 1) Registry tables -These are related to registry artifacts of the WSO2 product.  2) User management tables – These tables are related to user management of the server. All the user permissions and roles related information will be saved in these tables. By default these are created in internal H2 database. ( We can create a separate database schema for this if we want) 3) User Store tables – These tables are related to creating actual users which are create in the server. These tables will not be used if we have pointed to external LDAP user store. From the above 3 set of tables, we will only need to focus on user management tables since we have created other tables in external LDAP and data...

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...

ESB Performance round 7.5 results released

ESB Performance is one of the critical factors when you are choosing an ESB for your enterprise integration requirements. Different vendors carries out performance tests with respect to others by time to time. WSO2 is an open source ESB vendor which carries out performance tests frequently since their inception in 2005. With the latest performance test results, WSO2 compares the performance of 4 leading open source ESB vendors with a benchmark test scenario. Given below is the result of the performance test done by WSO2 on a amazon EC2 instance which is publicly available to reproduce these results. You can find a detailed description about this performance test from the below article. http://wso2.com/library/articles/2014/02/esb-performance-round-7.5/