tag:blogger.com,1999:blog-232199382024-03-20T14:33:41.690+05:30Sumedha's bloganything,everything and everyother thing...
Welcome....Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.comBlogger222125tag:blogger.com,1999:blog-23219938.post-36636755104024946092016-02-13T22:48:00.001+05:302016-02-13T22:48:49.926+05:30How to add Maven archetype repository in command line?<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
Scenario</h2>
<div>
Your in the middle of developing a Maven archetype and want others to tryout your archetype. Since it's not finalised, you have not uploaded it to Maven Central.</div>
<h2 style="text-align: left;">
How?</h2>
<div>
<ol style="text-align: left;">
<li>Upload your archetype to a maven repository of a public server you have control of</li>
<li>Share the url of Maven archetype with your users </li>
<li>Ask them to provide the url as a parameter to archetype command as follows:</li>
</ol>
</div>
<div>
<div>
<pre class="”pretty" print="">mvn archetype:generate
<b>-DarchetypeRepository=http://maven.wso2.org/nexus/content/repositories/orgwso2-333
</b>-DarchetypeGroupId=org.wso2.msf4j
-DarchetypeArtifactId=msf4j-microservice
-DarchetypeVersion=1.0.0
-DgroupId=org.example
-DartifactId=Hello-Service
-Dversion=1.0.0-SNAPSHOT
-Dpackage=org.example.service -DserviceClass=HelloService
</pre>
</div>
</div>
<div>
<br />
-<a href="http://maven.apache.org/archetype/maven-archetype-plugin/generate-mojo.html#archetypeRepository">DarchetypeRepository</a> attribute allows specifying location of archetype repository in command line.</div>
</div>
Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com3tag:blogger.com,1999:blog-23219938.post-44591045417220887322013-03-08T13:01:00.000+05:302013-03-08T13:02:07.974+05:30Evaluation of WSO2 Carbon Platform...<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
While going through a mail thread, I found an old WSO2 platform diagram. A quick glance @ it made me realize how far we have come. What follows bellow are few platform diagrams I could get my hand on & a small explanation on changes added. However, these explanations by no means justify or reflect the amount of improvements the platform has achieved during this period. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<i>Hint : Start reading from last diagram</i></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-style-span" style="font-size: 19px; font-weight: bold;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span class="Apple-style-span" style="font-size: 19px; font-weight: bold;">2013 March</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4ms7DesZDbeZIMIeBb6AunrtJ_iGRV5khhmY_o7AT29Aac5mdU-fwxGp4vMell0uork9Cc-SINewf3_sRLliWL9SqIeojytmTIpRMYs_uAcIAV3mJRXUQkE-GUT5qF3qnh0Cgcw/s1600/4-wso2-platform-diagram-v14-small-01_Mar_2013.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="384" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4ms7DesZDbeZIMIeBb6AunrtJ_iGRV5khhmY_o7AT29Aac5mdU-fwxGp4vMell0uork9Cc-SINewf3_sRLliWL9SqIeojytmTIpRMYs_uAcIAV3mJRXUQkE-GUT5qF3qnh0Cgcw/s640/4-wso2-platform-diagram-v14-small-01_Mar_2013.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<b>Elastic Load Balancer:</b><br />
With increasing number of client deployments, ability to distribute load among multiple nodes is natural. While there are many load balancers out there, we wanted to come up with our own one catering to specific problems. (For a summary of these problems, view Chinthana's presentation @ <a href="http://www.slideshare.net/wso2.org/introducing-the-wso2-elastic-load-balancer">http://www.slideshare.net/wso2.org/introducing-the-wso2-elastic-load-balancer</a>)<br />
<h3 style="text-align: center;">
2012 March</h3>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAXzA9nWb-Oo7LMn98RiLfDaZUufbaTxjIbrZE3Xa3fJMtBQ5fDGTrJE-pW6_4uI0qxs74STP22SqsGaqPw1OZDoRrgumMAOly4D5wfVtc44ffDs_PQ_aEbXqUFNbauAOLQJK6Yg/s1600/3-wso2-platform-diagram-v9-01_Mar_2012.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="424" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAXzA9nWb-Oo7LMn98RiLfDaZUufbaTxjIbrZE3Xa3fJMtBQ5fDGTrJE-pW6_4uI0qxs74STP22SqsGaqPw1OZDoRrgumMAOly4D5wfVtc44ffDs_PQ_aEbXqUFNbauAOLQJK6Yg/s640/3-wso2-platform-diagram-v9-01_Mar_2012.png" width="640" /></a></div>
<br />
<b>New Connectors:</b><br />
We have increased the number of connectors for widely used external systems. Some of the most prominent are Salesforce, Paypal, SAP, PeopleSoft adaptors. We have continued working on adding more and more adaptors.<br />
<br />
<b>Partners:</b><br />
We have partnered with several external partners for training, deployment.<br />
<br />
<b>Public Cloud:</b><br />
Support for running on widely used public cloud IaaSes.<br />
<br />
<b>Cloud Services Gateway:</b><br />
More and more customers want to run hybrid clouds. Integration between public and private clouds is becoming more important than never before. Cloud Services Gateway fills this gap.<br />
<br />
<h3 style="text-align: center;">
2012 January</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9msaw8to1HnMwwkWzmNecojYFJzJ8VWOu4FCMBwGW4dUW2mWHbj42Ylcm1vjKGEMvZiWfGjsqiqJkHFqiwi3tC17BmYrfLTTMLtE0cCCmDmOLdb-qDqrmbXijgAAX-CFyH5yLVA/s1600/2-wso2-platform-diagram-v3-01_Jan_2012.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="416" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9msaw8to1HnMwwkWzmNecojYFJzJ8VWOu4FCMBwGW4dUW2mWHbj42Ylcm1vjKGEMvZiWfGjsqiqJkHFqiwi3tC17BmYrfLTTMLtE0cCCmDmOLdb-qDqrmbXijgAAX-CFyH5yLVA/s640/2-wso2-platform-diagram-v3-01_Jan_2012.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>WSO2 Message Store :</b> </div>
<div class="separator" style="clear: both; text-align: left;">
Any platform dealing with enterprise level solutions should provide a transactional, persistent message store. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>WSO2 Complex Event Processor :</b> </div>
<div class="separator" style="clear: both; text-align: left;">
As platform matured, many types of messages started passing through our middleware. These messages are generated by different events happening in external systems we integrated with.</div>
<div class="separator" style="clear: both; text-align: left;">
It was natural for us to come up with a Complex Event Processor (CEP). CEP allows you to define complex events combining multiple atomic events. Once done, CEP engine starts listening for occurrences of these complex events. The action to perform after a complex event occurs can be defined.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
In this version we have used Esper as our CEP engine. But in time to come (by 2013), we end up writing our own CEP engine called Siddhi. By March 2013, Siddhi will evolve to be several times faster than any other CEP engine available on market.</div>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: center;">
2009 September</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig6zZAtQtVNfrYb-OvTSuZ2rLRHjcNomEnrJdnJdnU3OUCyy0lIP4BmzmRnzpPpNTqz4RVh0XO8UWzyDTdR0OBwq9Y_iYpiuxRaXJChW8f5OO-CEMnDuIcizsV1vCk0idfPqsqqw/s1600/1-wso2-product-platform-all-prod_Sep_2009.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="448" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig6zZAtQtVNfrYb-OvTSuZ2rLRHjcNomEnrJdnJdnU3OUCyy0lIP4BmzmRnzpPpNTqz4RVh0XO8UWzyDTdR0OBwq9Y_iYpiuxRaXJChW8f5OO-CEMnDuIcizsV1vCk0idfPqsqqw/s640/1-wso2-product-platform-all-prod_Sep_2009.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br /></div>
Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com2tag:blogger.com,1999:blog-23219938.post-17141320774241063132013-03-07T02:11:00.001+05:302013-03-07T02:11:18.127+05:30How to resolve Informix -196 ISAM?<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
Problem:</h3>
-196 <span class="Apple-tab-span" style="white-space: pre;"> </span>ISAM error: Operation not allowed in temporary dbspace.<br />
<br />
An operation was executed on a temporary dbspace that required functionality that temporary dbspaces do not provide (most likely logging). Use a nontemporary dbspace for this operation.<br />
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6tSZWTP_MFpPGbYZOP3qM_-w5IrQ65Gjipn89WZ_YRJZfswybgNJcPuC0WF1yY2RSCVQ94wLJ3WbfjXG52Ip2QvD-UyonutU9dMf3kI7yiiUBpVkfzjjQaGnjpW9ThG1EGdIHYQ/s1600/temporarytablespace.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6tSZWTP_MFpPGbYZOP3qM_-w5IrQ65Gjipn89WZ_YRJZfswybgNJcPuC0WF1yY2RSCVQ94wLJ3WbfjXG52Ip2QvD-UyonutU9dMf3kI7yiiUBpVkfzjjQaGnjpW9ThG1EGdIHYQ/s1600/temporarytablespace.png" /></a></div>
<div>
<br /></div>
<h3 style="text-align: left;">
Solution:</h3>
<div>
Check your DBSpace for ones marked as temporary. (Highlighted in <span class="Apple-style-span" style="color: red;">red</span>)</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1PCSAPBr3GhiX5rpYxApsQkeO8vDMkEoUOnWUtNazBmsLabsdnLldYH3FLqKlC04HqlNpa7Fe9zWYDUe069JZWo1_jAcy1ofC36rpX6TZ6D52XefP-ivAuu7gmeP5p1nFuS1-HA/s1600/onstat_d1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1PCSAPBr3GhiX5rpYxApsQkeO8vDMkEoUOnWUtNazBmsLabsdnLldYH3FLqKlC04HqlNpa7Fe9zWYDUe069JZWo1_jAcy1ofC36rpX6TZ6D52XefP-ivAuu7gmeP5p1nFuS1-HA/s1600/onstat_d1.png" /></a></div>
<div>
<br /></div>
<div>
You cannot use this temporary DBSpaces to create databases.</div>
<div>
Temporary DBSpaces are created when you have '-t' option in 'onspaces' command.</div>
<div>
<br /></div>
<div>
eg:</div>
<div>
<pre class="c" name="code">onspaces -c -d testspace3 <b>-t</b> -k 4 -p /home/informix/data/data3.dat -o 100 -s 3000000
</pre>
</div>
</div>
Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com0tag:blogger.com,1999:blog-23219938.post-70790180242895895182013-03-07T01:25:00.002+05:302013-03-07T01:44:29.237+05:30How to increase IBM Informix page size + onspaces?<div dir="ltr" style="text-align: left;" trbidi="on">
We have been working on adding <a href="http://www-01.ibm.com/software/data/informix/">IBM Informix</a> support to <a href="http://wso2.com/products/carbon/">WSO2 Carbon platform</a>. Initial tests on Windows and Mac OS passed seamlessly. However when we switched testing environment to SUSE Enterprise Linux, things stared falling apart.<br />
<br />
This post is on the problem we faced, it's cause and solution.<br />
<br />
<h3 style="text-align: left;">
<span class="Apple-style-span" style="font-weight: bold;">Problem:</span></h3>
<pre class="c" name="code">517: The total size of the index is too large or too many parts in index.
Error in line 277
Near character position 115
550: Total length of columns in constraint is too long.
Error in line 351
Near character position 45</pre>
<pre class="c" name="code"><span class="Apple-style-span" style="font-family: Times; font-weight: bold; white-space: normal;">
</span></pre>
<pre class="c" name="code"><span class="Apple-style-span" style="font-family: Times;"><span class="Apple-style-span" style="white-space: normal;">This occurred while running database creation scripts for WSO2 Carbon.</span></span></pre>
<pre class="c" name="code"><span class="Apple-style-span" style="font-family: Times;"><span class="Apple-style-span" style="white-space: normal;">
</span></span></pre>
<pre class="c" name="code"><span class="Apple-style-span" style="font-family: Times;"><span class="Apple-style-span" style="white-space: normal;"><b>
</b></span></span></pre>
<h3 style="text-align: left;">
<span class="Apple-style-span" style="font-family: Times; font-weight: bold; white-space: normal;">SQL (DDL) in question</span></h3>
<pre class="c" name="code"></pre>
<pre class="c" name="code" style="text-align: left;">269: CREATE TABLE UM_PERMISSION (
270: UM_ID SERIAL UNIQUE,
271: UM_RESOURCE_ID LVARCHAR(255) NOT NULL,
272: UM_ACTION LVARCHAR(255) NOT NULL,
273: UM_TENANT_ID INTEGER DEFAULT 0,
274: PRIMARY KEY (UM_ID, UM_TENANT_ID)
275: );
276:
277: CREATE INDEX INDEX_UM_PERMISSION_UM_RESOURCE_ID_UM_ACTION ON UM_PERMISSION (UM_RESOURCE_ID, UM_ACTION, UM_TENANT_ID);
334: CREATE TABLE UM_CLAIM(
335: UM_ID SERIAL UNIQUE,
..
..
348: UM_TENANT_ID INTEGER DEFAULT 0,
349: UNIQUE(UM_DIALECT_ID, UM_CLAIM_URI, UM_TENANT_ID,UM_MAPPED_ATTRIBUTE_DOMAIN),
350: FOREIGN KEY(UM_DIALECT_ID, UM_TENANT_ID) REFERENCES UM_DIALECT(UM_ID, UM_TENANT_ID),
351: PRIMARY KEY (UM_ID, UM_TENANT_ID)
352:);
</pre>
<h3 style="text-align: left;">
Reason:</h3>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
"If you do not specify a page size for the new buffer pool, Dynamic Server uses the operating system default page size (4 kilobytes on Windows and 2 kilobytes on most UNIX platforms) </div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
as the default page size for the buffer pool." </div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
- <a href="http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.admin.doc/admin396.htm">http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.admin.doc/admin396.htm</a></div>
<h4 style="text-align: left;">
</h4>
<h3 style="text-align: left;">
Proof !!</h3>
Check value for 'pgsize' in bellow screenshots.<br />
<span class="Apple-style-span" style="font-weight: bold;"><br />Windows / OS X</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJDwdUutgyOnQfYMyFQS4o3N8Uo6pVULv0eFUjR3vaJNaSYPoUDaWXG2t-gSn7kqrOMafOCFx8_6a9FeuV-RahgQP9oyZ1h0F4hz3bFJyqzkJ7naGkYlkxERXot3sv_8Uk8XyOEg/s1600/onstat_mac.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJDwdUutgyOnQfYMyFQS4o3N8Uo6pVULv0eFUjR3vaJNaSYPoUDaWXG2t-gSn7kqrOMafOCFx8_6a9FeuV-RahgQP9oyZ1h0F4hz3bFJyqzkJ7naGkYlkxERXot3sv_8Uk8XyOEg/s640/onstat_mac.png" width="640" /></a></div>
<span class="Apple-style-span" style="font-weight: bold;"><br /></span>
<span class="Apple-style-span" style="font-weight: bold;"><br /></span>
<span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="font-weight: normal;"><b>SUSE Enterprise Linux</b></span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZaGWE1-R_A0gfk0jm_EQM4b2JMeOCqZYrLsNEGI0AB1h4B6dOhsH4oMu7Ar6Aai0MWkxI_OJfOWf65XSpMugj0uLkoUHitYfzImSznqoGpw7C02oeW2DpFF7tpENN-sbufIFzvg/s1600/onstat_d1.png" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZaGWE1-R_A0gfk0jm_EQM4b2JMeOCqZYrLsNEGI0AB1h4B6dOhsH4oMu7Ar6Aai0MWkxI_OJfOWf65XSpMugj0uLkoUHitYfzImSznqoGpw7C02oeW2DpFF7tpENN-sbufIFzvg/s640/onstat_d1.png" width="640" /></a></div>
<br />
<h3 style="text-align: left;">
<span class="Apple-style-span" style="font-weight: bold;">Solution</span></h3>
1. Create a new dbspace with higher page size value<br />
eg:<br />
<pre class="c" name="code">onspaces -c -d testspace3 -k 4 -p /home/informix/data/data3.dat -o 100 -s 3000000
<span class="Apple-style-span" style="font-family: Times; white-space: normal;">'-k 4' is doing the trick here (4 represents 4096. This will be the new page size value for newly created testspace3)</span></pre>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEpjPDufu8Gx137ZkB7cvZI7eyW7MzEg4adWQ3dBoAYoBO-vzt_gBc7Z1UmYuScOY1VO0Li_SCtSrmUNw5T_rJAhQn2h4rdKbcJ8VpU40p_NxloyzQJpIKgNh37g0_80aLncAkTA/s1600/onspaces1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="85" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEpjPDufu8Gx137ZkB7cvZI7eyW7MzEg4adWQ3dBoAYoBO-vzt_gBc7Z1UmYuScOY1VO0Li_SCtSrmUNw5T_rJAhQn2h4rdKbcJ8VpU40p_NxloyzQJpIKgNh37g0_80aLncAkTA/s640/onspaces1.png" width="640" /></a></div>
<br />
<br />
<br />
/home/informix/data/data3.dat is created as follows:<br />
<pre class="c" name="code">informix@SUSE-TEST:~/data> pwd
/home/informix/data
informix@SUSE-TEST:~/data> touch data3.dat
informix@SUSE-TEST:~/data> chmod 660 data3.dat
informix@SUSE-TEST:~/data> chown informix:informix data3.dat</pre>
<br />
Now create a database using newly created Dbspace.<br />
Select new DBSpace - testspace3<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXxd7JoXLIfnQhwTPhel3etE1PRFgLo7-BvwUvTMUg7LgdPdvmUfJqweTPQ1GHgJOvW-0I76Csr1Ps9BeSndQPBqESlXnuxDmns-1mhN4LSVNKisQ-4OaNlLy6osswRkiTjycD2Q/s1600/isdb2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXxd7JoXLIfnQhwTPhel3etE1PRFgLo7-BvwUvTMUg7LgdPdvmUfJqweTPQ1GHgJOvW-0I76Csr1Ps9BeSndQPBqESlXnuxDmns-1mhN4LSVNKisQ-4OaNlLy6osswRkiTjycD2Q/s1600/isdb2.png" /></a></div>
<br /></div>
Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com2tag:blogger.com,1999:blog-23219938.post-45770542020962392082013-02-13T06:44:00.002+05:302013-02-13T06:58:13.651+05:30Pics - Final preparations for WSO2Con2013 London<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiiQ9Wx7WG1vwD2vNv9InWuPMqPRW955492SnAS5KZRG9QZNw4uySi_dKG_U1csy3NlkOdVk7JLok-o6jm7WnZfqrNk7yzjc7bbEm8YPOSbcMmgh-PvzX1UbeDbRfx3FP4BE3NPg/s1600/DSC_0774.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiiQ9Wx7WG1vwD2vNv9InWuPMqPRW955492SnAS5KZRG9QZNw4uySi_dKG_U1csy3NlkOdVk7JLok-o6jm7WnZfqrNk7yzjc7bbEm8YPOSbcMmgh-PvzX1UbeDbRfx3FP4BE3NPg/s320/DSC_0774.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxeuLC3d0j5icu4IdShJeiqYyTYmq09cwEESt5s__lOTMqvjbgYFbMSok7sq86lbs1z5TAPOCFlZ-FIB-nqFLaaEmj9vOKzSO5532HsUPTaW2Upr3k4dsXHZ1tMP4SUV3U1EkCwQ/s1600/DSC_0775.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxeuLC3d0j5icu4IdShJeiqYyTYmq09cwEESt5s__lOTMqvjbgYFbMSok7sq86lbs1z5TAPOCFlZ-FIB-nqFLaaEmj9vOKzSO5532HsUPTaW2Upr3k4dsXHZ1tMP4SUV3U1EkCwQ/s320/DSC_0775.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8ojlp8W5gT6P_sdX_UnMZvaROuUfgSGprR6iAjo02bVdWc8vWLLuGzc7GCKMz_JXGIf-BiT5FIJOtMaCTbPgJjnWrPSpZ0h7Wt8jeplMvQ03stzV-2LI7bTVLeSIrsSjNXSOAZg/s1600/DSC_0781.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8ojlp8W5gT6P_sdX_UnMZvaROuUfgSGprR6iAjo02bVdWc8vWLLuGzc7GCKMz_JXGIf-BiT5FIJOtMaCTbPgJjnWrPSpZ0h7Wt8jeplMvQ03stzV-2LI7bTVLeSIrsSjNXSOAZg/s320/DSC_0781.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwKxhZ7w2X1I1Fs-ljQZ-Y7SsrIYEg_r9M_uSRexSB41kB4PyPt14sBfUMC4SfMc1RkY5lnPvKK4_tn0LEFyGMt5h0xrU3V4Orn915pSOg_SEvj_7tIigi5TfqDq0OoDIhyphenhyphenpJ8ng/s1600/DSC_0785.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwKxhZ7w2X1I1Fs-ljQZ-Y7SsrIYEg_r9M_uSRexSB41kB4PyPt14sBfUMC4SfMc1RkY5lnPvKK4_tn0LEFyGMt5h0xrU3V4Orn915pSOg_SEvj_7tIigi5TfqDq0OoDIhyphenhyphenpJ8ng/s320/DSC_0785.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFGnfXss-qmepQugAMYH6DSjKkZqW04SMBfxxiKnR0brEJklMYVrHhuhsh7u-ZCur4xbv7JKgXvclZDr5PoEIFM5JLmHURkCTXfh0SWzLQmexOLSt_M8008nh1gbiN9qukO2eRhQ/s1600/DSC_0787.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFGnfXss-qmepQugAMYH6DSjKkZqW04SMBfxxiKnR0brEJklMYVrHhuhsh7u-ZCur4xbv7JKgXvclZDr5PoEIFM5JLmHURkCTXfh0SWzLQmexOLSt_M8008nh1gbiN9qukO2eRhQ/s320/DSC_0787.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh54_K-1FjMI6McUiLy9m9iWDJ1KGqqwaiOYekloDs7LyVi1H-JuLTibkEWgP36r1WOq5vQYcMyOtclBYegEWugbMdmbkvwPJ0pXrwMFnlZL2S-5bQQQFckxMHAoR27g6txnL7y-A/s1600/DSC_0788.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh54_K-1FjMI6McUiLy9m9iWDJ1KGqqwaiOYekloDs7LyVi1H-JuLTibkEWgP36r1WOq5vQYcMyOtclBYegEWugbMdmbkvwPJ0pXrwMFnlZL2S-5bQQQFckxMHAoR27g6txnL7y-A/s320/DSC_0788.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDcrtIw1nJ5q_6g0GO2kpvRtUfD3yAiR_VEYQvyf5h3-zeBWxhAvwxLINmmekfqTOCLptmmyrlYgVzZ0tQ9T7W9MFAr2EprSEghG0I5xRgCfHQf3nvtFjfxVS8B5PVfScPsW227w/s1600/DSC_0789.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDcrtIw1nJ5q_6g0GO2kpvRtUfD3yAiR_VEYQvyf5h3-zeBWxhAvwxLINmmekfqTOCLptmmyrlYgVzZ0tQ9T7W9MFAr2EprSEghG0I5xRgCfHQf3nvtFjfxVS8B5PVfScPsW227w/s320/DSC_0789.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitwPRaGqfrv97xW9TNoRf7gc0nceZMCzmNy9RfaxI0RDTJevmqL4jaqpC_g55FEmSXSVc3RbSHK8BMGMH7hkS-_hoXwObBoswWUh6ejgq5FGEAZF7YSbZ7pQF1VndKtz3tfmCnFQ/s1600/DSC_0791.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitwPRaGqfrv97xW9TNoRf7gc0nceZMCzmNy9RfaxI0RDTJevmqL4jaqpC_g55FEmSXSVc3RbSHK8BMGMH7hkS-_hoXwObBoswWUh6ejgq5FGEAZF7YSbZ7pQF1VndKtz3tfmCnFQ/s320/DSC_0791.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho30PGGprORWzOsq0LjR1mOTjEFjZIhklG8u1bzah4QoN4e9s3usGLLkXN9aGC5RCXYkclY-bemqbirwtJH1wN_CfKO-2p49yqKa9eUSZ5td4NyNrPlCYQYbKEFBLGBQYlkVdf3Q/s1600/DSC_0792.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho30PGGprORWzOsq0LjR1mOTjEFjZIhklG8u1bzah4QoN4e9s3usGLLkXN9aGC5RCXYkclY-bemqbirwtJH1wN_CfKO-2p49yqKa9eUSZ5td4NyNrPlCYQYbKEFBLGBQYlkVdf3Q/s320/DSC_0792.JPG" width="320" /></a></div>
<br /></div>
Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com0tag:blogger.com,1999:blog-23219938.post-11979086815088394962013-01-28T12:29:00.000+05:302013-01-28T12:30:03.540+05:30Writing a custom authenticator for WSO2 API Gateway<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="p1">
<br /></div>
<div class="p2">
<b>Little bit on existing 'APIAuthenticationHandler'</b></div>
<div class="p3">
<br /></div>
<div class="p4">
By default <a href="http://wso2.com/products/api-manager/">WSO2 API Gateway</a> has OAuth Token authenticator enabled. It is this handler that validates OAuth Token per each API invocation. This is enabled per each and every API via following configuration line (highlighted) appearing in for API definition.</div>
<div class="p3">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDoN50Ytmi-Ldq0QwxeMzRlHyXP_Ulnvr5cSxFsEAjllSR_Pi9k0w1yIcFhZxgVEgz7DE56oD4IWtYngsgCcBimz-q9Aru-VXOpzcflQkkZoVtOaL8hkkJfHF6jZ45lQE7A01z0w/s1600/api-oauthhandler.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="428" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDoN50Ytmi-Ldq0QwxeMzRlHyXP_Ulnvr5cSxFsEAjllSR_Pi9k0w1yIcFhZxgVEgz7DE56oD4IWtYngsgCcBimz-q9Aru-VXOpzcflQkkZoVtOaL8hkkJfHF6jZ45lQE7A01z0w/s640/api-oauthhandler.png" width="640" /></a></div>
<div class="p3">
<br /></div>
<div class="p3">
Source for APIAuthenticationHandler that got shipped with API Manager 1.3.0 can be found @ <a href="https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0/components/apimgt/org.wso2.carbon.apimgt.gateway/1.0.5/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/security/APIAuthenticationHandler.java">https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0/components/apimgt/org.wso2.carbon.apimgt.gateway/1.0.5/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/security/APIAuthenticationHandler.java</a>.</div>
<div class="p3">
<br /></div>
<div class="p4">
OAuth Token validation occurs inside following method.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge2BgXtgxB7EbM_DvW-P4PjlkB6FGvCKt0ADXePYX2W0Toa-nAFwgG3Mu1QbePiBtf-KIrcGfOevTx2NAwSQ7zCavwmgct_AcFxqdP9mj-cVAf01k43V1KjQef3ri8Q56pRJHN-g/s1600/handleRequest.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="448" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge2BgXtgxB7EbM_DvW-P4PjlkB6FGvCKt0ADXePYX2W0Toa-nAFwgG3Mu1QbePiBtf-KIrcGfOevTx2NAwSQ7zCavwmgct_AcFxqdP9mj-cVAf01k43V1KjQef3ri8Q56pRJHN-g/s640/handleRequest.png" width="640" /></a></div>
<div class="p3">
<br /></div>
<div class="p3">
<br /></div>
<div class="p4">
APIAuthenticationHandler class is constructed as follows: </div>
<div class="p3">
<br /></div>
<div class="p4">
public class APIAuthenticationHandler <b><i>extends AbstractHandler implements ManagedLifecycle {</i></b></div>
<div class="p4">
<b><i>…</i></b></div>
<div class="p4">
<b><i>…</i></b></div>
<div class="p4">
<b><i>}</i></b></div>
<div class="p3">
<br /></div>
<div class="p3">
<b><i>AbstractHandler</i></b> allows you to write a Handler that is compatible with Axis2 Handler framework that gets invoked when included within an API definition (similar to above).</div>
<div class="p4">
<b><i>ManagedLifecycle</i></b> allows you to define logic that needs to run during different phases (eg: init, destroy) of a Handler.</div>
<div class="p3">
<br /></div>
<div class="p4">
By extending & implementing same AbstractHandler and ManagedLifecycle you can add your own authenticator for API Gateway.</div>
<div class="p3">
<br /></div>
<div class="p3">
<b>Sample Custom Authentication Handler</b></div>
<div class="p2">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXdJ-fxu98g_rPM_FA7PEThyphenhyphenp-WSsZsO4fbIERGWnnw_u3T0ubYAelN8E8CPldCD3_lb8-dvxXvInahOatH49skjQAUo1wxFx02P34pegQLZVi2JKbfVsiTlfdvqAOWGqG4KVOXQ/s1600/customauthenticator.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="544" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXdJ-fxu98g_rPM_FA7PEThyphenhyphenp-WSsZsO4fbIERGWnnw_u3T0ubYAelN8E8CPldCD3_lb8-dvxXvInahOatH49skjQAUo1wxFx02P34pegQLZVi2JKbfVsiTlfdvqAOWGqG4KVOXQ/s640/customauthenticator.png" width="640" /></a></div>
<div class="p3">
<br /></div>
<div class="p3">
Drop the jar file containing above handler into wso2am-1.3.0/repository/components/lib folder.</div>
<div class="p3">
<br /></div>
<div class="p4">
Then replace ‘<i><handler class="org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler"></handler></i>’ in your API definition with full qualified name of your new custom authentication handler.</div>
<div class="p4">
<br /></div>
<h3 style="text-align: left;">
More Advanced Handler Sample</h3>
<div>
<a href="http://www.slideshare.net/JohannNallathamby">Johann</a> has written a more advance end to end complete sample called 'SignatureVerificationHandler'. This verifies incoming signature contained in an API call. This sample can be located @ <a href="https://svn.wso2.org/repos/wso2/people/johann/SignatureVerificationHandler/src/main/java/org/wso2/carbon/apimgt/gateway/verifier/SignatureVerificationHandler.java">https://svn.wso2.org/repos/wso2/people/johann/SignatureVerificationHandler/src/main/java/org/wso2/carbon/apimgt/gateway/verifier/SignatureVerificationHandler.java</a>.</div>
<div>
<br /></div>
</div>
Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com2tag:blogger.com,1999:blog-23219938.post-41392300285834136332012-12-03T01:15:00.000+05:302012-12-03T01:15:04.037+05:30Getting Oracle JVM to run in Raspberry Pi<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
As of today, <a href="http://www.raspberrypi.org/">raspberrypi.org team</a> recommends <a href="http://www.raspberrypi.org/downloads">'Raspbian “wheezy”'</a> as the recommended OS.<br />
<br />
But <a href="http://www.oracle.com/technetwork/java/embedded/downloads/javase/index.html">Oracle embedded JVM</a> will not run on this. Whenever you try to run 'java' it will fail with "<b><i>java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory</i></b>".<br />
<br />
This is due to Oracle JVM supporting 'softfloat', where as RP's ARM processor supporting 'hard-float'. This (<a href="http://neophob.com/2012/08/raspberry-pi-enable-the-spi-device/">http://neophob.com/2012/08/raspberry-pi-enable-the-spi-device/</a>) has a nice explanation on the problem more (Look for '<i>What is this softfloat vs hardfloat thing? When will the Oracle JDK support hardfloat?</i>').<br />
<br />
<b>Solution</b>: Do not install 'Raspbian “wheezy”'. Rather install 'Soft-float Debian “wheezy”'<br />
You can obtain the same from <a href="http://www.raspberrypi.org/downloads">http://www.raspberrypi.org/downloads</a>.<br />
<br />
Once you have 'Soft-float Debian “wheezy”' installed, following instructions @ <a href="http://www.oracle.com/technetwork/articles/java/raspberrypi-1704896.html">http://www.oracle.com/technetwork/articles/java/raspberrypi-1704896.html</a> will see you through the simple process of getting Oracle JVM running. Open JDK is suppose to work with "wheezy". But reportedly slower.<br />
<div>
<br /></div>
</div>
Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com2tag:blogger.com,1999:blog-23219938.post-29228112375031984822012-10-24T03:17:00.000+05:302012-10-24T03:51:35.364+05:30Mutlple user store support for API Manager<div dir="ltr" style="text-align: left;" trbidi="on">
<b id="internal-source-marker_0.03409977024421096" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(and WSO2 Carbon platform in general)..</span><br /><a href="http://blog.facilelogin.com/"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Prabath</span></a><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> just finished implementing $subject & I had to explain the same to a customer. So here's the reply I used. But b4 that, some background on how this becomes useful....</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Background</span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">:</span><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">With the type of deployment supported by API Manager, it's very common to have users coming in from multiple user stores. API Publishers can be internal set of users, where as API Consumers can be external set of users who subscribe to consume the APIs published. Thus, multiple user store support is an important aspect in API Management context.</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">How it will be supported in API Manager 1.2.0,</span></b><br />
<br />
<b id="internal-source-marker_0.03409977024421096" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">1. Multiple user stores are configured @ the Carbon core level (via user-mgt.xml). You just have to define multiple user store definitions.</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">2. This will allow users coming from any user store to be authenticated similar to how it happens for a single user store today.</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">But with multiple user stores, how user account is looked up can take two routes.</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Option 1:</span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">while defining user stores, you specify the domain that corresponds to this user store.</span><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">eg:</span></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZt7RH2HPMbq-dSe4d24dGD5sJPu7WNoycfNRwVhYk4DvK3G3Zx8qT_kq0oWMMZkkSv2q-azbHEDNhWFJm_iCuDA1jzJFMoUfMenkgxS_cfwjKdWaNRsE7xoMyTdlYcQF4FsvpDw/s1600/multiple-userstores.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZt7RH2HPMbq-dSe4d24dGD5sJPu7WNoycfNRwVhYk4DvK3G3Zx8qT_kq0oWMMZkkSv2q-azbHEDNhWFJm_iCuDA1jzJFMoUfMenkgxS_cfwjKdWaNRsE7xoMyTdlYcQF4FsvpDw/s640/multiple-userstores.png" width="640" /></a></div>
<pre class="c" name="code"><b style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">
</span></b></pre>
<b style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b>
<b id="internal-source-marker_0.03409977024421096" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Now, when a user login as 'acme.com/tom', his credentials will only be looked up in the user store that has above property associated.</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Option 2:</span><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">If domain is not specified while login (i.e. providing 'tom’ as user name), user stores will be looked up in the order they are defined in user-mgt.xml. If both user stores have user accounts by the name 'tom' belonging to two users, account from first user store will always be picked up. Only if the authentication fails for user account from first store, credentials will be validated against second store.</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Once an user account gets validated through any of the above options, that user account can create a valid logged in session with Carbon server. So from this point onwards, based on privileges assigned, any of these users can login to 'API Publisher' or 'API Store'.</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">3. Whenever a subscription is made in API Store, we currently store the 'username' who made that subscription. With multiple user stores, the stored username will take the format of 'domain.com/username'.</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">4. When issuing an access token, we already store authorized user against the token issued. This happens for both access token generation scenarios (i.e. from UI - [APPLICATION access token] or using LoginAPI - [APPLICATION_USER access token])</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">So only change that is required here is, storing the user store from which user account came from. By changing stored user account value from 'tom' to 'acme.com/tom', we can achieve this too.</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">This requires you to send in the domain qualified login name when invoking a remote call to get access token. So current request format,</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">grant_type=password&</span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username=tom</span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">&password=tom@123</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">should change to,</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">grant_type=password&</span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">username=acme.com/tom</span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">&password=tom@123</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">5. At the time of loading claims, we also need to pass in this additional domain to retrieve claims. There is a separate method which allows us to pass in the domain and load claims for an user account belonging to that domain.</span><br /><br /><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">6. Right now, claims are cached to optimize performance. The structure of this cache will also change now. The cache key will also have the domain to which user account belongs to (a.k.a which user store)</span></b><b id="internal-source-marker_0.03409977024421096" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b></div>
Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com0tag:blogger.com,1999:blog-23219938.post-57359472565802841622012-08-24T08:36:00.002+05:302012-08-24T08:36:47.212+05:30ESB Performance - it is all about how you get there<div dir="ltr" style="text-align: left;" trbidi="on">
<i><br /></i>
<i>"Performance is a key element for any ESB. If an ESB is not performing,
that is not an ESB to start with, even though performance is not the
only thing about an ESB. So every ESB vender out there makes an effort
to tune the performance. </i><br />
<i><br /></i>
<i>WSO2 is no exception. We were spending many
cycles on performance aspects of our ESB in the past, and we do now, and
we will continue to do so in the future. And if others find issues in
WSO2 ESB (and for that matter, any other WSO2 product), not only our
users, but even our competitors, we will put our heads down and will go
all out and fix them all to make sure those issues are all fixed right
and verified. </i><br />
<i><br /></i>
<i>That is <b>what “open” means to WSO2</b>, we will not bar anyone
from running anything and reporting any issues against us – we will
accept the facts and fix them all. Our bugs trackers are open, so are
the mailing lists – if you see any issues, come tell us, and we will fix
them – we are open source as well as open community and open culture. </i><i>"</i><br />
<i><br /></i>
Extracted from <a href="http://samisa-abeysinghe.blogspot.com/2012/08/esbperformanceorg-facts-or-fiction.html">here</a>.</div>
Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com0tag:blogger.com,1999:blog-23219938.post-86345296333525093722012-08-20T18:31:00.001+05:302012-08-20T18:42:30.897+05:30How to enable Stats publishing in WSO2 API Manager 1.0.0? <div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: inherit;"><span id="internal-source-marker_0.737755822424287" style="font-size: 16px; font-weight: bold; vertical-align: baseline;">Downloads</span><br /><span style="font-size: 16px; vertical-align: baseline;">1. Unzip </span><a href="http://wso2.com/products/api-manager/"><span style="color: #1155cc; font-size: 16px; vertical-align: baseline;">wso2am-1.0.0.zip</span></a><span style="font-size: 16px; vertical-align: baseline;"> & </span><a href="http://people.wso2.com/~hiranya/wso2bam-2.0.0-SNAPSHOT.zip"><span style="color: #1155cc; font-size: 16px; vertical-align: baseline;">wso2bam-2.0.0-SNAPSHOT.zip</span></a><span style="font-size: 16px; vertical-align: baseline;"> . (Follow the link to download the correct version of BAM. GA release of WSO2 BAM 2.0.0 will be available by mid Sep 2012).</span><br /><span style="font-size: 16px; vertical-align: baseline;"></span><br /><span style="font-size: 16px; font-weight: bold; vertical-align: baseline;">Business Activity Monitoring(BAM) Server Setup</span><br /><span style="font-size: 16px; vertical-align: baseline;">2. Change port offset to 1 by editing the repository/conf/carbon.xml</span><br /><span style="font-size: 16px; vertical-align: baseline;">3. Copy the API_Manager_Analytics.tbox inside API_Manager_HOME/statistics to BAM_HOME/repository/deployment/server/bam-toolbox</span><br /><span style="font-size: 16px; vertical-align: baseline;"> (Create the bam-toolbox directory if it already doesn't exist)</span><br /><span style="font-size: 16px; vertical-align: baseline;">4. Start WSO2 BAM server (bin/wso2server.sh[.bat])</span><br /><span style="font-size: 16px; vertical-align: baseline;"></span><br /><span style="font-size: 16px; font-weight: bold; vertical-align: baseline;">API Manager Setup</span><br /><span style="font-size: 16px; vertical-align: baseline;">5. Open up wso2am-1.0.0/repository/conf/api-manager.xml</span><br /><span style="font-size: 16px; vertical-align: baseline;">Navigate to section,</span><br /><span style="font-size: 16px; vertical-align: baseline;"> <apiusagetracking></apiusagetracking></span><br /><span id="internal-source-marker_0.737755822424287" style="font-family: inherit; font-size: 16px; vertical-align: baseline;"> <apiusagetracking></apiusagetracking></span><span id="internal-source-marker_0.737755822424287" style="font-size: 16px; vertical-align: baseline;"> <APIUsageTracking></span><br /><span style="font-size: 16px; vertical-align: baseline;"> <!--</span><br /><span style="font-size: 16px; vertical-align: baseline;"> Enable/Disable the API usage tracker.</span><br /><span style="font-size: 16px; vertical-align: baseline;"> --></span><br /><span style="font-size: 16px; vertical-align: baseline;">Change </span><br /><span style="font-size: 16px; vertical-align: baseline;"> </span></span><span style="font-size: 16px;"><</span><span style="font-family: inherit;"><span style="font-size: 16px; vertical-align: baseline;">Enabled</span></span><span style="font-size: 16px;">></span><span style="font-family: inherit;"><span style="font-size: 16px; vertical-align: baseline;">false</span></span><span style="font-size: 16px;"><</span><span style="font-family: inherit;"><span style="font-size: 16px; vertical-align: baseline;">/Enabled</span></span><span style="font-size: 16px;">></span><br />
<span style="font-family: inherit;"><span style="font-size: 16px; vertical-align: baseline;">to </span><br /><span style="font-size: 16px; vertical-align: baseline;"> </span></span><span style="font-size: 16px;"><</span><span style="font-family: inherit;"><span style="font-size: 16px; vertical-align: baseline;">Enabled</span></span><span style="font-size: 16px;">></span><span style="font-family: inherit;"><span style="font-size: 16px; vertical-align: baseline;">true</span></span><span style="font-size: 16px;"><</span><span style="font-family: inherit;"><span style="font-size: 16px; vertical-align: baseline;">/Enabled</span></span><span style="font-size: 16px;">></span><br />
<span style="font-family: inherit;"><span style="font-size: 16px; vertical-align: baseline;"></span><br /><span style="font-size: 16px; vertical-align: baseline;">In the same section, uncomment following.</span></span><span style="font-size: 16px;"><</span><span style="font-family: inherit;"><span style="font-size: 16px; vertical-align: baseline;">!--DataSourceName</span></span><span style="font-size: 16px;">></span><span style="font-family: inherit;"><span style="font-size: 16px; vertical-align: baseline;">jdbc/WSO2AM_STATS_DB</span></span><span style="font-size: 16px;"><</span><span style="font-family: inherit;"><span style="font-size: 16px; vertical-align: baseline;">/DataSourceName--</span></span><span style="font-size: 16px;">></span><br />
<span style="font-family: Arial; font-size: 16px; vertical-align: baseline;"><br /></span>
<span style="font-family: inherit;"><span style="font-size: 16px; vertical-align: baseline;">6. Open wso2am-1.0.0/repository/conf/datasources/master-datasources.xml</span><br /><span style="font-size: 16px; vertical-align: baseline;">Search for </span><span style="font-size: 16px; font-weight: bold; vertical-align: baseline;"> </span><span style="font-size: 16px; vertical-align: baseline;">& replace it with location where your 'wso2bam-2.0.0-SNAPSHOT' is extracted.</span><br /><span style="font-size: 16px; vertical-align: baseline;">Once done, it should look like following.</span><br /><span style="font-size: 16px; vertical-align: baseline;"></span><br /><span style="font-size: 16px; vertical-align: baseline;"><url>jdbc:h2:</url></span><span style="font-size: 16px; font-weight: bold; vertical-align: baseline;">/Volumes/data/am/bam-setup/1.0.0/wso2bam-2.0.0-SNAPSHOT</span><span style="font-size: 16px; vertical-align: baseline;">/repository/database/APIMGTSTATS_DB;AUTO_SERVER=TRUE</span></span></div>
<br />
<span style="font-size: 16px; vertical-align: baseline;"></span><br />
<span style="font-size: 16px; vertical-align: baseline;"></span><br />
<span style="font-size: 16px; font-weight: bold; vertical-align: baseline;">Verifying Statistics Publishing</span><br />
<span style="font-size: 16px; vertical-align: baseline;">7. Deploy some sample APIs (alternatively, you can deploy three sample services inside wso2am-1.0.0/samples)</span><br />
<span style="font-size: 16px; vertical-align: baseline;"></span><br />
<span style="font-size: 16px; vertical-align: baseline;">8. Invoke the APIs with valid access tokens (eg: read wso2am-1.0.0/samples/YoutubeFeeds/README.txt)</span><br />
<span style="font-size: 16px; vertical-align: baseline;"></span><br />
<span style="font-size: 16px; vertical-align: baseline;">9.
Check Provider's console for statistics after several seconds.
(Statistics data is not published in realtime from API Manager to BAM.
Thus it might table few minutes for invocation counts to be accurately
appearing on graphs)</span><br />
<div>
<br /></div>
<div>
<b>A Screenshot Showing Statistics</b></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhUQsUMasdirZW_dqjwFtJwTb2Rhg6te6PB3toDBVKsWCUHMHfcuSEwnXUtpNb_l5jNIV18RA-qPqPRtbp02GupUjDqiqwlw0Wlxt3jEOXXMBBTqTg-gEEsc1gB4KcjyBnUid3CQ/s1600/final.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="518" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhUQsUMasdirZW_dqjwFtJwTb2Rhg6te6PB3toDBVKsWCUHMHfcuSEwnXUtpNb_l5jNIV18RA-qPqPRtbp02GupUjDqiqwlw0Wlxt3jEOXXMBBTqTg-gEEsc1gB4KcjyBnUid3CQ/s640/final.png" width="640" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<br />
<br /></div>
Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com3tag:blogger.com,1999:blog-23219938.post-33736197532446604992012-08-17T11:51:00.001+05:302012-08-17T12:07:03.705+05:30Using JWT to send application user details to API implementation<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<b><span style="font-size: large;">
What is JWT?</span></b></div>
Json Web Token -JWT- (pronounced "jot") is a means of representing claims to be transferred between two paries. (for more detailed explanation on JWT refer <a href="http://openid.net/specs/draft-jones-json-web-token-07.html#anchor3" target="_blank">[1]</a>)<br />
<br />
<div style="text-align: left;">
<b><span style="font-size: large;">
JWT in WSO2 API Manager </span></b></div>
In <a href="http://wso2.com/products/api-manager/" target="_blank">WSO2 API Manager</a>, we use a JWT to pass end user credentials (who's action invoked the API) to the backend. (Thus actual invoker of the API & API implementation becoming the two parties involved). API Implementation can use values contained in this token (explained bellow) for,<br />
<ul style="text-align: left;">
<li>Logging</li>
<li>Content Filtering</li>
<li>Additional Authentication/Authorization</li>
</ul>
<div>
at the backend. It's Base64 encoded and sent in a HTTP header variable called 'X-JWT-Assertion' to the API implementation.<br />
<br /></div>
<div style="text-align: left;">
<b><span style="font-size: large;">
Token Structure</span></b></div>
Structure of this token is as follows.<br />
<br />
<span class="sBrace structure-1" id="s-1" style="border: 0px; color: #666666; cursor: pointer; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">{</span><br />
<span style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;"> </span><span class="sObjectK" id="s-2" style="border: 0px; color: #36393b; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font-weight: bold; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"typ"</span><span class="sColon" id="s-3" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">:</span><span class="sObjectV" id="s-4" style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"JWT"</span><span class="sComma" id="s-5" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">,</span><br />
<span style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;"> </span><span class="sObjectK" id="s-6" style="border: 0px; color: #36393b; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font-weight: bold; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"alg"</span><span class="sColon" id="s-7" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">:</span><span class="sObjectV" id="s-8" style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"NONE"</span><br />
<span class="sBrace structure-1" id="s-9" style="border: 0px; color: #666666; cursor: pointer; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">}</span><span class="sBrace structure-1" id="s-10" style="border: 0px; color: #666666; cursor: pointer; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;"><span class="error" style="background-color: #c04830; border: 0px; color: white; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">{</span></span><br />
<span style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;"> </span><span class="sObjectK" id="s-11" style="border: 0px; color: #36393b; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font-weight: bold; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"iss"</span><span class="sColon" id="s-12" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">:</span><span class="sObjectV" id="s-13" style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"<a class="vglnk" href="http://wso2.org/products/am" rel="nofollow" style="border: 0px; color: #426a70; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;" title="Link added by VigLink"><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">wso2</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">org</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">products</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">am</span></a>"</span><span class="sComma" id="s-14" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">,</span><br />
<span style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;"> </span><span class="sObjectK" id="s-15" style="border: 0px; color: #36393b; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font-weight: bold; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"exp"</span><span class="sColon" id="s-16" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">:</span><span class="sObjectV" id="s-17" style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">1345183492181</span><span class="sComma" id="s-18" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">,</span><br />
<span style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;"> </span><span class="sObjectK" id="s-19" style="border: 0px; color: #36393b; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font-weight: bold; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"<a class="vglnk" href="http://wso2.org/claims/subscriber" rel="nofollow" style="border: 0px; color: #426a70; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;" title="Link added by VigLink"><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">http</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">://</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">wso2</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">org</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">claims</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">subscriber</span></a>"</span><span class="sColon" id="s-20" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">:</span><span class="sObjectV" id="s-21" style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"admin"</span><span class="sComma" id="s-22" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">,</span><br />
<span style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;"> </span><span class="sObjectK" id="s-23" style="border: 0px; color: #36393b; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font-weight: bold; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"<a class="vglnk" href="http://wso2.org/claims/applicationname" rel="nofollow" style="border: 0px; color: #426a70; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;" title="Link added by VigLink"><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">http</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">://</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">wso2</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">org</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">claims</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">applicationname</span></a>"</span><span class="sColon" id="s-24" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">:</span><span class="sObjectV" id="s-25" style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"app2"</span><span class="sComma" id="s-26" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">,</span><br />
<span style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;"> </span><span class="sObjectK" id="s-27" style="border: 0px; color: #36393b; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font-weight: bold; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"<a class="vglnk" href="http://wso2.org/claims/apicontext" rel="nofollow" style="border: 0px; color: #426a70; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;" title="Link added by VigLink"><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">http</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">://</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">wso2</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">org</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">claims</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">apicontext</span></a>"</span><span class="sColon" id="s-28" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">:</span><span class="sObjectV" id="s-29" style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"/placeFinder"</span><span class="sComma" id="s-30" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">,</span><br />
<span style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;"> </span><span class="sObjectK" id="s-31" style="border: 0px; color: #36393b; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font-weight: bold; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"<a class="vglnk" href="http://wso2.org/claims/version" rel="nofollow" style="border: 0px; color: #426a70; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;" title="Link added by VigLink"><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">http</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">://</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">wso2</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">org</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">claims</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">version</span></a>"</span><span class="sColon" id="s-32" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">:</span><span class="sObjectV" id="s-33" style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"1.0.0"</span><span class="sComma" id="s-34" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">,</span><br />
<span style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;"> </span><span class="sObjectK" id="s-35" style="border: 0px; color: #36393b; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font-weight: bold; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"<a class="vglnk" href="http://wso2.org/claims/tier" rel="nofollow" style="border: 0px; color: #426a70; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;" title="Link added by VigLink"><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">http</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">://</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">wso2</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">org</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">claims</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">tier</span></a>"</span><span class="sColon" id="s-36" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">:</span><span class="sObjectV" id="s-37" style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"Silver"</span><span class="sComma" id="s-38" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">,</span><br />
<span style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;"> </span><span class="sObjectK" id="s-39" style="border: 0px; color: #36393b; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font-weight: bold; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"<a class="vglnk" href="http://wso2.org/claims/enduser" rel="nofollow" style="border: 0px; color: #426a70; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;" title="Link added by VigLink"><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">http</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">://</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">wso2</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">org</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">claims</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span style="border: 0px; font-size: 12px; font: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">enduser</span></a>"</span><span class="sColon" id="s-40" style="border: 0px; color: #333333; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">:</span><span class="sObjectV" id="s-41" style="border: 0px; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">"sumedha"</span><br />
<span class="sBrace structure-1" id="s-42" style="border: 0px; color: #666666; cursor: pointer; font-family: 'andale mono', 'lucida console', Courier, 'Courier New', monospace; font: inherit; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">}</span><br />
<br />
As you can see, we pass<br />
- Token expiration time ("exp")<br />
- Subscriber to the API (usually the App Developer) ("http://wso2.org/claims/subscriber")<br />
- Application through which API invocation is done ("http://wso2.org/claims/applicationname")<br />
- Context of the API ("http://wso2.org/claims/apicontext")<br />
- API version ("http://wso2.org/claims/version")<br />
- Tier/price band for the subscription ("http://wso2.org/claims/tier")<br />
- End user of the App who's action invoked the API ("http://wso2.org/claims/enduser")<br />
<br />
Following screenshots give a more practical view of JWT in action with WSO2 API Manager.<br />
<br />
<div style="text-align: left;">
<b><span style="font-size: large;">
Invoking API passing access token using Advance REST Client plugin in Chrome</span></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIUJgLR6QbsOQjADS_Koj5rsH3YCNukPpZiPLX8JkOMqLSuHwUZ10cPQUJouwMArcA3PRhXOoG2gIKujyYB21LphZi5f9EvbxcFjb1hivSs91CSFyW1fVhyphenhyphenFVRL-Ch2zfW6sW7QQ/s1600/invocation-using-advance-REST-client.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIUJgLR6QbsOQjADS_Koj5rsH3YCNukPpZiPLX8JkOMqLSuHwUZ10cPQUJouwMArcA3PRhXOoG2gIKujyYB21LphZi5f9EvbxcFjb1hivSs91CSFyW1fVhyphenhyphenFVRL-Ch2zfW6sW7QQ/s640/invocation-using-advance-REST-client.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span id="goog_1386495181"></span><span id="goog_1386495182"></span><br /></div>
<div style="text-align: left;">
<b><span style="font-size: large;">
JWT containing end user details captured on Tcpmon</span></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVAyznCgcloM9e3HU5Zq5fnlsyNa4kkj3MbdkWHWao3tis9okjnPyRMbFogr2GkjL8PjoS832iOtli2VHFpX_S2l_Xpx-rGuZVqLHLh4YvJUvqRiIPKM8OZrLJtWHV1_Zfe8m2kw/s1600/jwt-captured-on-tcpmon" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVAyznCgcloM9e3HU5Zq5fnlsyNa4kkj3MbdkWHWao3tis9okjnPyRMbFogr2GkjL8PjoS832iOtli2VHFpX_S2l_Xpx-rGuZVqLHLh4YvJUvqRiIPKM8OZrLJtWHV1_Zfe8m2kw/s640/jwt-captured-on-tcpmon" width="640" /></a></div>
<br />
<div style="text-align: left;">
<b><span style="font-size: large;">
Contents of JWT decoded</span> </b>(using <a href="http://www.base64decode.org/">http://www.base64decode.org/</a>)</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj81mUpwrMRrIEpPPiUBL_rfuIdebeMY9b2TzNl8K2-8u3OMsD8W_x0k4HuzZStOwL3X20IC-yZEAfYQLbiEAqXOKZeainYbhDs2d9e-WoYc0wNOBsVSy962MGiVPmAFkk42ijZUA/s1600/base64-decoded.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="552" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj81mUpwrMRrIEpPPiUBL_rfuIdebeMY9b2TzNl8K2-8u3OMsD8W_x0k4HuzZStOwL3X20IC-yZEAfYQLbiEAqXOKZeainYbhDs2d9e-WoYc0wNOBsVSy962MGiVPmAFkk42ijZUA/s640/base64-decoded.png" width="640" /></a></div>
<br />
<i><b>Note</b> : <a href="http://openid.net/specs/draft-jones-json-web-token-07.html" target="_blank">JWT specification</a> requires the token to be signed. As of API Manager 1.0.0, we send this token unsigned. Token signing will be available available from our next release onwards.</i><br />
<div>
<br /></div>
<br /></div>
Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com2tag:blogger.com,1999:blog-23219938.post-33320110308360699782012-08-04T01:01:00.001+05:302012-08-04T01:03:04.484+05:30WSO2 API Manager 1.0.0-GA released !!<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTbPhy3T9Tj8oqANQ6ElOqYh7xnmFvygx7ulYPzC7k-jKaOphqYNVsWOL6bxfBJrJCo-AUTbZtXfXO75soqaTYeHnyqVECKt3yiwpN51VTI0xyQbSa-wbIUiqZaBS05rEi5RjrhQ/s1600/api-linkedin.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="108" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTbPhy3T9Tj8oqANQ6ElOqYh7xnmFvygx7ulYPzC7k-jKaOphqYNVsWOL6bxfBJrJCo-AUTbZtXfXO75soqaTYeHnyqVECKt3yiwpN51VTI0xyQbSa-wbIUiqZaBS05rEi5RjrhQ/s320/api-linkedin.jpg" width="320" /></a></div>
<br />
After several months of hard work, we have released <a href="http://wso2.com/products/api-manager/" target="_blank">WSO2 API Manager </a>1.0.0-GA few minutes ago. WSO2 API Manager is a complete solution for publishing APIs, creating and managing a developer community and routing high volume API traffic. Similar to all our products, API Manager also seamlessly integrates with rest of WSO2 middleware platform. 1.0.0-GA release is also battled hardened with great feedback from our beta customers.<br />
<br />
Work in progress documentation is hosted online @ <a href="http://docs.wso2.org/wiki/display/AM100/WSO2+API+Manager+Documentation">http://docs.wso2.org/wiki/display/AM100/WSO2+API+Manager+Documentation</a>.<br />
API Manager HOWTOs page also (<a href="http://wso2.org/library/knowledge-base/2012/06/wso2-api-manager-howtos">http://wso2.org/library/knowledge-base/2012/06/wso2-api-manager-howtos</a>) aggregates useful set of related URL resources. Complete release note on 1.0.0-GA release is available @ <a href="http://markmail.org/message/siq6jqy6agee3bne">http://markmail.org/message/siq6jqy6agee3bne</a> .<br />
<br />
For those of you in Sri Lanka, <a href="http://techfeast-hiranya.blogspot.com/" target="_blank">Hiranya</a> and myself will be conducting a workshop on API Manager on 8th of August. For more details refer <a href="http://wso2.com/events/workshops/2012-august-colombo-discover-the-wso2-api-manager-practical-workshop">http://wso2.com/events/workshops/2012-august-colombo-discover-the-wso2-api-manager-practical-workshop</a>. </div>Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com0tag:blogger.com,1999:blog-23219938.post-23996611488357302652012-06-19T14:06:00.000+05:302012-06-19T14:10:25.993+05:30Creating Community APIs with WSO2 API Manager<div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="text-align: left;">
Summary</h4>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://wso2.com/products/api-manager">WSO2 API Manager</a> has several built-in features to engage with API user / subscriber community as well as to create a more Web 2.0 friendly API Store experience. We will be discussing some of these features in this article.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h4 style="text-align: left;">
Tagging</h4>
<div class="separator" style="clear: both; text-align: left;">
An API can be given any number of tags through API Provider. Just enter a comma separated list of tags for the 'Tags' field of an API. Tags allow you to group/categorize APIs having similar attributes/behavior/domain. These tags will start appearing on API Store with a clickable link.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4ky5vGX_QwiJRKpRb0N6lMnPhXna8TToZLAkokYOEQ0YDj5aJOEB9JREWSoEpZ_QNNmjzOi1q8O3GmCzUZReJdZaP0onIMukIu21_81DHCuhAbYNu8hrvx6M1fwLrBrH8pgvUOg/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="230" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4ky5vGX_QwiJRKpRb0N6lMnPhXna8TToZLAkokYOEQ0YDj5aJOEB9JREWSoEpZ_QNNmjzOi1q8O3GmCzUZReJdZaP0onIMukIu21_81DHCuhAbYNu8hrvx6M1fwLrBrH8pgvUOg/s320/1.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhApwcpYSemNIxWcLZMYpWMK3NWihzTGc4ZNig-sytGC8c_Q3JypPU2ol4NzQIdWFNPnEv_vUhXGt_ls2LB2LuEp-1kGR5hQH5Xzh2O2YyCAUWrAwHSwbBX5zlr9Prbpb42lWvBCw/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhApwcpYSemNIxWcLZMYpWMK3NWihzTGc4ZNig-sytGC8c_Q3JypPU2ol4NzQIdWFNPnEv_vUhXGt_ls2LB2LuEp-1kGR5hQH5Xzh2O2YyCAUWrAwHSwbBX5zlr9Prbpb42lWvBCw/s320/2.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: white; text-align: left;"><br /></span></div>
<h4 style="text-align: left;">
<span style="background-color: white;">Rating</span></h4>
Subscribers can rate APIs as per their preference. Rates can be used by other potential subscribers to get a feelings of the API. Rating is attached to the particular version of an API.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIx54k1WlgBgI4v6mr3WWAVOyEUjgfNRp7g4BC3KBvR8gCSVrLK1vlKo4xnbOVSjTVkGWTcWREyhYmY_yxy48yU9J-XMeW4mp8vmZWFMyRA3wok9Ul3gtMaORSUuFVRTJ0TbdmlQ/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIx54k1WlgBgI4v6mr3WWAVOyEUjgfNRp7g4BC3KBvR8gCSVrLK1vlKo4xnbOVSjTVkGWTcWREyhYmY_yxy48yU9J-XMeW4mp8vmZWFMyRA3wok9Ul3gtMaORSUuFVRTJ0TbdmlQ/s320/3.png" width="320" /></a></div>
<br />
<h4 style="text-align: left;">
Commenting</h4>
Subscribers can comment on an API creating a community around it. This can be used as a forum for subscribers to discuss common issues/features pertaining to a given API version. Comments will appear sorted by the time it was entered, alongside the author name.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeE3m3MTLsGcnT5nKkvKVP4FTZ3muQHpGeSxl7gKHQd3VKCLNlro7w1G3LUk4L2wrGux__T2UHAH-DQkiu1XPIf3nmYfBRfEtmXCn1wFAx2upegDI2UoB6quLZAfCzNkCnb5LZhw/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeE3m3MTLsGcnT5nKkvKVP4FTZ3muQHpGeSxl7gKHQd3VKCLNlro7w1G3LUk4L2wrGux__T2UHAH-DQkiu1XPIf3nmYfBRfEtmXCn1wFAx2upegDI2UoB6quLZAfCzNkCnb5LZhw/s320/4.png" width="320" /></a></div>
<br />
<h4 style="text-align: left;">
Documentation</h4>
API Store will feature all documentation associated with an API version. Subscriber/user community can browse through the documentation to better understand it's functionality. Documentation is broken down into several defined types such as 'HOWTO, Samples/SDK, Forum links, etc'. If needed, a new type can also be added.<br />
Documentation also helps API publishers to better market their APIs against competition.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKClkPZTLG5dw5EaXM4dK5ZZR2ZbW-iCOud3TNLOu0KqZ2kM_02yjCHyH_iszcooEMZJcKEhgsfiX0uvQHCUmEgXyxbGeQcOHRGMoQK82TDyOMXVTyCBumSQHYhR9briRJYC0new/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKClkPZTLG5dw5EaXM4dK5ZZR2ZbW-iCOud3TNLOu0KqZ2kM_02yjCHyH_iszcooEMZJcKEhgsfiX0uvQHCUmEgXyxbGeQcOHRGMoQK82TDyOMXVTyCBumSQHYhR9briRJYC0new/s320/5.png" width="320" /></a></div>
<br />
All documentation will have an unique url associated to help better SEO support.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRY1pyWLi8njWPhS39kfE1TI9uCI7DxFvGTPbgPwhaU7a48k4RcKpVWzFdlRJhWwczgigliBO7DMdgvwn42MeN47kZHFb_0m73tFu-pWK0Irkng4wcKMNvuAuAtKJ3A51rVVG6Mg/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="155" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRY1pyWLi8njWPhS39kfE1TI9uCI7DxFvGTPbgPwhaU7a48k4RcKpVWzFdlRJhWwczgigliBO7DMdgvwn42MeN47kZHFb_0m73tFu-pWK0Irkng4wcKMNvuAuAtKJ3A51rVVG6Mg/s320/6.png" width="320" /></a></div>
<br />
<h4 style="text-align: left;">
Search</h4>
APIs can be searched. As of now, only search by API name is supported. But this functionality will improve to support different search criterions in future releases.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6lV_0PGgHsPyr7y3s5pmdc7XDJm2bZl9cWVql7ZpP4cHarngIE8-PqqDnRsjsd8rdUGyY-nhtDxrA6flwNT7M2Nv5F-Uq_MmXS_IsS3znshoz24ObAxaCAqnOCgcZXmk7FuuaQw/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6lV_0PGgHsPyr7y3s5pmdc7XDJm2bZl9cWVql7ZpP4cHarngIE8-PqqDnRsjsd8rdUGyY-nhtDxrA6flwNT7M2Nv5F-Uq_MmXS_IsS3znshoz24ObAxaCAqnOCgcZXmk7FuuaQw/s320/7.png" width="320" /></a></div>
<br /></div>Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com1tag:blogger.com,1999:blog-23219938.post-34511921720548129282012-06-19T10:49:00.001+05:302012-06-19T10:49:49.741+05:30Open source API Management : WSO2 API Manager 1.0.0-ALPHA released<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
After several months of hard work, <a href="http://techfeast-hiranya.blogspot.com/">Hiranya Jayathilaka</a> (former <a href="http://wso2.com/products/enterprise-service-bus">WSO2 Enterprise Bus</a> Lead, now leading <a href="http://wso2.com/products/api-manager">WSO2 API Manager</a>) <a href="http://markmail.org/message/b7fhnfrgav3legtq">announced</a> the public release of WSO2 API Manager 1.0.0-ALPHA few hours ago.<br />
<br />
WSO2 API Manager is an <b><i>open source platform for creating, managing, consuming and monitoring APIs</i></b>. <span style="background-color: white;">It employs tried and tested SOA best practices to solve a wide range of </span><b style="background-color: white;"><i>API management challenges such as API provisioning, API governance and API security</i></b><span style="background-color: white;">. </span><br />
<br />
WSO2 API Manager combines some of the most powerful and mature components of the WSO2 Carbon platform to deliver a smooth and<b><i> end-to-end API management experience</i></b> while <b><i>catering to both API publisher and API consumer</i></b> needs.<br />
<br />
Like rest of products in WSO2 Platform, API Manager is also <b><i>released under the Apache Software License 2.0</i></b>.<br />
<br />
Interested in learning what WSO2 API Manager can do for you? Visit <a href="http://wso2.com/products/api-manager">http://wso2.com/products/api-manager</a> .. Download, <a href="http://wso2.org/library/knowledge-base/2012/06/wso2-api-manager-howtos">Read HOWTO page</a> , Play & <a href="https://wso2.org/jira/browse/APISTORE">Report</a> ..<br />
<div>
<br /></div>
</div>Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com0tag:blogger.com,1999:blog-23219938.post-81968392010250805202012-06-19T09:48:00.002+05:302012-06-19T09:51:45.459+05:30How to change API Store theme in WSO2 API Manager?<div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="text-align: left;">
API Store & Theming</h4>
<div>
API Store is the showcase of your published APIs. Thus it's a must to have a user friendly, functional & modern looking theme for it. By default we have shipped two themes for your selection. And we will tell you how to write a new theme to match your taste buds. (Stay tuned... same hands behind current themes and layout - <a href="http://chanaka3d.blogspot.com/">Chanaka Jayasena</a> - is in the process of writing a tutorial explaining how to) .</div>
<div>
<br /></div>
<div>
In the meantime, lets see how we can make use of shipped in themes.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Step 1</b> : Login to API Store</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Step 2</b> : Click on 'Settings' icon on your top right hand corner. All built-in themes we support will be listed ('Fancy', 'Modern'). Default theme is 'Fancy'. </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidXvFg_4uVRl3Nfd8hEKK21oXlpcqn-jh6Co8DtzOPXYuOfU8Nh6-x0dQpzMscrI8nPeqmDcJTbDX2AsJbpaqQ20a8B3eLM2vCTILMTBnagEb5swdytYt9ZXQolh7c-q1wvgadsw/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidXvFg_4uVRl3Nfd8hEKK21oXlpcqn-jh6Co8DtzOPXYuOfU8Nh6-x0dQpzMscrI8nPeqmDcJTbDX2AsJbpaqQ20a8B3eLM2vCTILMTBnagEb5swdytYt9ZXQolh7c-q1wvgadsw/s320/1.png" width="320" /></a></div>
<br />
<b>Step 3</b> : Select 'Modern' theme and you should see the theme changing accordingly.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVSzq1m0cRpjkEGabfSXcstdFKOkIYSNtVp5hWUiduN0MPGEM8tW_5Ul1_KNOMu8DES72o-AqYP7q6Maf_afjmGTQOsgMk8lyGI0vEBez5AYHpyDq7HkQgo0ziP7lhG2GfnktukQ/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="171" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVSzq1m0cRpjkEGabfSXcstdFKOkIYSNtVp5hWUiduN0MPGEM8tW_5Ul1_KNOMu8DES72o-AqYP7q6Maf_afjmGTQOsgMk8lyGI0vEBez5AYHpyDq7HkQgo0ziP7lhG2GfnktukQ/s320/2.png" width="320" /></a></div>
<br /></div>Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com0tag:blogger.com,1999:blog-23219938.post-37270150668979024952012-06-19T08:04:00.000+05:302012-06-19T08:06:50.077+05:30Guide to advance configuration options in WSO2 API Manager<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white;">Configurations specific to </span><a href="http://wso2.com/products/api-manager" style="background-color: white;">WSO2 API Manager</a><span style="background-color: white;"> are kept inside <b><i>wso2am-[VERSION]/ repository /conf/api-manager.xml</i></b>.</span><br />
<span style="background-color: white;"><br /></span><br />
<span style="background-color: white;">By default, WSO2 API Manager ships with <b><i>several built-in components</i></b>. When you boot up the server, all these components get started up with in single JVM node.</span><br />
<span style="background-color: white;"><br /></span><br />
<span style="background-color: white;"><b><i>For scalability reasons</i></b>, you have the option of starting these components (<b><i>API Store, API Provider, API Key Manager, API Gateway</i></b>) as separate JVM instances. When doing so, you need to update corresponding configuration snippets in </span><span style="background-color: white;">wso2am-[VERSION]</span><version style="background-color: white;">/repository/conf/api-manager.xml updated to point to respective remote JVM instance locations.</version><br />
<span style="background-color: white;">Table bellow summarizes some important aspects that can be controlled through api-manager.xml.</span><br />
<div>
<br />
<table border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr><td><b>Aspect</b></td><td><b>Description</b></td><td><b>Config Element</b></td></tr>
<tr><td>API Manager Database</td><td>As of 1.0.0-Alpha we use a relational database to store runtime data like subscriptions, applications, keys.<br />
<br />
<br />
When API provider, API store and API key manager are deployed separately, each of them should have <span style="background-color: white; text-align: left;">separate database configurations pointing to the same physical database.</span></td><td>Database</td></tr>
<tr><td>API Store | API Provider Authentication/Authorization</td><td>Authentication and Authorization server for API Store and API Provider web applications. Behavior / capabilities of these two applications will change based on authorization levels.</td><td>AuthManager</td></tr>
<tr><td>API Gateway</td><td>When an API is invoked, it will go through API Gateway component. WSO2 Enterprise Service Bus is acting as the API Gateway</td><td>APIGateway</td></tr>
<tr><td>API Statistics</td><td>All API invocation can be logged into a WSO2 Business Activity Monitor (BAM). This setting enables Statistic publishing. You need to provide the URL of external BAM server.</td><td>APIUsageTracking</td></tr>
<tr><td>API Key Management</td><td>Configures the location of WSO2 Identity Server to be used for API Key validation and management</td><td>APIKeyManager</td></tr>
<tr><td>TierManagement</td><td>To be used to control tier behaviors in API Manager</td><td>TierManagement</td></tr>
<tr><td>Self Sign Up to API Store</td><td>If configured, Subscribers will have the option of self sign up to API Store.</td><td>SelfSignUp</td></tr>
</tbody></table>
</div>
</div>Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com1tag:blogger.com,1999:blog-23219938.post-61944646648902237122012-06-19T07:36:00.000+05:302012-06-19T07:36:03.543+05:30How to add documentation to an API on WSO2 API Manager?<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: left;">
<b>Step 1 :</b> Select API you want to add documentation in API Provider's listing</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlApH_RNDBrPgrYwh2LTkP-f-Yf5JU5E8TOjGuoWD1zmjbBr2xdTMR_bu1S8gc70fJauo-Ub_-1VqSIpORh3pxsjnDSC2U0eg0z1W4QSggENH6CQhHJLd_cIuopT7YT6CLv8rerQ/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlApH_RNDBrPgrYwh2LTkP-f-Yf5JU5E8TOjGuoWD1zmjbBr2xdTMR_bu1S8gc70fJauo-Ub_-1VqSIpORh3pxsjnDSC2U0eg0z1W4QSggENH6CQhHJLd_cIuopT7YT6CLv8rerQ/s400/1.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: left;">
<b>Step 2 :</b> Click on 'Docs' tab</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLphEcY1tL9bV1QV8dmu-tso9UsZa1O9pJOXabIQJPnsHvziutFyLJ_f-OAe_5ztFWhegw7bQC0fatM13jM4OQC8grxAXDIZwGM4GccAmHFYMOfSMuIPxBAxRfB8VmB9QozLIOJg/s1600/2.png" imageanchor="1" style="background-color: white; margin-left: 1em; margin-right: 1em;"><img border="0" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLphEcY1tL9bV1QV8dmu-tso9UsZa1O9pJOXabIQJPnsHvziutFyLJ_f-OAe_5ztFWhegw7bQC0fatM13jM4OQC8grxAXDIZwGM4GccAmHFYMOfSMuIPxBAxRfB8VmB9QozLIOJg/s400/2.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Step 3 :</b> Then on 'Add New Document' and your screen should look like following.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv1ZUPeSF6kabGiM_choDDtEdb73z4kDcenUzCpkqcCOR3J_t-oQ3ZpnVRLLoWY8nUXJgZowgZOs6aCCwc07xMswHctm2ifAI8LDYGSxvnlXn-oSAkRrZvnFgpI2QLmnfhwc1QzQ/s1600/3.png" imageanchor="1" style="background-color: white; margin-left: 1em; margin-right: 1em;"><img border="0" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv1ZUPeSF6kabGiM_choDDtEdb73z4kDcenUzCpkqcCOR3J_t-oQ3ZpnVRLLoWY8nUXJgZowgZOs6aCCwc07xMswHctm2ifAI8LDYGSxvnlXn-oSAkRrZvnFgpI2QLmnfhwc1QzQ/s400/3.png" width="400" /></a></div>
<div style="text-align: left;">
<b><br /></b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: left;">
<b>Step 4 :</b> Fill the screen with content. This will create the skeleton documentation under a selected 'Type'. We will be filling with content in next step.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxZeQQEi_v4tkg5Q9ayqkSn8MrIZKVD0uX32SeMNrL7CR_OIQfVggOvHQV_DwsdzQbEqiUwHycsvxswMeDo6T1Mg8C8Hq894oHLbBvfdZATPRbTGCY0exCBFcIE_LBjlq5BKp30g/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxZeQQEi_v4tkg5Q9ayqkSn8MrIZKVD0uX32SeMNrL7CR_OIQfVggOvHQV_DwsdzQbEqiUwHycsvxswMeDo6T1Mg8C8Hq894oHLbBvfdZATPRbTGCY0exCBFcIE_LBjlq5BKp30g/s400/4.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: left;">
<b>Step 5 :</b> Skeleton has been created. Now click on 'Edit Content' link to add content.</div>
<div style="margin-left: 1em; margin-right: 1em; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYjsKPvdAiYnD9JZ9_YpMGNoOzd9wa0KpUGkV43ZdQGrJtIOI31eFtumMP2x8sWh2LSm42XY-DTNj_Abyfzaw0lYIvwKFE8Mv4Oe_XcFsg1h0O5JGH3BfFJLbzDiuHs9TJLc2gUA/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="190" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYjsKPvdAiYnD9JZ9_YpMGNoOzd9wa0KpUGkV43ZdQGrJtIOI31eFtumMP2x8sWh2LSm42XY-DTNj_Abyfzaw0lYIvwKFE8Mv4Oe_XcFsg1h0O5JGH3BfFJLbzDiuHs9TJLc2gUA/s400/5.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: left;">
<b>Step 6 :</b> You will be taken to a WYSIWYG editor like following.</div>
<div style="margin-left: 1em; margin-right: 1em; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEjcqaXyEjXtmX1FT32BYJYCeWtm0jwVRgpSizsB8W0BRc3xFy3Jc5SR90jS19TPsAJXhtiuzPbdOaOMwLP1xmZzKz19_yROV6K7CH6gzrSb2czUHgPSFPo6CfXNdUnHxNqdtEnA/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEjcqaXyEjXtmX1FT32BYJYCeWtm0jwVRgpSizsB8W0BRc3xFy3Jc5SR90jS19TPsAJXhtiuzPbdOaOMwLP1xmZzKz19_yROV6K7CH6gzrSb2czUHgPSFPo6CfXNdUnHxNqdtEnA/s400/6.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: left;">
<b>Step 7 :</b> Add your content in the editor and save it.</div>
<div style="margin-left: 1em; margin-right: 1em; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJJBecL2eahjo4MBqB2GpT1mF8u_mWCAu6HPpu-TdUOOYgtsFDDTT0XYifXleEt00PREPT03eAennFT9ZNmqIqBsT-15IcOXGCy15I9yGeYOa-T3aKtBQUZQh_p06jH1w8IOGR9w/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJJBecL2eahjo4MBqB2GpT1mF8u_mWCAu6HPpu-TdUOOYgtsFDDTT0XYifXleEt00PREPT03eAennFT9ZNmqIqBsT-15IcOXGCy15I9yGeYOa-T3aKtBQUZQh_p06jH1w8IOGR9w/s400/7.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: left;">
<b>Step 8 :</b> Now go to API Store and select the version of the API to which you added documentation. Click on the API and go to the details page.</div>
<div style="margin-left: 1em; margin-right: 1em; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6tr4Ox2Fy7sIn-19sGZV1dVW_uxeRlhocxKy9LcIf4wRfyeCSd954GE3Glm1arvnJqKXTyOxNr-oBBOAf4Xx1yqTcNwHJR216gLPfbGroDu8KULkXak4q7gQ89MME7YNBKqScCA/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="253" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6tr4Ox2Fy7sIn-19sGZV1dVW_uxeRlhocxKy9LcIf4wRfyeCSd954GE3Glm1arvnJqKXTyOxNr-oBBOAf4Xx1yqTcNwHJR216gLPfbGroDu8KULkXak4q7gQ89MME7YNBKqScCA/s400/8.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: left;">
<b>Step 9 :</b> In the API detail page, click on 'Documentation' tab and then on 'How To' link. You will see a link to the documentation we added via API Provider.</div>
<div style="margin-left: 1em; margin-right: 1em; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggjRJnGBx5ZI0mRnotns72YEupzZVJCDJTP5yfjZZ-Rh3nHB7j9DR4kv_mivuqLErp9BzZNH6mwaUXid09wnj-AIcri7XWzgxgscrxqf0-X4NvUm28t7fsGRB1-qJ35QPGZchSZw/s1600/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggjRJnGBx5ZI0mRnotns72YEupzZVJCDJTP5yfjZZ-Rh3nHB7j9DR4kv_mivuqLErp9BzZNH6mwaUXid09wnj-AIcri7XWzgxgscrxqf0-X4NvUm28t7fsGRB1-qJ35QPGZchSZw/s400/9.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Step 10 : </b>Click on the link and documentation you added before will open up in a new browser tab in readonly mode.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv9awdCzv3_y5EVZb1YViToWEKeQKeYAbXRIC0_DJkb103GZQNKbBQVIsRQHjG8IOl1HwW-z59_AcM-8_w2Pt8XETIQ4GS1BRteHavXowbh9GRsj4YfYEeUfx8ujcS3ZxQqQm8lw/s1600/10.png" imageanchor="1" style="background-color: white; margin-left: 1em; margin-right: 1em;"><img border="0" height="215" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv9awdCzv3_y5EVZb1YViToWEKeQKeYAbXRIC0_DJkb103GZQNKbBQVIsRQHjG8IOl1HwW-z59_AcM-8_w2Pt8XETIQ4GS1BRteHavXowbh9GRsj4YfYEeUfx8ujcS3ZxQqQm8lw/s400/10.png" width="400" /></a></div>
</div>Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com1tag:blogger.com,1999:blog-23219938.post-37650138392616142992012-06-19T00:54:00.004+05:302012-06-19T00:55:15.503+05:30How to subscribe to an API in WSO2 API Manager?<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: left;">
<b>Step 1</b> : Click on 'Sign-up' link and create yourself a subscriber account. You will be automatically added to a pre-defined role called 'subscriber'</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiau5Ngxte396KbsspZMas8oNg1Pcxm8pgDcRsuV5TJ-8jz9lXy5Vb8pEpeq5EqzHbLajcqd4c0ec9nv22wMlSTAo7zWg4nQwPT8U4uXtbATxqfvPkcwXfJWUfl-Ye3bFFS0EPFKw/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiau5Ngxte396KbsspZMas8oNg1Pcxm8pgDcRsuV5TJ-8jz9lXy5Vb8pEpeq5EqzHbLajcqd4c0ec9nv22wMlSTAo7zWg4nQwPT8U4uXtbATxqfvPkcwXfJWUfl-Ye3bFFS0EPFKw/s400/1.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Step 2</b> : Login using newly created login.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8NQ1jNmuLwJknJaKXvSyYvHzWXIlx8f_QFyVcHTl5fkzvszsswK9edbHbGmY5qwmYq0613jWvjTA5-vzt5mviGq4xVCnI-8nNlDRHE4diw5vJUHcmiNuJX_2q5VCgw7ifa7EbAQ/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="241" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8NQ1jNmuLwJknJaKXvSyYvHzWXIlx8f_QFyVcHTl5fkzvszsswK9edbHbGmY5qwmYq0613jWvjTA5-vzt5mviGq4xVCnI-8nNlDRHE4diw5vJUHcmiNuJX_2q5VCgw7ifa7EbAQ/s400/2.png" width="400" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<b>Step 3</b> : You can navigate through the published APIs using 'APIs' link. (You need not login to perform this action).</div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidUGXxwkM7WIz3VZwfWBF5gytRpHfFBnbVHw862NmFoKiUrrmW-ecuvs7GtjS-E9VHXmHXIk9v6f8t7oFeq5NsBCF0EUh3njcH1AI890LYqDkp5PulvFI2vzERLVZx3pNQlP2qsA/s1600/3.png" imageanchor="1" style="background-color: white; margin-left: 1em; margin-right: 1em;"><img border="0" height="253" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidUGXxwkM7WIz3VZwfWBF5gytRpHfFBnbVHw862NmFoKiUrrmW-ecuvs7GtjS-E9VHXmHXIk9v6f8t7oFeq5NsBCF0EUh3njcH1AI890LYqDkp5PulvFI2vzERLVZx3pNQlP2qsA/s400/3.png" width="400" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<b>Step 4</b> : Subscriptions are done through 'Applications'. You need to create an application in order to subscribe to an API. By default, we are shipping an application called 'DefaultApplication'. <span style="background-color: white;">(Expect more on 'application' concept later..)</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX7a02-BjdtZ3ztEL28w2i-z0y3_LzAQEmcQNw7wSTOk_MtzbSOSQFskxfERlTqjPhaMwLF8AOe9Us6v8Fg_YtipRBW5UcDQzzOrDzBZQvQ9_oh70HZBZrcT-roTPF5FO03XqV9A/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="243" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX7a02-BjdtZ3ztEL28w2i-z0y3_LzAQEmcQNw7wSTOk_MtzbSOSQFskxfERlTqjPhaMwLF8AOe9Us6v8Fg_YtipRBW5UcDQzzOrDzBZQvQ9_oh70HZBZrcT-roTPF5FO03XqV9A/s400/4.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Step 5</b> : Enter a new application name and hit 'Add'. Your new application should appear in the listing.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBPDipayzHGvJ4fMTFPNUcIvBjV7SUKH63XHILnZf8VrmZA2dOUqdDYJWQzk1dmIcGZz3OlT49itUNHkAaVERnVsZ4ndTeze73odKf4s1iYmizDKUJVLTGdS2bA9D-PcO7nuxSlw/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBPDipayzHGvJ4fMTFPNUcIvBjV7SUKH63XHILnZf8VrmZA2dOUqdDYJWQzk1dmIcGZz3OlT49itUNHkAaVERnVsZ4ndTeze73odKf4s1iYmizDKUJVLTGdS2bA9D-PcO7nuxSlw/s400/5.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNiv-jakxJ8yQGjj0CxODhO8IfegVIASw23wo8mXMyNl61ngg_EhP4bRF3GtnXuL29gE1wfdRQ-w4Md5ETRA5uPmz2fk_Fuuj1zHQRXUiwcUNtGOdomGvJyFcDuhZdjDrtFFJhQ/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNiv-jakxJ8yQGjj0CxODhO8IfegVIASw23wo8mXMyNl61ngg_EhP4bRF3GtnXuL29gE1wfdRQ-w4Md5ETRA5uPmz2fk_Fuuj1zHQRXUiwcUNtGOdomGvJyFcDuhZdjDrtFFJhQ/s400/6.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Step 6</b> : Select an API and navigate to it's detail page. Select the newly created application and an usage Tier. Hit 'Subscribe' button.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjabDORwgj3OsTPrAiT9rMthHRe_DLrgJgMkMU3UAx9vMoOC1xYxMnXmYx1VbPE_qqZod4lKIgwkAK1__IRdbcjq6LUuRh7P_N6u8PWgXxjBbcjnyCgdOcE6u8t93kFmWETeBltQw/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="255" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjabDORwgj3OsTPrAiT9rMthHRe_DLrgJgMkMU3UAx9vMoOC1xYxMnXmYx1VbPE_qqZod4lKIgwkAK1__IRdbcjq6LUuRh7P_N6u8PWgXxjBbcjnyCgdOcE6u8t93kFmWETeBltQw/s400/7.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Step 7 </b>: Choose to go to 'My Subscriptions'</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizGdbhNdyCuJD4lx9AU8w4LwwP8UTHdF6-ZKM_wbdSctehs1TlFnuTDMH0pOXq312NF1dvXH_JlNvx5pRKaySe98ODdnaoOTavxybqFZpONg198i9yNIWBpsn_NXzKCrOfEzIlWg/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="255" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizGdbhNdyCuJD4lx9AU8w4LwwP8UTHdF6-ZKM_wbdSctehs1TlFnuTDMH0pOXq312NF1dvXH_JlNvx5pRKaySe98ODdnaoOTavxybqFZpONg198i9yNIWBpsn_NXzKCrOfEzIlWg/s400/8.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Step 8</b> : This page lists all your API subscriptions under respective applications. </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis7_vy-JQt2C2kiz6MMZ23DxeHceO42ZTUckSD6TwExz62ir8PEQVJA_dx2tLch2JPG2nfyU-dZ6lP3iyOh4muPo_hlt6DttLYsd66b0omkg96pGFccgf8eHeDpA6Azyn94vAT0A/s1600/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="243" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis7_vy-JQt2C2kiz6MMZ23DxeHceO42ZTUckSD6TwExz62ir8PEQVJA_dx2tLch2JPG2nfyU-dZ6lP3iyOh4muPo_hlt6DttLYsd66b0omkg96pGFccgf8eHeDpA6Azyn94vAT0A/s400/9.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Step 9</b> : In order to invoke an API, you need to have an key. Click on 'Generate' link to generate a key & 'Show Key' link to display it. (Expect more on 'key' later...)</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmBOjaTUAkidoAaHSgYwEyh5y8siEl0puJI3qTdIgs-SLwDpDxgo0Aa2RYQBgJ0FvzY6LicY3xeY88hkt2mMddao0mtl5ASuG2pcyYTyCQQnRl7YUFdcA34Dr_7XFBrUYInne3ng/s1600/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmBOjaTUAkidoAaHSgYwEyh5y8siEl0puJI3qTdIgs-SLwDpDxgo0Aa2RYQBgJ0FvzY6LicY3xeY88hkt2mMddao0mtl5ASuG2pcyYTyCQQnRl7YUFdcA34Dr_7XFBrUYInne3ng/s400/10.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: left;">
<b>Step 10</b> : For testing purposes, you also can create a sandbox key using the same approach mentioned in step 9. (Expect more on sandbox key later....)</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbijRw0HS2P9KHeVe29ZXaJV8CDeH9JFdqdt4u3cmmnFtqh3yJA1rSKxceKLzz607k1PQhDONMsASU2kBBd4cdVUgQbzea8feR9Tqny3Ku2yfAm4KiDTZHMOZ33KLJ5G9UrmnUzA/s1600/11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbijRw0HS2P9KHeVe29ZXaJV8CDeH9JFdqdt4u3cmmnFtqh3yJA1rSKxceKLzz607k1PQhDONMsASU2kBBd4cdVUgQbzea8feR9Tqny3Ku2yfAm4KiDTZHMOZ33KLJ5G9UrmnUzA/s400/11.png" width="400" /></a></div>
</div>Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com3tag:blogger.com,1999:blog-23219938.post-35397608380560970762012-06-18T23:18:00.003+05:302012-06-18T23:19:38.451+05:30How to version APIs in WSO2 API Manager?<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: left;">
<b>Step 1</b> : Login as API Publisher & navigate to API Browse page.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_ySiQ7yCIZDDHUE64UpcTx5yhfXCqCsQqCvI5LQjP4473NGw071xBV-7gJTv9jHv1bvbbZv-9JwYnnF2-YAzO993eGT_K36qgcVGayXbJflDVr9-0JDbqDFJZRHrsS9kMh_pN6A/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="186" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_ySiQ7yCIZDDHUE64UpcTx5yhfXCqCsQqCvI5LQjP4473NGw071xBV-7gJTv9jHv1bvbbZv-9JwYnnF2-YAzO993eGT_K36qgcVGayXbJflDVr9-0JDbqDFJZRHrsS9kMh_pN6A/s400/1.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<b>Step 2</b> : Select API you need to version & click on the icon to go to detail page. Once in API Detail page, click on 'Copy' button @ the bottom.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQlcedaEyxV5HNbj8sKk4flZ26UYXXQBLCxeulEJ7G3bq6gz8rSccccTTLUJ2bk4lCddHV58ILVGwRWDe_Vut6htpS9PAJjkNbLaw3dDMaQmLI-snzj586xeaTT1sPO2MLOHg2sQ/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQlcedaEyxV5HNbj8sKk4flZ26UYXXQBLCxeulEJ7G3bq6gz8rSccccTTLUJ2bk4lCddHV58ILVGwRWDe_Vut6htpS9PAJjkNbLaw3dDMaQmLI-snzj586xeaTT1sPO2MLOHg2sQ/s400/2.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<b>Step 3</b> : Enter the new version on the text box & click 'Done' button. This will create a new version of the select API & mark it with 'CREATED' stage.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE_-4n1guNNdiwLHpqb9UU63AQg0x_B-3H-E6DzL0NQJVMXZSVOtcDWjeFXCX5nXL6_PH9jTQOTd1n-oWnFQOJBQeEU1XpRIRIfZwIccUmHmwS2CX45KhzlxZ3kkS28gg6QnG8LQ/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE_-4n1guNNdiwLHpqb9UU63AQg0x_B-3H-E6DzL0NQJVMXZSVOtcDWjeFXCX5nXL6_PH9jTQOTd1n-oWnFQOJBQeEU1XpRIRIfZwIccUmHmwS2CX45KhzlxZ3kkS28gg6QnG8LQ/s400/3.png" width="400" /></a></div>
<br />
<b>Step 4</b> : If you go to API Browse page now, you will see the new version of the API alongside the older version. Take a note of 'CREATED' status as well.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTUEv640aMlGP66LxUPwKvhZPYdxaaH2IWQ49_xfs91Xcb4aSTJhCfUTCpUp8naiIdgam8mo8OQGH5d4mOpfeB59gLnCb4tLxVMkwRKhtQ9WFwxTQPfqrUjOH3ifOnSaQhptShMw/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTUEv640aMlGP66LxUPwKvhZPYdxaaH2IWQ49_xfs91Xcb4aSTJhCfUTCpUp8naiIdgam8mo8OQGH5d4mOpfeB59gLnCb4tLxVMkwRKhtQ9WFwxTQPfqrUjOH3ifOnSaQhptShMw/s400/4.png" width="400" /></a></div>
<br />
<b>Step 5</b> : Click on the new API version and go to it's details page.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM6wG5NBF1jITI1ii0oRg18v4bQM34DfGXyNHcmJ2qIsOb0QCtGpIxMH6O0uTwr-saOR0WTWWoc1ovv4AbmdJ0LqdBbv-AeZyfQvHhqDYjIx_dlCwb1hXqpMqPxG6xmFh2rxtg9w/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM6wG5NBF1jITI1ii0oRg18v4bQM34DfGXyNHcmJ2qIsOb0QCtGpIxMH6O0uTwr-saOR0WTWWoc1ovv4AbmdJ0LqdBbv-AeZyfQvHhqDYjIx_dlCwb1hXqpMqPxG6xmFh2rxtg9w/s400/5.png" width="400" /></a></div>
<br />
<b>Step 6</b> : Change the status to 'PUBLISHED'. When this status is selected, you will see few check list items appearing bellow. Meaning of these check list items are as follows:<br />
<br />
<ul style="text-align: left;">
<li><span style="background-color: white;">'<b>Push To Gateway</b>' - Create an entry in API Gateway component for routing API traffic to it's configured endpoint.</span></li>
<li><span style="background-color: white;">'<b>Deprecate Old Versions</b>' - Older versions of the API should be disabled.</span></li>
<li><span style="background-color: white;">'<b>Require Re-Subscription</b>' - If ticked, subscriptions to older versions of the API will not work with this version. A new subscription should be made.</span></li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_dFtbvxzml02arg62Xotjp9A20bPKRnRAB9Wut4B6pX6gA2SdtdEo15QBZugrLNaxAk8InT3X0k7z1scogBrfhzlV9LAHMMcmFwHSSlWahwdoIqlzC7tD2DM4rfZ7LKvg1fgZYg/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_dFtbvxzml02arg62Xotjp9A20bPKRnRAB9Wut4B6pX6gA2SdtdEo15QBZugrLNaxAk8InT3X0k7z1scogBrfhzlV9LAHMMcmFwHSSlWahwdoIqlzC7tD2DM4rfZ7LKvg1fgZYg/s400/6.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<b>Step 7</b> : Once API is published, you can see the lifecycle history of it appearing bellow.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZqz8Of6-YiF44WyeLfGnzrwYBZ0WsOCbUyV_cPVafJzQ5z6EG_635urU_zoWabg1GI1AvHsCa-kg3zya-ynoDRof98UNrdS81DiXx5bIh2QVyjBL3xTu_agXFPtmTRiWSanBV7A/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZqz8Of6-YiF44WyeLfGnzrwYBZ0WsOCbUyV_cPVafJzQ5z6EG_635urU_zoWabg1GI1AvHsCa-kg3zya-ynoDRof98UNrdS81DiXx5bIh2QVyjBL3xTu_agXFPtmTRiWSanBV7A/s400/7.png" width="400" /></a></div>
<br /></div>Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com0tag:blogger.com,1999:blog-23219938.post-16672387834184313242012-06-18T22:08:00.003+05:302012-06-18T22:10:50.025+05:30WSO2 API Manager : anatomy of useful URLs - Level 1<div dir="ltr" style="text-align: left;" trbidi="on">
<b style="background-color: white;">API Publisher </b><br />
<ul style="text-align: left;">
<li><span style="background-color: white;">Available @ <a href="https://localhost:9443/apiprovider">https://localhost:9443/apiprovider</a></span></li>
<li><span style="background-color: white;">Purpose : API (publish/manage/statistics)</span></li>
<li><span style="background-color: white;">Powered by WSO2 Jaggery, Governance Registry, Identity Server</span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGbEn7VAyaXSRcUFZl8DBvxQyqjkJHmn2GjySRb8pEAUSHabUWZhs6hAm-KGnop2Dji4m1775OovZbQNYJSqJRL1Z4P9rowXRHqEptPNPW1OOQ2s2iJQ-RWSj98vl6q2Jc22hGlg/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGbEn7VAyaXSRcUFZl8DBvxQyqjkJHmn2GjySRb8pEAUSHabUWZhs6hAm-KGnop2Dji4m1775OovZbQNYJSqJRL1Z4P9rowXRHqEptPNPW1OOQ2s2iJQ-RWSj98vl6q2Jc22hGlg/s320/1.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: left;">
<b>API Store</b></div>
<div style="text-align: left;">
</div>
<ul style="text-align: left;">
<li><span style="background-color: white;">Available @ <a href="https://localhost:9443/apistore">https://localhost:9443/apistore</a></span></li>
<li><span style="background-color: white;">Purpose : Store front for published APIs/subscriptions/Key Management</span></li>
<li><span style="background-color: white;">Powered by WSO2 Jaggery, Governance Registry , Identity Server</span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF3-5al-AhYE4ybWZfF8JxR_s6ZhKEK4lhpPA3qXf3nEPP15fUI71ml71EoEonJnKeWgO2NFDdm0JR-lA9zTWHP8jfSnQJCGTNH3znO1Qdy_Cx2yM_Yu38k4VAQ8Up8ICW1dvkkA/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF3-5al-AhYE4ybWZfF8JxR_s6ZhKEK4lhpPA3qXf3nEPP15fUI71ml71EoEonJnKeWgO2NFDdm0JR-lA9zTWHP8jfSnQJCGTNH3znO1Qdy_Cx2yM_Yu38k4VAQ8Up8ICW1dvkkA/s320/2.png" width="320" /></a></div>
<b style="background-color: white;">API Gateway</b><br />
<ul>
<li><span style="background-color: white;">Available @ <a href="https://localhost:9443/carbon">https://localhost:9443/carbon</a></span></li>
<li><span style="background-color: white;">Purpose : Act as the gateway for API calls</span></li>
<li><span style="background-color: white;">Powered by WSO2 Enterprise Service Bus, Governance Registry, Identity Server</span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0YV2TyAKloQCpanB6TXtg7n-gFi51jTX9ORXe1zUvzU-mKRPREYWYc8oHuM3rWA-p0b6BTg09B8uYoAVrofFVIGgnSox2rv40plkE4TLgrpX-4fufXUuHBg_LBWhawvupj3G3Gw/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0YV2TyAKloQCpanB6TXtg7n-gFi51jTX9ORXe1zUvzU-mKRPREYWYc8oHuM3rWA-p0b6BTg09B8uYoAVrofFVIGgnSox2rv40plkE4TLgrpX-4fufXUuHBg_LBWhawvupj3G3Gw/s320/3.png" width="320" /></a></div>
</div>Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com0tag:blogger.com,1999:blog-23219938.post-19636578901186106782012-06-18T20:20:00.002+05:302012-06-18T22:12:49.528+05:30How to add a new throttling tier to WSO2 API Manager?<div dir="ltr" style="text-align: left;" trbidi="on">
<ul style="text-align: left;">
<li><span style="background-color: white;">Download WSO2 API Manager 1.0.0-ALPHA (<a href="http://dist.wso2.org/products/api-manager/1.0.0-alpha/wso2am-1.0.0-ALPHA.zip">http://dist.wso2.org/products/api-manager/1.0.0-alpha/wso2am-1.0.0-ALPHA.zip</a>)</span></li>
<li><span style="background-color: white;">Start server by running wso2am-1.0.0-ALPHA/bin/wso2server.sh (.bat)</span></li>
<li><span style="background-color: white;">Throttling tiers are configured via WS-Policy complaint configuration file. We are </span><span style="background-color: white;">going to add a new throttling policy by editing this file.</span></li>
<li><span style="background-color: white;">Open following link on your browser</span></li>
</ul>
<span style="background-color: white;"><a href="https://localhost:9443/carbon/resources/resource.jsp?region=region3&item=resource_browser_menu&viewType=std&path=/_system/governance/apimgt/applicationdata/tiers.xml">https://localhost:9443/carbon/resources/resource.jsp?region=region3&item=resource_browser_menu&viewType=std&path=/_system/governance/apimgt/applicationdata/tiers.xml</a></span><br />
<ul style="text-align: left;">
<li><span style="background-color: white;">You will be re-directed to the login page as follows. </span><span style="background-color: white;">Enter 'admin/admin' as the default username/password.</span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij8wkvcVtz3VK3-F1qUVTAO786wBBcqUp1XobM3f_DIShGWRdCSsu-JA5KCSAXk72OXgINPLrTJiv2N6VXYes38fZa_z-a-fl1v8svip10W1u2_F19NOziTPSWaZiQLCPc6Vj0tg/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="106" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij8wkvcVtz3VK3-F1qUVTAO786wBBcqUp1XobM3f_DIShGWRdCSsu-JA5KCSAXk72OXgINPLrTJiv2N6VXYes38fZa_z-a-fl1v8svip10W1u2_F19NOziTPSWaZiQLCPc6Vj0tg/s320/1.png" width="320" /></a></div>
<ul style="text-align: left;">
<li><span style="background-color: white;">Now your screen should look like this.</span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRFWye7KpTZCywS9i7VaJUpJ5_I1iDvqS22HW0pXtV-CZPluyFf2b3t5lB7_7WESxVKEdM6Cpr3PIEnBkqw3i3jFwyNTHsIB5dNzKNfLbUNaHWG6s6dBF8vj-eiQSqdFq4doPiSw/s1600/2.png" imageanchor="1"><img border="0" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRFWye7KpTZCywS9i7VaJUpJ5_I1iDvqS22HW0pXtV-CZPluyFf2b3t5lB7_7WESxVKEdM6Cpr3PIEnBkqw3i3jFwyNTHsIB5dNzKNfLbUNaHWG6s6dBF8vj-eiQSqdFq4doPiSw/s1600/2.png" width="320" /></a></div>
<ul style="text-align: left;">
<li><span style="background-color: white;">Click on 'Edit as text' link and throttling policy should open up as bellow.</span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-yQl07uW5AuuDc4L1a_qoWagluYWzGtH9TkpRQ3eCLOp4399-dyH1qaSyxbr-o0JTURnVewS3NNJnYwxrsDQVHgoudKx1Q3EJKXdF2g_N1rWgXVgWqd37GnZgMmT4ejx1Smh-3A/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-yQl07uW5AuuDc4L1a_qoWagluYWzGtH9TkpRQ3eCLOp4399-dyH1qaSyxbr-o0JTURnVewS3NNJnYwxrsDQVHgoudKx1Q3EJKXdF2g_N1rWgXVgWqd37GnZgMmT4ejx1Smh-3A/s320/3.png" width="320" /></a></div>
<ul style="text-align: left;">
<li><span style="background-color: white;">Add a new policy configuration by adding following XML block soon after '<throttle:MediatorThrottleAssertion>'</span></li>
</ul>
<span style="background-color: white;"></span><br />
<pre> <wsp:Policy>
<throttle:ID throttle:type="ROLE">Platinum</throttle:ID>
<wsp:Policy>
<throttle:Control>
<wsp:Policy>
<throttle:MaximumCount>50</throttle:MaximumCount>
<throttle:UnitTime>60000</throttle:UnitTime>
</wsp:Policy>
</throttle:Control>
</wsp:Policy>
</wsp:Policy>
</pre>
<span style="background-color: white;"><br /></span><br />
<span style="background-color: white;">Here is how it should look after addition.</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibB2NDK6tFZWrpcVNkUmqO5fMlpoRF3HN2hTpB9dcfbF1Iyen1gLyoNDQTBN6iteIYJh08ysVq32msFhphHhD4R3v7pTH4zGvb2PgTHQIOKAeKVwrDJyiIqIJKNdvXfqCFJVz7Rg/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="169" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibB2NDK6tFZWrpcVNkUmqO5fMlpoRF3HN2hTpB9dcfbF1Iyen1gLyoNDQTBN6iteIYJh08ysVq32msFhphHhD4R3v7pTH4zGvb2PgTHQIOKAeKVwrDJyiIqIJKNdvXfqCFJVz7Rg/s320/4.png" width="320" /></a></div>
<br />
<ul style="text-align: left;">
<li><span style="background-color: white;">Click on 'Save Content' button. Now your new throttling policy('Platinum') is successfully saved in the Repository </span><span style="background-color: white;">used by WSO2 API Manager. It's time to login to API Provider console & see newly added policy in action.</span></li>
</ul>
<ul style="text-align: left;">
<li><span style="background-color: white;">Visit <a href="https://localhost:9443/apiprovider">https://localhost:9443/apiprovider</a> and login using 'admin/admin'</span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfWdPsjEwpEMoXEI4LDsKaNsVelxC_Gfj8GC-Z1AWDXFlEVU2nsBkfB8j2Ns9bGAH_j1fUw_TkJTNmQg1X5Dl1N3Kb6UHqPrjNK8L8NjMrix_jGS78EfZKQ-VGubDT7Hi1k4rT1g/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="183" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfWdPsjEwpEMoXEI4LDsKaNsVelxC_Gfj8GC-Z1AWDXFlEVU2nsBkfB8j2Ns9bGAH_j1fUw_TkJTNmQg1X5Dl1N3Kb6UHqPrjNK8L8NjMrix_jGS78EfZKQ-VGubDT7Hi1k4rT1g/s320/5.png" width="320" /></a></div>
<ul style="text-align: left;">
<li><span style="background-color: white;">Click on 'Add' link under APIs menu. New Policy should show up in 'Tier Availability' text area (highlighted).</span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR7hP1CDx6FkrbGcJhirL8J2cvhphwOip_ac7ZGYQLbgrv-SC8Cll4nvqqUYtbuFfUpWpKn5NjOvbP4TlFTUvFH4RvkFj9O-XCiDY7MINUNR3mtQ1C-dgLr8g5sDkAC74XI_vUTQ/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR7hP1CDx6FkrbGcJhirL8J2cvhphwOip_ac7ZGYQLbgrv-SC8Cll4nvqqUYtbuFfUpWpKn5NjOvbP4TlFTUvFH4RvkFj9O-XCiDY7MINUNR3mtQ1C-dgLr8g5sDkAC74XI_vUTQ/s320/6.png" width="320" /></a></div>
<br /></div>Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com1tag:blogger.com,1999:blog-23219938.post-25529933822279879652012-05-01T18:03:00.000+05:302012-05-01T18:06:17.878+05:30'tree' command for Mac OSX<div dir="ltr" style="text-align: left;" trbidi="on">
Yet another command missing on Mac OSX is 'tree'. Following is an simple alternative for getting 'tree' functionality on Mac.<br />
<br />
<pre class="c" name="code">vim /usr/local/bin/tree</pre>
Enter following as it's content.<br />
<pre class="c" name="code">#!/bin/bash
find $1 -print | sed -e 's;[^/]*/;|--;g;s;--|; |;g'</pre>
Go to any location in you command line & type 'tree <path>'</path><br />
eg:<br />
<pre class="c" name="code">target tree .
.
|--classes
| |--META-INF
| | |--MANIFEST.MF
| |--org
| | |--wso2
| | | |--carbon</pre>
<br />
This is a modified version of original command found @ <a href="http://murphymac.com/tree-command-for-mac/">http://murphymac.com/tree-command-for-mac/</a> . </div>Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com4tag:blogger.com,1999:blog-23219938.post-88482033881212763932012-05-01T17:43:00.000+05:302012-05-01T17:44:40.203+05:30'watch' command for Mac OSX<div dir="ltr" style="text-align: left;" trbidi="on">
'watch' command from Linux world allows you to repetitively execute a command without having to re-enter it. For example following will check free disk space every 10 seconds.<br />
eg:<br />
<pre class="c" name="code">watch -n 10 df -h</pre>
This is yet another command that's missing on Mac OSX. After bit of Googling found Mac OSX equivalent of 'watch' command @ <a href="http://osxdaily.com/2010/08/22/install-watch-command-on-os-x/">http://osxdaily.com/2010/08/22/install-watch-command-on-os-x/</a> .</div>Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com0tag:blogger.com,1999:blog-23219938.post-14666116858107241162012-03-11T01:52:00.003+05:302012-03-11T01:55:38.684+05:30How to change default Maven/Ant/derby/junit/.. version on Mac OS X?<div dir="ltr" style="text-align: left;" trbidi="on">
I am taking Apache Ant as the example.<br />
Instruction on other packages are similar.
By default, Mac OS X 10.7.3 ships with Apache Ant 1.8.2. I will show how to upgrade this to version 1.8.3 (which is the latest @ the time of writing).<br />
First,
<br />
<pre class="c" name="code">cd /usr/share
ls -al ant
</pre>
<pre class="c" name="code">lrwxr-xr-x 1 root wheel 14 Mar 9 16:08 ant -> java/ant-1.8.2
</pre>
<br />
Take a note of last part of the result.
i.e.
ant -> java/ant-1.8.2<br />
<br />
Which in-terns tell us folder 'ant' is a symlink to java/ant-1.8.2 folder.
If you navigate to '/usr/share/java' folder, you will see all Java related installation that ships with Mac OS X.
Now,<br />
- Download & extract Apache Ant 1.8.3.<br />
- Unzip it to '/usr/share/java'
<br />
<pre class="c" name="code">unzip ~sumedha/tools/apache-ant-1.8.3-bin.zip -d /usr/share/java
</pre>
<br />
Update the symbolic link to point to new Ant version.
<br />
<pre class="c" name="code">on -s -n -f /usr/share/java/ant-1.8.2/ /usr/share/ant
</pre>
<br />
Now it should look like,
<br />
<pre class="c" name="code">lrwxr-xr-x 1 root wheel 32 Mar 10 23:15 ant -> /usr/share/java/apache-ant-1.8.3
</pre>
<br />
Check the Ant version now. 1.8.3 should be shown as the version now.
<br />
<pre class="c" name="code">ant -version
Apache Ant(TM) version 1.8.2 compiled on June 3 2011
</pre>
<br />
Change the symbolic link to older version & check the version again.
<br />
<pre class="c" name="code">ln -s -n -f /usr/share/java/apache-ant-1.8.3/ /usr/share/ant
ant -version
Apache Ant(TM) version 1.8.3 compiled on February 26 2012
</pre>
Similar procedure has to be followed when upgrading other distributions under '/usr/share/java' folder.</div>Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com1tag:blogger.com,1999:blog-23219938.post-72628042709023612192012-01-07T16:13:00.000+05:302012-01-07T16:13:12.733+05:30How to use Apache Pig to analyze a log file?<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://pig.apache.org/">Apache Pig</a> is a platform for analyzing large amount of data. It consists of a built-in language called '<a href="http://pig.apache.org/docs/r0.9.1/basic.html">Latin</a>' for writing data analysis logic. When functionality provided the by 'Latin' is not enough, Pig allows you to write you own UDFs (User Define Functions) & make use of them in data analysis scripts. UDFs can be written using several languages including Java and JavaScript.<br />
<br />
Simple tutorial bellow demonstrates how I have used basic functionality provided by Latin to do simple analysis of a Apache access log. Here I have not used any UDFs to make examples very simple. Let's walk through the samples starting from step 0.<br />
<div>
<div>
<ul style="text-align: left;">
<li>Download Apache Pig from <a href="http://pig.apache.org/">http://pig.apache.org/</a></li>
<li>Unzip it to a directory on your machine (eg: I used pig-0.9.1)</li>
<li>Start pig (inside ping-0.9.1 directory) </li>
</ul>
</div>
<div>
<pre class="c" name="code">java -Xmx512m -Xmx1024m -cp pig-0.9.1.jar org.apache.pig.Main -x local
</pre>
</div>
<div>
<ul style="text-align: left;">
<li>You need yo have a Apache HTTP Server access log for the samples to run. I used a similar file generated from <a href="http://wso2.org/library/application-server">WSO2 Application Server</a>. You can find it attached.</li>
<li>Once Apache Pig is started, it will take you to Grunt shell as follows.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgibeyJYTTzbjxcF7f_Vael1kGRgBKat2vJ_EXV6vSgzKSZ_i56T1OacZVehSQB5OAdh9Md2xrvvHrSwtP9tcfu2i8_6y_oilTZgA5S_B3naLXY9MpRwnHiGajRH4R_8KVkkP2XYA/s1600/pig-start.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="52" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgibeyJYTTzbjxcF7f_Vael1kGRgBKat2vJ_EXV6vSgzKSZ_i56T1OacZVehSQB5OAdh9Md2xrvvHrSwtP9tcfu2i8_6y_oilTZgA5S_B3naLXY9MpRwnHiGajRH4R_8KVkkP2XYA/s640/pig-start.png" width="640" /></a></div>
<ul style="text-align: left;">
<li>Now, let's use few simple scripts written in Pig's Latin language to analyze the log file</li>
</ul>
</div>
<div>
Contents of the log file is similar to following.</div>
<div>
<div>
<br /></div>
<div>
<pre class="c" name="code">0:0:0:0:0:0:0:1%0 - - [07/Jul/2011:09:17:35 +0530] "GET /carbon/admin/jsp/session-validate.jsp HTTP/1.1" 200 3197 "https://localhost:9443/carbon/admin/index.jsp?loginStatus=true" "Mozil<span class="Apple-tab-span" style="white-space: pre;"> </span>la/5.0 (Macintosh; Intel Mac OS X 10_6_3) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1"
127.0.0.1 - - [07/Jul/2011:09:17:35 +0530] "POST /services/ServerAdmin HTTP/1.1" 200 2165 "-" "Axis2"
</pre>
<br />
<pre></pre>
</div>
<div>
Just paste following script segment to Grunt prompt & hit enter.<br />
<br /></div>
</div>
<div>
<div>
<span class="Apple-style-span" style="text-decoration: underline;"><b>Scenario : viewing list of IPs from where access is made</b></span></div>
<div>
<b>Script</b></div>
<pre class="c" name="code">A = load 'http_access_2011-07-07.log' using PigStorage('-') as (f0,f1,f2,f3,f4);
B = foreach A generate f0;
C = distinct B;
dump C;
</pre>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpGexO9bmpR3ssnRQUXHcgxKzv2trpNPanqZwk8WofrWx0x4KAUEDJtGqHkNe2aKBTVEBFXAs9TXihUFdQyTQHVRdC9YLx_BD43qnIrCp8YY8KWfZbi0rEI-YatC01yZrbvI6Ctw/s1600/script-entry.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="66" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpGexO9bmpR3ssnRQUXHcgxKzv2trpNPanqZwk8WofrWx0x4KAUEDJtGqHkNe2aKBTVEBFXAs9TXihUFdQyTQHVRdC9YLx_BD43qnIrCp8YY8KWfZbi0rEI-YatC01yZrbvI6Ctw/s640/script-entry.png" width="640" /></a></div>
<div>
<br /></div>
<div>
You will be presented with an output similar to following.</div>
<div>
<b>Output</b></div>
<div>
<pre class="c" name="code">(127.0.0.1 )
(0:0:0:0:0:0:0:1%0 )
</pre>
</div>
<div>
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikQ4v_xWyvszt3flowGATQjzd3kBSD-OF8fh7L68HZk6v44_EiTxxGOPbODvt0rhUCcIaY5El27cECzyUqPhxfEMY9HJDehjAWgpWM51BvX2aKC4pUGVZVT6aduu9ja5Hrf5Quqg/s1600/output.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="56" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikQ4v_xWyvszt3flowGATQjzd3kBSD-OF8fh7L68HZk6v44_EiTxxGOPbODvt0rhUCcIaY5El27cECzyUqPhxfEMY9HJDehjAWgpWM51BvX2aKC4pUGVZVT6aduu9ja5Hrf5Quqg/s640/output.png" width="640" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
More examples:</div>
<div>
<br /></div>
<div>
<span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="text-decoration: underline;">Browser Agents</span></span><br />
<b>Script</b><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><span class="Apple-style-span" style="background-color: #fff2cc;">A = load 'http_access_2011-07-07.log' using PigStorage('"') as (f0,f1,f2,f3,f4,f5);</span></span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><span class="Apple-style-span" style="background-color: #fff2cc;">B = foreach A generate f5;</span></span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><span class="Apple-style-span" style="background-color: #fff2cc;">C = distinct B;</span></span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><span class="Apple-style-span" style="background-color: #fff2cc;">dump C;</span></span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><br /></span><br />
<b>Output</b><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(Axis2)</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_3) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1)</span><br />
<br />
<br />
<b><span class="Apple-style-span" style="text-decoration: underline;">URI Accessed</span></b><br />
<b>Script</b><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><span class="Apple-style-span" style="background-color: #fff2cc;">A = load 'http_access_2011-07-07.log' using PigStorage('"') as (f0,f1,f2,f3,f4);</span></span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><span class="Apple-style-span" style="background-color: #fff2cc;">B = foreach A generate f1;</span></span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><span class="Apple-style-span" style="background-color: #fff2cc;">C = distinct B;</span></span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><span class="Apple-style-span" style="background-color: #fff2cc;">dump C;</span></span><br />
<br />
<b>Output</b><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(GET / HTTP/1.1)</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(GET /carbon HTTP/1.1)</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(POST /services/ServerAdmin HTTP/1.1)</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(GET /carbon/admin/index.jsp HTTP/1.1)</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(POST /carbon/admin/login_action.jsp HTTP/1.1)</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(POST /services/RegistryAdminService HTTP/1.1)</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(GET /carbon/yui/build/yahoo-dom-event/yahoo-dom-event.js HTTP/1.1)</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(GET /carbon/data_service/images/data-services-uploadWSDL.gif HTTP/1.1)</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(GET /carbon/viewflows/extensions/core/images/handler_flow.gif HTTP/1.1)</span><br />
<br />
<br />
<b><span class="Apple-style-span" style="text-decoration: underline;">Access time & source</span></b><br />
<b>Script</b><br />
<span class="Apple-style-span" style="background-color: #fff2cc;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">A = load 'http_access_2011-07-07.log' using PigStorage('"') as (f0,f1,f2,f3,f4);</span></span><br />
<span class="Apple-style-span" style="background-color: #fff2cc;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">B = foreach A generate f0;</span></span><br />
<span class="Apple-style-span" style="background-color: #fff2cc;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">C = distinct B;</span></span><br />
<span class="Apple-style-span" style="background-color: #fff2cc;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">dump C;</span></span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><br /></span><br />
<b>Output</b><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(127.0.0.1 - - [07/Jul/2011:09:20:17 +0530] )</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(127.0.0.1 - - [07/Jul/2011:09:20:23 +0530] )</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(0:0:0:0:0:0:0:1%0 - - [07/Jul/2011:09:17:09 +0530] )</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(0:0:0:0:0:0:0:1%0 - - [07/Jul/2011:09:17:17 +0530] )</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">(0:0:0:0:0:0:0:1%0 - - [07/Jul/2011:09:17:18 +0530] )</span><br />
<div>
<br /></div>
</div>
</div>
</div>Sumedha Rubasinghehttp://www.blogger.com/profile/05376413210748079955noreply@blogger.com7