tag:blogger.com,1999:blog-64907823613617298932024-03-19T14:22:28.700-07:00Kaushie's blogKaushiehttp://www.blogger.com/profile/00679892464443742350noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-6490782361361729893.post-82671398963376017082015-09-23T10:16:00.004-07:002015-09-23T10:16:25.205-07:00Create and Publish an API with Endpoint suspension parameters with WSO2 API Manager 1.8.0<span style="color: #134f5c;">To Login :</span><br /><br />curl -X POST -c cookies http://localhost:9763/publisher/site/blocks/user/login/ajax/login.jag -d 'action=login&username=admin&password=admin'<br /><br /><br /><br /><span style="color: #134f5c;">To create the API:</span><br /><br />curl -k -X POST -b cookies https://localhost:9443/publisher/site/blocks/item-add/ajax/add.jag -d 'action=addAPI&name=PizzaShack3&visibility=public&version=1.0.0&description=New API&endpointType=secured&http_checked=&https_checked=https&wsdl=&tags=automated published&tier=Gold&thumbUrl=https://pbs.twimg.com/profile_images/493735622587064320/z7qZUG0E_bigger.png&context=/pizza3&tiersCollection=Unlimited&resourceCount=0&resourceMethod-0=GET&resourceMethodAuthType-0=Application,Application User&resourceMethodThrottlingTier-0=Unlimited&uriTemplate-0=/assignments' -d 'endpoint_config={"production_endpoints":{"url":"http://localhost:8080/pizzashack-api-1.0.0","config":{"format":"leave-as-is","optimize":"leave-as-is","suspendErrorCode":["101505"],"suspendDuration":0,"suspendMaxDuration":0,"factor":1,"actionSelect":"fault","actionDuration":30000}},"endpoint_type":"http"}'<br /><br /><br /><br /><span style="color: #134f5c;"><br />To publish the API : </span><br /><br />curl -X POST -b cookies 'http://localhost:9763/publisher/site/blocks/life-cycles/ajax/life-cycles.jag' -d 'action=updateStatus&name=PizzaShack3&version=1.0.0&provider=admin&status=PUBLISHED&publishToGateway=true&requireResubscription=true'<br /><br />Kaushiehttp://www.blogger.com/profile/00679892464443742350noreply@blogger.com0tag:blogger.com,1999:blog-6490782361361729893.post-60250368457319502752015-01-18T01:12:00.000-08:002015-01-18T01:13:08.540-08:00Testing WSO2 BAM 2.5.0 Kafka Input Event Adaptor <div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-0mVr4WVPytY/VLt315bpkZI/AAAAAAAAAXw/K0t5Jx0V7BY/s1600/kafka1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-0mVr4WVPytY/VLt315bpkZI/AAAAAAAAAXw/K0t5Jx0V7BY/s1600/kafka1.png" height="133" width="320" /></a></div>
<br />
<br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">WSO2 BAM 2.5.0 now supports processing data streams based on the Kafka Event Adaptor.</span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Apache Kafka is a fast, scalable and distributed publish-subscribe messaging system.<br />It maintains topics which contain message feeds. These messages are written to topics by Producers and read by Consumers.<br />These topics are partitioned and replicated across multiple nodes, thereby making Kafka a distributed system.</span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Let's see how to configure a Kafka based input adapter in WSO2 BAM 2.5.0 and capture attributes from a message published to a topic on Kafka by WSO2 BAM 2.5.0 </span></span><br />
<br />
<b><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Setting up Kafka:</span></span></b><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Kafka can be downloaded from <a href="http://kafka.apache.org/downloads.html">here </a></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Once downloaded unzip the distribution as follows.</span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="color: purple;">tar xvf kafka_2.10-0.8.1.1.tgz </span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Navigate to the folder unzip file was extracted to as follows</span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"></span></span><br />
<span style="color: purple;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">cd kafka_2.10-0.8.1.1/</span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Execute the following command to start the zookeeper server.</span></span><br />
<span style="color: purple;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">bin/zookeeper-server-start.sh config/zookeeper.properties</span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Then open another console, navigate to the Kafka folder and execute the following command to start the Kafka server</span></span><br />
<span style="color: purple;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">bin/kafka-server-start.sh config/server.properties</span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Now open another console, navigate to the Kafka folder and execute the following command to create a topic</span></span></span></span><br />
<span style="color: purple;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"> bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic kafkaTestTopic1</span></span></span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">The topic name given here is 'kafkaTestTopic' </span></span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">A producer needs to be started to send messages to the created topic.</span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Therefore navigate to open another console and navigate to the Kafka folder and execute the following command.</span></span></span></span><br />
<span style="color: purple;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">bin/kafka-console-producer.sh --broker-list localhost:9092 --topic kafkaTestTopic1</span></span></span></span></span><br />
<br />
<b><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span></b>
<b><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Setting up WSO2 BAM 2.5.0:</span></span></span></span></b><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Download and extract WSO2 BAM 2.5.0 from <a href="https://docs.google.com/file/d/0B40fDwBaUuHVOUZCREVTQnU0d3c" target="_blank">here</a></span></span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Copy the following .jar files at the <span style="color: blue;"><Kafka_Home>/lib</span> to <span style="color: blue;"><BAM_HOME>/repository/components/lib</span></span></span></span></span><br />
<br />
<span style="color: purple;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">kafka_2.10-0.8.1.1.jar</span></span></span></span></span><br />
<span style="color: purple;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">scala-library-2.10.1.jar</span></span></span></span></span><br />
<span style="color: purple;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">zkclient-0.3.jar </span></span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="color: purple;">zookeeper-3.3.4.jar</span></span></span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Navigate to <BAM_HOME>/bin and start the server as follows.</span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="color: purple;">sh wso2server.sh</span></span></span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Log into the Management console of BAM and navigate to <span style="color: blue;">Configure-->Event Processor Configs --> Input Event Adaptors</span></span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"></span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Click on 'Add Input Event Adaptor', specify the input adaptor details as follows and create an input adaptor.</span></span></span></span><br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-0mVr4WVPytY/VLt315bpkZI/AAAAAAAAAXw/K0t5Jx0V7BY/s1600/kafka1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-0mVr4WVPytY/VLt315bpkZI/AAAAAAAAAXw/K0t5Jx0V7BY/s1600/kafka1.png" height="265" width="640" /></a></div>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Next navigate to Main --> Event processor --> Event streams.</span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Click on 'Add Event Stream' and specify an event stream to capture the data required.</span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Specify the payload attributes and their types to be captured.</span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-pXJNZNjLC00/VLt3-9dAUSI/AAAAAAAAAX4/rXP_T5zvxcA/s1600/kafka2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-pXJNZNjLC00/VLt3-9dAUSI/AAAAAAAAAX4/rXP_T5zvxcA/s1600/kafka2.png" height="390" width="640" /></a></div>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-family: Georgia,"Times New Roman",serif;">Click on 'Add Event Stream' and specify the option 'Custom Event Builder' in the event builder options that appear.</span><br />
<span style="font-family: Georgia,"Times New Roman",serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-5k5yn1W_Mis/VLt4I-geaDI/AAAAAAAAAYA/r5cUFh4cWS4/s1600/kafka3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-5k5yn1W_Mis/VLt4I-geaDI/AAAAAAAAAYA/r5cUFh4cWS4/s1600/kafka3.png" height="168" width="400" /></a></div>
<br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Specify the event builder configurations as follows and add an event builder though the pop up window that appears.</span></span></span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-ciKohiRsWgk/VEpLKUMstwI/AAAAAAAAALo/8O0PxSL_Qbo/s1600/kafkaEventBuilder.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-KKO9VDAwDCo/VLt4Iy8YoFI/AAAAAAAAAYM/eAinJxzpSnU/s1600/kafka4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-KKO9VDAwDCo/VLt4Iy8YoFI/AAAAAAAAAYM/eAinJxzpSnU/s1600/kafka4.png" height="344" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-vI4XQMoNAWg/VEpLLq7dW5I/AAAAAAAAALw/Qx91cCozwcE/s1600/kafkaEventBuilder.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-QzMCNhbcxyw/VEpJy3TXhnI/AAAAAAAAALg/84sbfBuSELQ/s1600/kafkaEventBuilder.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">When specifying the event builder configurations you need to add the name of the topic to be listened to.</span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">I have added here the topic created under Kafka configurations ie. </span></span></span></span><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="color: purple;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">kafkaTestTopic1</span></span></span></span></span> </span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">The input mapping type is specified as json.</span></span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Now it is required to send a message to the topic.</span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Go back to the producer console started and copy paste the following json string.</span></span></span></span><br />
<span style="color: purple;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="color: purple;">{"event": { "payloadData": {"kafkaAtt1": "4","kafkaAtt2": "TestString"}}}</span></span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Once this is done, the values of attributes specified in the kafkaEventStream will be captured and and entry will be made in the stream kafkaEventStream under in the Cassandra Key space EVENT_KS.</span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">To view this navigate to <span style="color: blue;">Tools --> Cassandra Explorer --> Connect to Cluster</span><br />and specify the Cassandra connection details.</span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-ca6XQTrbj1U/VLt4I5i6afI/AAAAAAAAAYE/NlWpor9qobE/s1600/kafka5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-ca6XQTrbj1U/VLt4I5i6afI/AAAAAAAAAYE/NlWpor9qobE/s1600/kafka5.png" height="210" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-MO7ijSvHiZ4/VEpOmTsjPfI/AAAAAAAAAMA/UXJHIU3MeTw/s1600/cassandraexplorer.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Once connected the you will be able to see the kafkaEventStream under EVENT_KS.</span></span></span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-IfpJz-4VElQ/VLt4KIbKsTI/AAAAAAAAAYU/ylLl1XMC1Zc/s1600/kafka6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-IfpJz-4VElQ/VLt4KIbKsTI/AAAAAAAAAYU/ylLl1XMC1Zc/s1600/kafka6.png" height="97" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-B8Y1kSOcMj8/VEpO_TjqiwI/AAAAAAAAAMI/x-0-sCu6Msk/s1600/KS.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Click on 'kafkaEventStream'.</span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">The entry made for the captured data will be displayed.</span></span></span></span><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-qSFmx4SepYk/VLt4Kbdlo0I/AAAAAAAAAYY/lQHRd2bmzAk/s1600/kafka7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-qSFmx4SepYk/VLt4Kbdlo0I/AAAAAAAAAYY/lQHRd2bmzAk/s1600/kafka7.png" height="96" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-r_4oQ9E9OPI/VEpP0mOtzoI/AAAAAAAAAMc/4_u7X-4uWI0/s1600/kafkaEventStream.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">Click on 'View more' option.</span></span></span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-XiAyMSrH-tM/VLt4K0HYw1I/AAAAAAAAAYg/FX2WhapPYEk/s1600/kafka8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-XiAyMSrH-tM/VLt4K0HYw1I/AAAAAAAAAYg/FX2WhapPYEk/s1600/kafka8.png" height="166" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-eezDmrjW5VU/VEpQMpzA_kI/AAAAAAAAAMk/V5LbiobQktE/s1600/streamEntry.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">A details version of the stream entry will be displayed.</span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;">You can see the captured attributes and their values.</span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"> </span></span> </span></span><br />
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: Georgia,"Times New Roman",serif;"><br /></span></span>Kaushiehttp://www.blogger.com/profile/00679892464443742350noreply@blogger.com0tag:blogger.com,1999:blog-6490782361361729893.post-57377005524843922802014-09-29T23:29:00.000-07:002015-12-18T04:28:14.191-08:00Verifying entitlement caching with WSO2 API Manager 1.7.0<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;">The API invocation flow with XACML is as follows</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVEVqLusebvVyxAzEU5xSml0zeHkpMOpLse9cqGzDqL7D1YHFlt2IiomsQcvUrDNWjG8Og44gsVULbfoiR40T4korgY7B5bTKaBy089zkg0Xl2BBfgbQY9ubewRzsyAz2lWT0c3CSJgVE/s1600/api_invocation_flow_with_xacml.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVEVqLusebvVyxAzEU5xSml0zeHkpMOpLse9cqGzDqL7D1YHFlt2IiomsQcvUrDNWjG8Og44gsVULbfoiR40T4korgY7B5bTKaBy089zkg0Xl2BBfgbQY9ubewRzsyAz2lWT0c3CSJgVE/s400/api_invocation_flow_with_xacml.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"></span></span></div>
<br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><br />
1 Request is received by the Gateway(APIM)
<br />
2. Token is validated by the Key Manager (APIM) and the validation results are sent back to the Gateway.
<br />
3. If the token is valid, the entitlement mediator will call the identity server for XACML policy evaluation.
<br />
4. If the result of the policy decision is 'permit' the actual back end endpoint will be invoked.
</span></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><br />
When you enable response caching for an API, the cache mediator will be
engaged,before step 3 and 4 (before calling the Identity Server to get
the XACML policy evaluated and the back end endpoint).
<br />
This will cache the response and the result of the XACML policy decision.
</span></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><br /> </span></span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><b>Setup:</b></span></span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"> </span></span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><span style="color: #666666;">1.Install the following features on API Manager and restart the server.<br /> Features<br /> -XACML<br /> -XACML Mediation</span></span></span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><span style="color: #666666;"> Repository Location : http://dist.wso2.org/p2/carbon/releases/turing/</span> </span></span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><span style="color: #666666;">2. Create an API in the API Publisher and replace the
content of the synapse configuration deployed with that of <a href="https://drive.google.com/file/d/0B40fDwBaUuHVMXQ3dTVROUtkYmM/edit?usp=sharing">this file</a> </span></span></span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><span style="color: #666666;">3 In the above created API, I have used the following sample APIs as
endpoints instead of calling external endpoints. Therefore copy these
files to
<span style="color: blue;"><AM_HOME>/repository/deployment/server/synapse-configs/default/api
folder.
</span><br />
<a href="https://docs.google.com/file/d/0B40fDwBaUuHVNjdVQTl4NVJPMnM" target="_blank">acceptResponse_api.xml</a>
<br />
<a href="https://docs.google.com/file/d/0B40fDwBaUuHVXzhfQTM4RDV4bFE" target="_blank">denyResponse_api.xml</a></span></span></span><br />
<br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><span style="color: #666666;"><br />
4. The following sample xacml policy should be deployed in the Identity server used for entitlement validation.
<br />
<a href="https://docs.google.com/file/d/0B40fDwBaUuHVOUZCREVTQnU0d3c" target="_blank">sample_xacml_policy.xml </a></span></span></span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"> </span></span><br />
<br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><b>Verification:</b></span></span><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><b><br />
Step 1:
</b><br />
Enable debug logs for the package 'org.wso2.carbon.identity.entitlement' of the Identity server.
<br />
-For this add the following entry in the <span style="color: blue;"><IS_HOME>/repository/conf/log4j.properties</span> file and restart the server.
<br />
<span style="color: blue;"> log4j.logger.org.wso2.carbon.identity.entitlement=DEBUG
</span></span></span><span style="color: blue;"> </span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"> </span></span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><b>Step 2:
</b><br />
Create an API by enabling response caching
<br />
Subscribe to this API and invoke it.
<br />
- This will print the debug logs pertaining to the package enabled at step 1 on the identity server console.
<br />
- This implies the initial request made to the identity server for XACML policy evaluation.
<br />
- The policy decision and the back end response is cached at the APIM end at this point.
</span></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"></span></span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"> </span></span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><b>Step 3:
</b><br />
Invoke the API again (without changing the request).
<br />
- Since the request is identical to the request made at step 2, the response will be fetched from the response cache at APIM.
<br />
- No requests will be made to the Identity server for policy evaluation or to the actual back end.
<br />
- Therefore the debug logs observed on the Identity server console at step 2, will not be logged again.
</span></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"> </span></span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><b>Step 4 (Optional):
</b><br />
Repeat step 1 and 2 after changing a request parameter.
<br />
- Since the request is different (due to the difference in request
parameters) you will be able to observe the above mentioned debug log on
the Identity Server for the first invocation.
<br />
- But not for the second invocation as the response will be fetched from the cache.
</span></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: small;"><br /></span></span>
Kaushiehttp://www.blogger.com/profile/00679892464443742350noreply@blogger.com0tag:blogger.com,1999:blog-6490782361361729893.post-26941790387793064522014-04-17T09:27:00.005-07:002015-01-18T01:28:29.549-08:00Guidelines for configuring WSO2 API-Manager workflows in a clustered environment1) Work flow server URLs of site.json file should be updated with the
correct port of the Business Process Server considering its port
offset.(Work flow related configuration files by default contain port
values assuming that the BPS port offset is 2.)<br />
<br />
<b>If BPS and API-Manager are required to be pointed to the same user store, </b> the workflow admin of the publisher node can be used, thus eliminating
the need for a dedicated workflow node.<br />
Since
in a typical scenario the workflow admin will be from the same user
store as APIM, we can use the workflow admin residing in the publisher
node instead of having it separately.<br />
Publisher node is recommended to
be used here since it is an administrative level task and the publisher
node is meant to reside within a private network.<br />
<br />
In this case the URLs of<span style="color: blue;">
<APIM_PUBLISHER_HOME>/<wbr></wbr>repository/deployment/server/<wbr></wbr>jaggeryapps/admin-dashboard/<wbr></wbr>site/conf/site.json</span> need to be updated.<br />
<br />
<b>If work flow admins are not from the API-Manager user store</b>, have a seperate node for the workflow admin. <br />
A dedicated node is only required if workflow admin users reside in a separate user store. In this case APIM and BPS will be pointed to different user store.<br />
<br />
In this case the URLs of <span style="color: blue;"><APIM_WORKFLOW_HOME>/<wbr></wbr>repository/deployment/server/<wbr></wbr>jaggeryapps/admin-dashboard/<wbr></wbr>site/conf/site.json</span> need to be updated.<br />
<br />
If a workflow admin user role needs to be defined, add it under 'allowedRoles'.<br />
eg: "allowedRoles":"wfadmin"<br />
Once this change is done, only users with the given role will be allowed to log in to the work flow admin dashboard.<br />
<div>
<br /></div>
<br />
<div class="im">
2) Copy <span style="color: blue;"><APIM_HOME>/business-processes/epr</span> folder to <span style="color: blue;"><BPS_HOME>/repository/conf</span></div>
<br />
3) Make the following changes in the .epr files of <span style="color: blue;"><BPS_HOME>/repository/conf/epr</span><br />
<span style="color: blue;"><br /></span>
Change the following in case the default admin user has been changed.<br />
<span style="color: blue;"><authorization-username></span><br />
<span style="color: blue;"><authorization-password></span><br />
<br />
The WorkFlowCallBackService endpoints of the following files should be pointed to the gateway :<br />
<span style="color: blue;"><BPS_HOME>/repository/conf/epr/ApplicationCallbackService.epr </span><br />
<span style="color: blue;"><BPS_HOME>/repository/conf/epr/RegistrationCallbackService.epr </span><br />
<span style="color: blue;"><BPS_HOME>/repository/conf/epr/SubscriptionCallbackService.epr </span><br />
<span style="color: blue;"><BPS_HOME>/repository/conf/epr/UserSignupProcess.epr</span><br />
<br />
<br />
The Service endpoints of the following files should be pointed to the Business Process Server :<br />
<span style="color: blue;"><BPS_HOME>/repository/conf/epr/ApplicationService.epr </span><br />
<span style="color: blue;"><BPS_HOME>/repository/conf/epr/RegistrationService.epr </span><br />
<span style="color: blue;"><BPS_HOME>/repository/conf/epr/SubscriptionService.epr </span><br />
<span style="color: blue;"><BPS_HOME>/repository/conf/epr/ UserSignupService.epr</span><br />
<br />
4) Update the port of the WSDL files of <span style="color: blue;"><API_MANAGER_HOME>/business-processes/<relevent workflow>/HumanTask</span> with the correct port of the Business Process Server.<br />
<br />
5) Upload the HumanTasks located in <span style="color: blue;"><API_MANAGER_HOME>/business-processes/<Relevent workflow>/HumanTask</span> to the Business Process Server (Main -> Manage -> Human Tasks).<br />
Alternatively you can copy it to <span style="color: blue;"><BPS_HOME>/repository/deployment/server/humantasks </span>folder.<br />
<br />
6) Upload the BPEL processes located in <span style="color: blue;"><API_MANAGER_HOME>/business-processes/<Relevent workflow>/BPEL</span> to the Business Process Server. (Main -> Manage -> Processes).<br />
Alternatively you can copy it to <span style="color: blue;"><BPS_HOME>/repository/deployment/server/bpel</span> folder.<br />
<br />
7) Point the endpoint of proxy service <span style="color: blue;"><APIM_GATEWAY_HOME>repository/deployment/server/synapse-configs/default/proxy-services/WorkflowCallbackService.xml </span>of the gateway node to the 'Store' node of the cluster.<br />
<br />
<span style="color: #666666;">This proxy service is used to convert SOAP messages received by the Business Process Server (which is unable to send JSON messages directly) to JSON, in order to call a rest endpoint.</span><br />
<br />
8) Enable the executer relevant to the required workflow in the following file, by logging into the management console (the node does not matter since the governance registry is shared)<br />
Main -> Resources -> _system --> governance -> apimgt -> applicationdata -> workflow-extensions.xml.<br />
<br />
Point the 'serviceEndpoint' to the Business Process Server.<br />
Point the 'callbackURL' to the Gateway Node of the cluster.<br />
<br />
<span style="color: #666666;">The reason for pointing the callbackURL to the gateway node here is the fact that proxy service changes (eg: Security policy) are usually done in the gateway node. The store node does not get updated when such changes are concerned.</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-F9v2VP6Dkk4/U1ACod9hf8I/AAAAAAAAAG4/xRenTYXrUCc/s1600/workflow-extensions.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<br />Kaushiehttp://www.blogger.com/profile/00679892464443742350noreply@blogger.com0tag:blogger.com,1999:blog-6490782361361729893.post-3588551735173438112014-02-26T05:56:00.000-08:002015-01-18T01:25:49.937-08:00Enabling log4jdbc to verify key caching funcionality in WSO2 API-Manager<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">1. Configure API-Manager database (WSO2AM_DB) of WSO2 API-Manager with MYSQL </span><br />
<span style="font-family: inherit;"> (</span><a href="http://docs.wso2.org/display/AM160/Setting+up+with+MySQL" style="font-family: inherit;">http://docs.wso2.org/display/AM160/Setting+up+with+MySQL</a><span style="font-family: inherit;">)</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">2. Place the log4j driver in <span style="color: blue;"><KEY_MANAGER_HOME>/repository/components/lib</span></span><br />
<span style="font-family: inherit;"> (<a href="https://log4jdbc.googlecode.com/files/log4jdbc4-1.2beta2.jar">https://log4jdbc.googlecode.com/files/log4jdbc4-1.2beta2.jar</a>)</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">3. Append the following to the<span style="color: #134f5c;"> </span><span style="color: blue;"><</span></span><span style="color: blue;">KEY_MANAGER_HOME</span><span style="font-family: inherit;"><span style="color: blue;">>/repository/conf/log4j.properties</span> file.</span><br />
<span style="font-family: inherit;"><br /></span><span style="color: purple;"> ! Log all JDBC calls except for ResultSet calls </span><br />
<span style="color: purple;"> ! Log timing information about the SQL that is executed. </span><br />
<span style="color: purple;"> log4j.logger.jdbc.sqltiming=DEBUG,sqltiming </span><br />
<span style="color: purple;"> log4j.additivity.jdbc.sqltiming=false </span><br />
<span style="color: purple;"> ! the appender used for the JDBC API layer call logging above, sql timing </span><br />
<span style="color: purple;"> log4j.appender.sqltiming=org.apache.log4j.FileAppender </span><br />
<span style="color: purple;"> log4j.appender.sqltiming.File=./repository/logs/sqltiming.log </span><br />
<span style="color: purple;"> log4j.appender.sqltiming.Append=false </span><br />
<span style="color: purple;"> log4j.appender.sqltiming.layout=org.apache.log4j.PatternLayout </span><br />
<span style="color: purple;"> log4j.appender.sqltiming.layout.ConversionPattern=-----> %d{yyyy-MM-dd HH:mm:ss.SSS} %m%n%n<span style="font-family: inherit;"> </span></span><span style="background-color: white; font-family: inherit;"><span style="color: purple;"> </span> </span><br />
<span style="font-family: inherit;"> </span>This configures the following:<br />
<ul>
<li><b>Log level (DEBUG) </b>: Captures all debug level logs of package jdbc.sqltiming</li>
<li><b>Appender (sqltiming) </b>: Uses a FileAppender where all logs are logged in the file specified in property 'log4j.appender.sqltiming.File'</li>
<li><b>Layout </b>: Format to use when logging</li>
</ul>
<br />
4. Replace the following in the WSO2AM_DB datasource of located in file :<br />
<span style="color: blue;"> <</span><span style="color: blue;">KEY_MANAGER_HOME</span><span style="color: blue;">>/repository/conf/datasources/master-datasources.xml</span><br />
<ul>
<li>Append 'jdbc:log4j' to the beginning of the content of <url> element.</li>
</ul>
<span style="color: purple;"><url></span>jdbc:log4jdbc:mysql://localhost:3306/WSO2AM_DB?relaxAutoCommit=true<span style="color: purple;"></url></span><br />
<ul>
<li>Change the driver class to the following:</li>
</ul>
<span style="color: #741b47;"> </span><span style="color: purple;"> <driverClassName></span>net.sf.log4jdbc.DriverSpy<span style="color: purple;"></driverClassName></span><br />
<br />
log4jdbc driver uses log4j to log messages. When 'jdbc:log4j' is appended to the url, the service calls pass through the log4jdbc driver where they are logged and passed over to the mysql driver.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-pz1z5bwOEQc/VLt6juvUS_I/AAAAAAAAAY0/BB58UKINcu0/s1600/log4j1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-pz1z5bwOEQc/VLt6juvUS_I/AAAAAAAAAY0/BB58UKINcu0/s1600/log4j1.png" height="94" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
Once the above changes are done your WSO2AM_DB datasource should look like this.<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="color: #666666;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #666666;"><a href="http://3.bp.blogspot.com/-8WS1jHgIFa0/Uw9GZX1bVzI/AAAAAAAAAEY/Z1gTLPkdgXs/s1600/blog1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></span></div>
<div>
<div class="a3s" id=":sr" style="text-align: left;">
<wbr></wbr><span style="color: #0b5394;"><datasource><br />
<name>WSO2AM_DB</name><br />
<description>Datasource for AM database</description><br />
<jndiConfig><br />
<name>jdbc/WSO2AM_DB</name><br />
</jndiConfig><br />
<definition type="RDBMS"><br />
<configuration><br />
<url>jdbc:log4jdbc:mysql://localhost:3306/WSO2AM_DB?</span><wbr></wbr><span style="color: #0b5394;">relaxAutoCommit=true</url><br />
<username>wso2carbon</</span><wbr></wbr><span style="color: #0b5394;">username><br />
<password>wso2carbon</</span><wbr></wbr><span style="color: #0b5394;">password><br />
<driverClassName>net.sf.</span><wbr></wbr><span style="color: #0b5394;">log4jdbc.DriverSpy</</span><wbr></wbr><span style="color: #0b5394;">driverClassName><br />
<maxActive>50</maxActive><br />
<maxWait>60000</maxWait><br />
<testOnBorrow>true</</span><wbr></wbr><span style="color: #0b5394;">testOnBorrow><br />
<validationQuery>SELECT 1</validationQuery><br />
<validationInterval>30000</</span><wbr></wbr><span style="color: #0b5394;">validationInterval><br />
</configuration><br />
</definition><br />
</datasource></span></div>
<br /></div>
<br />
Now logging is enabled.<br />
<br />
<b>To verify key manager caching :</b><br />
<br />
1. Open <span style="color: blue;"><</span><span style="color: blue;">KEY_MANAGER_HOME</span><span style="color: blue;">>/repository/conf/api-manager.xml</span> file and enable/disable <span style="color: purple;"><EnableKeyMgtValidationInfoCache></span> as required.<br />
2. Open <span style="color: blue;"><</span><span style="color: blue;">GATEWAY_HOME</span><span style="color: blue;">>/repository/conf/api-manager.xml</span> file and disable <span style="color: purple;"><EnableGatewayKeyCache></span><br />
3. Re-start both Gateway & Key Manager nodes.<br />
4. Copy <span style="color: blue;"><</span><span style="color: blue;">KEY_MANAGER_HOME</span><span style="color: blue;">>/repository/logs/</span><span style="color: blue;">sqltiming.log</span> & save under a different name.<br />
<span style="color: purple;"> cp sqltiming.log sqltiming.log.1</span><br />
5. Invoke the desired API.<br />
6. Take another copy of sqltiming.log and save under a new name.<br />
<span style="color: purple;"> cp sqltiming.log sqltiming.log.2</span><br />
7. Verify the database calls by checking the difference between logs.<br />
<span style="color: purple;"> diff sqltiming.log.1 sqltiming.log.2</span><br />
<span style="color: purple;"><br /></span>
<span style="color: orange;">If KM caching is enabled :</span> The access token related database call should be logged only once until the cache expires.<br />
<span style="color: orange;">If KM caching is disabled</span>: The access token related database call should be logged everytime the API is invoked.<br />
<br />
<b>To verify gateway caching :</b><br />
<b><br /></b>
Gateway caching can be tested by verifying whether database calls are logged on the Key Manager node when gateway caching is enabled/disabled.<br />
<b><br /></b>
1. Open <span style="color: blue;"><</span><span style="color: blue;">KEY_MANAGER_HOME</span><span style="color: blue;">>/repository/conf/api-manager.xml</span> file and disable <span style="color: purple;"><EnableKeyMgtValidationInfoCache></span><br />
2. Open <span style="color: blue;"><</span><span style="color: blue;">GATEWAY_HOME</span><span style="color: blue;">>/repository/conf/api-manager.xml</span> file and enable/disable <span style="color: purple;"> <EnableGatewayKeyCache></span> as required.<br />
3. Re-start both Gateway & Key Manager nodes.<br />
4. Copy <span style="color: blue;"><</span><span style="color: blue;">KEY_MANAGER_HOME</span><span style="color: blue;">>/repository/logs/</span><span style="color: blue;">sqltiming.log</span> & save under a different name.<br />
<span style="color: purple;"> cp sqltiming.log sqltiming.log.1</span><br />
5. Invoke the desired API.<br />
6. Take another copy of sqltiming.log and save under a new name.<br />
<span style="color: purple;"> cp sqltiming.log sqltiming.log.2</span><br />
7. Verify the database calls by checking the difference between logs.<br />
<span style="color: purple;"> diff sqltiming.log.1 sqltiming.log.2</span><br />
<br />
<span style="color: orange;">If GW caching is enabled</span>: The access token related database call should be logged only once until the cache expires. (In this scenario only the first invocation hits the key manager. The sub subsequent invocations use the token related data in the gateway cache)<br />
<br />
<span style="color: orange;">If GW caching is disabled:</span> The access token related database call should be logged everytime the API is invoked. (In this scenario every invocation hits the key manager as token related data are not cached on the gateway)<br />
<div>
<br />
Eg:<br />
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">2014-09-30 11:49:15.013 org.wso2.carbo</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">n.apimgt.impl.d</span><br />
<wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">ao.ApiMgtDAO.va</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">lidateKey(ApiMg</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">tDAO.java:541)</span><br />
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">3. SELECT IAT.VALIDITY_PE</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">RIOD, IAT.TIME_CREATE</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">D , IAT.TOKEN_STATE</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">, IAT.USER_TYPE, IAT.AUTHZ_USER,<span class="Apple-converted-space"> </span></span><br />
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">IAT.TIME_CREATE</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">D, SUB.TIER_ID, SUBS.USER_ID, SUB.SUB_STATUS, APP.APPLICATION</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">_ID,<span class="Apple-converted-space"> </span></span><a href="http://app.name/" style="-webkit-text-stroke-width: 0px; background-color: white; color: #0065cc; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">APP.NAME</a><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">,<span class="Apple-converted-space"> </span></span><br />
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">APP.APPLICATION</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">_TIER, AKM.KEY_TYPE, API.API_NAME, AKM.CONSUMER_KE</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">Y, API.API_PROVIDE</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">R FROM IDN_OAUTH2_ACCE</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">SS_TOKEN<span class="Apple-converted-space"> </span></span><br />
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">IAT, AM_SUBSCRIPTION SUB, AM_SUBSCRIBER SUBS, AM_APPLICATION APP, AM_APPLICATION_</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">KEY_MAPPING<span class="Apple-converted-space"> </span></span><br />
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">AKM, AM_API API WHERE IAT.ACCESS_TOKE</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">N = '6ef853c12bfebc</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">66771baea147352</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">860' AND API.CONTEXT<span class="Apple-converted-space"> </span></span><br />
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">= '/echo' AND API.API_VERSION = '1.0.0' AND IAT.CONSUMER_KE</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">Y=AKM.CONSUMER_</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">KEY AND SUB.APPLICATION</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">_ID<span class="Apple-converted-space"> </span></span><br />
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">= APP.APPLICATION</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">_ID AND APP.SUBSCRIBER_</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">ID = SUBS.SUBSCRIBER</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">_ID AND API.API_ID = SUB.API_ID<span class="Apple-converted-space"> </span></span><br />
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">AND AKM.APPLICATION</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">_ID=APP.APPLICA</span><wbr style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"></wbr><span style="-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">TION_ID {executed in 4 msec}</span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />Kaushiehttp://www.blogger.com/profile/00679892464443742350noreply@blogger.com1