tag:blogger.com,1999:blog-54638210593715497382024-03-13T13:17:24.522-07:00Open SpaceLalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.comBlogger78125tag:blogger.com,1999:blog-5463821059371549738.post-40641835403557934712020-04-19T08:43:00.001-07:002020-04-19T19:34:25.350-07:00Covid19 - A threat against traditional Banking<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
I would like to start this blog post by wishing all of you to be safe from Covid19 and wish all infected ones safe speedy recovery from the decease..</div>
<div style="text-align: justify;">
Due to the global pandemic situation, 'working from home' , "delivery food/goods to your homes" and importantly "purchases via digital money" have been become the norms for the situation. </div>
<div style="text-align: justify;">
Thinking further this global epidemic situation has made a huge opportunity for banks on digitalizing projects. As I expressed earlier "purchases via digital money" is the norm which banks has to rethink about their current offerings.</div>
<div style="text-align: justify;">
For "purchases via digital money" ,Open Banking is the main capability that banks should have.Open Banking has become a global trend during last few years due to the regulations and obligations set by law in different regions as EU, AU. From the experiences with closely worked on open banking field the common observation which I felt was banks tried to become open banking compliant just for sake to be comply with the law. It was obvious that most of the time banks/financial institutes didn't understand the value of it. And now the time has come for banks to revisit their plans on Open Banking. Following questions and answers will help you to understand much more about open banking concept and how it's linked with digital money.</div>
<br />
<u>What's Open Banking?</u><br />
<u><br /></u>
Making bank customer data to be open for third parties as secured APIs under bank customer's given consent.<br />
<br />
<u>What type of bank customer data can be open from open banking?</u><br />
<u><br /></u>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-pp5FxTCUEhE/XpxfEY6thcI/AAAAAAAACRQ/Ry4hmuJGbX05VC9uhVzJvTM8CKZeD3pFACLcBGAsYHQ/s1600/data.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="960" src="https://1.bp.blogspot.com/-pp5FxTCUEhE/XpxfEY6thcI/AAAAAAAACRQ/Ry4hmuJGbX05VC9uhVzJvTM8CKZeD3pFACLcBGAsYHQ/s1600/data.png" /></a></div>
<u><br /></u>
<u><br /></u>
<u>What are the requirements that rise from bank customers with Covid 19 situation?</u><br />
<u><br /></u>
<br />
<ul style="text-align: left;">
<li>Do secured real time payments from bank customer account via a mobile app</li>
<li>Ability to check bank account details of multiple bank accounts from a mobile/web app</li>
<li>Ability to check bank opening hours and nearest branch/atm locations</li>
</ul>
<br />
<br class="Apple-interchange-newline" />
<u>What are the requirements that rise from merchants with Covid 19 situation?</u><br />
<div>
<u><br /></u>
<br />
<ul>
<li>Since delivery option has become the norm ,it'll be a plus point if there's a mobile app/website link with the merchants with displaying selling items and also allowing online purchases.</li>
<li>Link online purchases with real time account debits addition to credit/master cards.</li>
</ul>
</div>
<br />
<div>
<u>How Open Banking will help to support the above requirements?</u></div>
<div>
<ul style="text-align: left;">
<li>Once a bank exposed the above 3 data categories as secured APIs, then third party mobile/web app developers can be utilize the APIs and integrate to their merchant application logic.</li>
<li>Let's say if multiple banks follow above step, then the app developers can integrate all APIs to one and bank customer can just utilize the mobile app and connect to his/her bank accounts of multiple banks from same mobile app.</li>
<li>And this will help the bank customer to be stay safe in home and utilize the merchant's mobile application to do online purchases and do digital payments.</li>
</ul>
<div>
<u>What are the key features that expect from a Open Banking solution</u></div>
</div>
<div>
<u><br /></u></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-2tmmgsR_TLk/XpxwegvLn5I/AAAAAAAACRs/I5TnU2BsJn0OQl97jMuLoJlCSB5QY0nzACLcBGAsYHQ/s1600/data%2B%25281%2529.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="960" src="https://1.bp.blogspot.com/-2tmmgsR_TLk/XpxwegvLn5I/AAAAAAAACRs/I5TnU2BsJn0OQl97jMuLoJlCSB5QY0nzACLcBGAsYHQ/s1600/data%2B%25281%2529.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<u style="text-align: left;">What are the key challenges that a bank should consider when building an OB setup?</u></div>
<div>
<u><br /></u></div>
<div>
<ul style="text-align: left;">
<li>Time to market has to be fast. Thus it need to decide if the bank staff do have the required skilled set and speed to create the OB solution from scratch or it'll be easy to outsource for a separate vendor who do have already an OB solution.</li>
<li>Managing infrastructure has to be properly done. With the 'working from home' norm, cloud based solutions will match for infrastructure requirements with easy remote access. </li>
<li>Cost factor for setting up the solution and maintenance also need to be considered.For example proper resource utilizations with container based deployments as Kubernetes based setups will help to reduce the cost for VMs.</li>
</ul>
<div>
<br /></div>
</div>
<div>
<u>Conclusion</u></div>
<div>
<ul style="text-align: left;">
<li>To face the endemic situation better and to help community to be safe with proper isolation, it's really a responsibility and also an opportunity for the banks to be innovative and move forward with digital banking. Open Banking is the first footage for it and it can extend further digitally. </li>
</ul>
</div>
<div>
<br /></div>
<br />
<br />
<br />
<br />
<br /></div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com2tag:blogger.com,1999:blog-5463821059371549738.post-59594892084782640712018-11-03T10:54:00.002-07:002018-11-03T19:11:47.550-07:00What's common in Openbanking UK,Berlin NextgenPSD2, STET Specifications<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">WSO2 Open Banking solution [</span><span style="text-align: left;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://wso2.com/solutions/financial/open-banking/"><span id="goog_705769454"></span>https://wso2.com/solutions/financial/open-banking/</a></span></span><span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://www.blogger.com/">]<span id="goog_705769455"></span></a> is a purpose built solution for regulatory compliance in global regions including EU,UK [</span><span style="text-align: left;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://openbanking.wso2.com/">https://openbanking.wso2.com/</a></span></span><span style="font-family: "arial" , "helvetica" , sans-serif;">], Australia [</span><span style="text-align: left;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://wso2.com/solutions/financial/open-banking/australia/">https://wso2.com/solutions/financial/open-banking/australia/</a></span></span><span style="font-family: "arial" , "helvetica" , sans-serif;">]and new emerging countries. It helps banks to align with the regulatory needs while catering technical requirements with regulatory expertise.We have been closely working with EU/UK PSD2 compliance effort during past year and have improved the solution to cater a set of emerging specification in UK/EU for open banking as;</span></div>
<br />
<ul style="text-align: left;">
<li style="text-align: left;"><span style="font-family: "arial" , "helvetica" , sans-serif;">OpenBanking UK [<a href="https://openbanking.atlassian.net/wiki/spaces/DZ/pages/16385802/Specifications">https://openbanking.atlassian.net/wiki/spaces/DZ/pages/16385802/Specifications</a>]</span></li>
<li style="text-align: justify;"><span style="font-family: "arial" , "helvetica" , sans-serif;">Berlin NextgenPSD2 [<a href="https://www.berlin-group.org/nextgenpsd2-downloads">https://www.berlin-group.org/nextgenpsd2-downloads</a>]</span></li>
<li style="text-align: justify;"><span style="font-family: "arial" , "helvetica" , sans-serif;">STET [<a href="https://www.stet.eu/en/psd2/">https://www.stet.eu/en/psd2/</a>]</span></li>
</ul>
<br />
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">While we are working on supporting above three specifications from WSO2 Open Banking solution,interestingly there are some common factors which have been defined from each of the specifications while there are differences as well.This blog post is to write down the common defined points in each of these specifications.</span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><u>API Endpoints that banks [ASPSPs] should expose to clients [TPPs]</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Overall each of the specification defines about three main flows as below. TPPs [Third Party Provider] apps need to call each of below API endpoints in a secured manner to get bank customer [PSU] data from bank specific Open Banking solution.</span></div>
<br />
<ol style="text-align: left;">
<li style="text-align: justify;"><span style="font-family: "arial" , "helvetica" , sans-serif;">Account Information Service Endpoint - To get bank customer's account data including basic account information,balances,transactions,standing orders,products,etc. </span></li>
<li style="text-align: justify;"><span style="font-family: "arial" , "helvetica" , sans-serif;">Payment Initiation Service Endpoint- To do real time payment as a direct account transfer which could be one time,periodic or a bulk payment</span></li>
<li style="text-align: justify;"><span style="font-family: "arial" , "helvetica" , sans-serif;">Confirmation of Funds Service Endpoint- To check the funds availability of a bank customer's account or a credit card</span></li>
</ol>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Thus the Open Banking solution deployed in bank side need to expose above three endpoints as secured endpoints after connect with core banking legacy system with proper mediation level.</span><br />
<ol style="text-align: left;">
</ol>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><u>API Security</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><br /></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Each of the specifications describe two levels of security on exposed APIs by banks.</span></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-23d434bf-7fff-ae44-90a9-ddca0f8b1545"></span><br />
<ul style="margin-bottom: 0pt; margin-top: 0pt;"><span id="docs-internal-guid-23d434bf-7fff-ae44-90a9-ddca0f8b1545">
<li><i><b>Transport Layer Security</b></i></li>
</span></ul>
<span id="docs-internal-guid-23d434bf-7fff-ae44-90a9-ddca0f8b1545">
<i>Via Mutual TLS </i></span></div>
<div style="text-align: justify;">
To check the TPP send an API request with a valid certificate.The certificate validation includes Online Certificate Status Protocol (OCSP) checks & Certified Revocation Lists (CRL) checks.</div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;"><br /></span></div>
<div style="text-align: justify;">
<br />
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li><b><i>Application Layer Security</i></b></li>
</ul>
<i>eiDAS certificate validation for TPP roles</i><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="white-space: pre-wrap;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="white-space: pre-wrap;">To check the TPP has obtained the correct role [AISP/PISP/PIISP] to access the API.For example:If a TPP with the role of AISP [Accounts Information Service Provider] tries to access a Payment API endpoint from the bank,it has to fail from bank.To achieve that bank side need to read the certificate sent by TPP API request and find the role attribute value and validate it.</span></span></div>
<div style="text-align: justify;">
<i>OAuth2 and OpenID Connect support</i></div>
<div style="text-align: justify;">
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="white-space: pre-wrap;">With PSD2/Open Banking the high level scenario is the TPP [third party provider] app will able to access bank customer data on behalf of bank customer from the bank. OAuth2 is the best matching standard security protocol to cater this scenario with 3-legged OAuth2 flow. The grant types of Authorization code, client credentials and refresh are been used with OpenID Connect support for bank customer authentication.</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="white-space: pre-wrap;"><br /></span></span><span style="font-family: "arial" , "helvetica" , sans-serif;"><i>Request body/headers signature verification</i></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">There's optional requirement set by specifications to validate the request body and header to avoid man in the middle attacks.The common approach which is describing in each of the specification is to validate the signature of headers count.</span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><u>Strong Customer Authentication [SCA]</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><br /></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">TPPs will get bank customer's actual account data /do real time account payments after user granted the permissions to TPP on behalf of bank customer.To grant user consents,it's a must that bank customer should authenticate with bank and from PSD2,it has mandated embedding multi factor authentication which is also called as Strong Customer Authentication step into bank customer authentication flow. There are three ways of achieving SCA.</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<ul style="margin-bottom: 0pt; margin-top: 0pt;"></ul>
<span id="docs-internal-guid-3cd384f9-7fff-aa0f-88b0-85824c4bfa25">
</span>
<br />
<ul style="margin-bottom: 0pt; margin-top: 0pt;"><span id="docs-internal-guid-3cd384f9-7fff-aa0f-88b0-85824c4bfa25">
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Redirect approach </span></li>
</span></ul>
<span id="docs-internal-guid-3cd384f9-7fff-aa0f-88b0-85824c4bfa25">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="white-space: pre-wrap;">In this approach the bank customer authentication will happen in a user interface exposed by the bank. The TPP will redirect the PSU to bank's UI page to continue user authentication steps with SCA step included. Advantage of this step is user authentication happens at bank side web interface which is properly secured and TPP will not aware PSU credentials inputs.</span></span></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;"><br /></span></div>
<div style="text-align: justify;">
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li>Decoupled approach</li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="white-space: pre-wrap;">In this approach the bank customer authentication will happen in bank side,but no redirection will happen.Rather the user authentication will happen through a dedicated bank mobile app which has back channel communication with bank's authentication framework. Similar to redirect approach,in this approach also user authentication will handle by bank side which is a security plus point. </span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;"><br /></span></div>
<div style="text-align: justify;">
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li>Embedded approach</li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;">In this approach bank customer authenticate and authorize through TPP’s web interface,thus the TPP app calls bank side endpoints from TPP's user interface.In this approach the bank customer authentication handle by TPP side. Thus this approach is more suitable for a bank owned TPP /trusted party [eg: partner] owned TPP app to give direct access to call authentication/authorization endpoints from bank. </span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;"><br /></span></div>
<div style="text-align: justify;">
<b style="font-family: Arial, Helvetica, sans-serif;"><u>Consent Life Cycle</u></b></div>
<div style="text-align: justify;">
<b style="font-family: Arial, Helvetica, sans-serif;"><br /></b></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">From PSD2, it has mandated that prior to get access to bank customer data by TPP, the bank customer needs to provide his/her consent for the TPP. Thus the user consent management is a major feature in bank specific open banking solutions. The user consent it self has a life cycle through out the API flows for accounts and payments.For example;</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-lJbeqMvR9sU/W95U31MRuCI/AAAAAAAABbc/wRaK4q7nSZ4uhqZxEgpvAPmbqQhTM6POQCLcBGAs/s1600/OB.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="511" data-original-width="540" height="603" src="https://3.bp.blogspot.com/-lJbeqMvR9sU/W95U31MRuCI/AAAAAAAABbc/wRaK4q7nSZ4uhqZxEgpvAPmbqQhTM6POQCLcBGAs/s640/OB.png" width="640" /></a></div>
</div>
<div style="text-align: justify;">
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Received -The consent receipt has received for bank</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">AcceptedCustomerProfile -The consent has granted by the bank customer for TPP.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Rejected -The consent has rejected by bank customer to use by TPP</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Revoked -The consent has revoked by bank customer,thus TPP cannot use it.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Expired -The consent has expired.</span></li>
</ul>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The bank hosted Open Banking solution should able to manage user consents through out above life cycle statuses with ensuring data protection mechanisms while storing and retrieving.Additionally w</span><span style="font-family: "arial" , "helvetica" , sans-serif;">hen the TPP invoke actual accounts Get API call or actual payment settlement initiation call,the open banking solution need to validate the user given consent is in granted status,if only allow the API access.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<b style="font-family: Arial, Helvetica, sans-serif;"><u>Conclusion</u></b></div>
<div>
<b style="font-family: Arial, Helvetica, sans-serif;"><u><br /></u></b></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The March 2019 deadline is coming soon which is for banks to expose the sandbox environment with secured Accounts/Payments endpoints to satisfy PSD2 requirements in EU/UK region. WSO2 Open Banking solution ensures providing required technical capabilities based on specification mentioned requirements and bank specific requirements in a short time.If you are a bank still looking for an Open Banking solution,please visit </span><a href="https://wso2.com/solutions/financial/open-banking/" style="font-family: arial, helvetica, sans-serif; text-align: left;">https://wso2.com/solutions/financial/open-banking</a></div>
</div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com1tag:blogger.com,1999:blog-5463821059371549738.post-69870701589260589472018-04-18T05:11:00.001-07:002018-04-18T05:11:39.521-07:00TPP Journey through WSO2 Open Banking<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 6pt; margin-top: 18pt; text-align: justify;">
<span style="background-color: transparent; font-family: Arial; font-size: 16pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Introduction</span></h2>
<span id="docs-internal-guid-5812b68a-d89c-0e3d-2ec7-7c3535346176"></span><br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">2018 is all set to be a game-changing year for European banking. The Revised Payment Services Directive (PSD2) has opened the door to new third party providers [TPPs] to connect with banks and manage finances of bank customers on behalf of them. The PSD2 regulation has mandated banks to expose their core-banking account data and payment services to authorized TPPs to consume. Thus as a bank it’s essential to have a solution which will securely expose their internal banking services to third party providers in a trusted manner. WSO2 Open Banking solution provides all required components to expose bank APIs in a well secured manner in order to become PSD2 compliant. This article explains about the importance of the TPP role in PSD2 domain, the requirements set that banks need to provide for TPPs by PSD2 regulations and how WSO2 Open Banking solution supports these requirements. </span></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">From my last <a href="https://lalajisureshika.blogspot.com/2018/04/introduction-to-psd2-and-wso2-open.html" target="_blank">blog</a> ,I have given an introduction for PSD2 and WSO2 Open Banking solution which will helps to understand basics first before going through this blog post.</span></span></div>
<div style="text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 16pt; font-weight: 700; white-space: pre-wrap;">TPP interactions with an Open Banking system</span><span style="background-color: white;"> </span></div>
<div dir="ltr" style="background-color: white; line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">As a bank it’s essential to make sure they have setup the Open Banking [OB] system according to above mentioned XS2A requirements set by EBA ,before opening the channel of data as APIs to external parties. </span></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">To verify the bank’s OB solution’s capabilities are matched with PSD2 XS2A rule requirements, it’s essential to be aware how a TPP would engage with a bank in PSD2 domain. Following are the key steps which a TPP will interact with bank’s Open Banking system to consume exposed customer data APIs.</span></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-5812b68a-d89e-809c-a07a-e70ea631f8dc"><span style="font-size: 12pt; vertical-align: baseline;"><img height="753" src="https://lh6.googleusercontent.com/zyfS2xJBV5Hdw8ZQJbr961L3WlHZHeXRovaCDm-po6B7fffxG87ojUec8kQEl8XFL3Mg784NRalZsZ2MOnCsdHtnRagFwVgQUc42VojAxR-NMF8IqgQuYkwxO93364CWKO96DSkQ" style="border: none; transform: rotate(0rad);" width="465" /></span></span></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span><span style="font-size: 12pt; vertical-align: baseline;"><br /></span></span></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">TPP Onboarding </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">Once a bank exposed their customer data as APIs,it’s essential to have a mechanism to only allow the APIs to be consumed by trusted third party payment service providers in a secured manner. For that, a proper TPP registration process has to be integrated with bank’s Open Banking system. For example,there has to be mechanisms to validate whether the requested TPP is a real authorized entity through an authorized competent authority ,validate the TPP information and then only allow access to OB system. Additionally according to the Article 29 in Regulatory Standard on Strong Customer Authentication [1],it mandates on obtaining qualified certificates for TPPs for the purpose of identification and from bank side the TPP certificates need to be validated.</span></span></div>
<div style="text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Establish Secure Communication</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">According to the Article 21, 27 and 29 in Regulatory Standard on Strong Customer Authentication [1], it has mentioned to ensure the security of the software, communication protocol between TPP and the Payment Service User and the communication between banks and the TPP. Such that both banks and TPP parties has to obtain trusted and qualified certificates and need to share the public certificates among each. And the transferring data between bank and TPP need to verify for integrity, authenticity and non-repudiation.</span></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b style="font-weight: normal;"><br /></b></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Sandbox Testing</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">According to the Article 27 in Regulatory Standard on Strong Customer Authentication [1],it has mandated banks to make available a testing environment facility, including support for connection and functional testing by authorized Payment Service Providers that have applied for the relevant authorization, to test their software and applications used for offering a payment service to users while no sensitive data is transferred in testing environment. Such that once a trusted TPP on-boarded to bank’s OB system,it need to provide the sandbox testing access for bank’s exposed APIs.</span></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 12pt; text-align: left; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Go live with the TPP [PISP /AISP] application </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">Once the TPP team developed and tested their third party application with sandbox environment of bank’s OB system,then they could request the production environment access for available APIs from banks. This can be through a custom approval process. Then banks will validate the application and provide the production access.</span></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<b id="docs-internal-guid-5812b68a-d89f-42f8-d667-61be7336fe95" style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">TPP Usage Analytics </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">Once the TPP application is live, TPP owner wants to see the usage of the bank’s APIs from the application in order to understand how much traffic is getting for each used bank APIs through the application for monetization purposes. For example; how many end users have consumed the third party application, who are the top users, how many transactions happened during a specific time period, what’s the highest and lowest used bank APIs from the application. From an open banking solution there has to way to expose these data for TPP owners as dashboards or APIs to monitor the business statistics.</span></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Get notifications on new versions /API life-cycle changes</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">According to the Article 27 in Regulatory Standard on Strong Customer Authentication [1],it has mandated to notify the TPPs about any change for the technical specification of the bank exposed interfaces except in emergency situations in advance as soon as possible and not less than 3 months before the change is implemented.</span></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">Thus there has to have a mechanism to acknowledge TPPs who are already consuming existing bank APIs to notify any version changes or functional changes of the APIs.</span></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Acknowledge and act on Bank service downtime and backup situations </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">According to the Article 28 in Regulatory Standard on Strong Customer Authentication [1], banks need to include a strategy and plans for an unplanned unavailability of the interface and systems breakdown. The strategy need to include communication plans to inform TPPs making use of the dedicated interface in case of breakdown, measures to bring the system back to business as usual and a description of alternative options that TPPs may make use of during the unplanned downtime. This will ensure that third party applications will run even in a bank system breakdown with using bank fallback options provided.</span></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">It’s critical for a bank to select the best PSD2 compliant Open Banking solution which cater all above main requirements to connect the bank with TPPs under PSD2 XS2A rule. </span></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 12pt; white-space: pre-wrap;"><br /></span></div>
<h2 dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 11pt; margin-top: 11pt; text-align: justify;">
<span style="background-color: transparent; font-family: Arial; font-size: 16pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">TPP Journey through WSO2 Open Banking</span></h2>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 11pt; margin-top: 11pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">WSO2 Open Banking[OB] solution provides a comprehensive capabilities set to facilitate interactions between TPPs and banks in a well secured manner thus bank customers can utilize third party applications of TPPs which are connected to exposed APIs from banks.</span></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 11pt; margin-top: 11pt; text-align: justify;">
<span style="background-color: transparent; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">TPP On-boarding </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 11pt; margin-top: 11pt; text-align: justify;">
<span style="background-color: transparent; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Arial, Helvetica, sans-serif;">Provides a well defined user interface for TPP owners to register to Open Banking solution for consuming bank APIs. This user interface will allow TPPs to enter their authorized details as TPP identification number, Country of authorization, Contact details, etc based on the EU regional on-boarding requirements. In addition to that it can easily engage a bank specific customized on-boarding requests verification process including human interactions also to the TPP on-boarding process. For example - if a bank has a TPP on-boarding requirement of “A TPP on-boarding request need to approve by multiple officers in the bank”, this type of human interactions included approval process can integrate with WSO2 OB solution. </span></span><span style="background-color: transparent; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">
</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span id="docs-internal-guid-5812b68a-d8a0-0a02-e9df-27a838612622"></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 11pt; margin-top: 11pt; text-align: justify;">
<span style="font-family: Arial; font-size: 12pt; font-weight: 700; white-space: pre-wrap;">Establish Secure Communication</span></div>
<span id="docs-internal-guid-5812b68a-d8a0-44ac-23e7-ef312b0bf9b5"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">WSO2 Open Banking solution is capable of establishing a secured communication channel between the TPP and bank with verifying the exchanging digital certificates among the two parties with the capabilities of identity management and security features as asymmetric key encryption, OAuth2 Private Key JWT Authentication,mutual authentication support. Addition to that WSO2 OB supports, signing the transferring data with digital certificates for ensure integrity and non-repudiation.</span></span></div>
<br /><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 12pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Sandbox Testing</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">Once the TPP owner got approval for OB developer portal access ,he can view available APIs and first try out testing the APIs which are pointed to sandbox environments. The necessary API documentation including steps on API invocation flow will be displayed in OB developer portal. And to test the APIs inline, swagger based API console also embedded with OB developer portal. Thus a TPP owner could obtain sandbox environment specific access keys and try out invoking sandbox APIs to test out API functionalities.</span></span></div>
<br /><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 12pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Go live with the TPP [PISP /AISP] application </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">Once the TPP team is ready for getting live traffic to their custom application, they have to switch from integrating sandbox endpoints of APIs of banks to production ready endpoints of the APIs of the bank. For that TPP can request for production access via WSO2 OB system and get the access once he got approval after the production access validation process. This production access validation process can be customized based on bank’s custom requirements and if need it can disable production access validation process and give TPPs automatic access to production without further validations. </span></span></div>
<span id="docs-internal-guid-5812b68a-d8a0-7dee-93ae-32c81cf7821a"><br /><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 12pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">TPP Usage analytics </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">The developer portal of WSO2 Open Banking solution consists of business dashboard views which are important for a TPP owner. For example ,the available dashboards in developer portal provide the analysed data about API consumption from TPP application,who are the top users of the third party application, how many faulty API invocations have happened from TPP’s application,likewise. Thus the TPP owners can utilize these available dashboards for billing purposes and identify loyalty customers of their applications.If it further need, the available TPP specific data can be fetch through a REST endpoint,thus a third party analytics tool can be configured to provide custom business insights as TPP wants.</span></span></div>
<br /><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 12pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Get notifications on new versions /API lifecycle changes</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">WSO2 Open Banking solution provides comprehensive API Management capabilities including API versioning support. Addition to that,it’s possible to configure a notification to be alerted when a new API version created. The notification can be a email, sms or other output format according to bank’s requirement. This way it can achieve the requirement mentioned in the Article 27 of Regulatory Standard on Strong Customer Authentication [1],of mandating notify the TPPs about changes of the technical specification, bank exposed interfaces in advance.</span></span></div>
<span id="docs-internal-guid-5812b68a-d8a0-c309-1358-6317c9b1e9a1"><br /><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 12pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Acknowledge and act on Bank service downtime and backup situations </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;">High availability and scalability factors are highly considered on WSO2 Open banking solution deployments and these factors are configured with solution’s inbuilt clustering support. Thus when a server goes down,it can route to another working server node via a load balancing rule easily without affecting the service up time. And the OB solution supports integrate with third party tools to monitor the server memory,cpu usage and other server specific information via inbuilt jmx monitoring capability. This way via third party tools,it can set alerts to notify the bank IT administrators when an abnormal behavior monitored in the running servers. Same way, WSO2 OB solution can be configured to send alerts, if the back-end system [eg: core-banking system] is down.</span></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial;"><span style="white-space: pre-wrap;"><br /></span></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: transparent; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[1] </span><a href="https://www.eba.europa.eu/documents/10180/1761863/Final+draft+RTS+on+SCA+and+CSC+under+PSD2+%28EBA-RTS-2017-02%29.pdf" style="text-decoration: none;"><span style="background-color: transparent; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://www.eba.europa.eu/documents/10180/1761863/Final+draft+RTS+on+SCA+and+CSC+under+PSD2+%28EBA-RTS-2017-02%29.pdf</span></a></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span id="docs-internal-guid-5812b68a-d8a7-18da-85d4-7d846c4717e9"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; font-size: 12pt; vertical-align: baseline; white-space: pre-wrap;">[2] </span><a href="https://www.eba.europa.eu/documents/10180/1904583/Final+Guidelines+on+Authorisations+of+Payment+Institutions+%28EBA-GL-2017-09%29.pdf" style="text-decoration: none;"><span style="background-color: white; font-size: 12pt; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://www.eba.europa.eu/documents/10180/1904583/Final+Guidelines+on+Authorisations+of+Payment+Institutions+%28EBA-GL-2017-09%29.pdf</span></a></span></span></div>
<div>
<span style="font-family: Arial; font-size: 12pt; white-space: pre-wrap;"><br /></span></div>
<div>
<span style="font-family: Arial; font-size: 12pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
</span><div>
<span style="font-family: Arial; font-size: 12pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
</span><div>
<span style="font-family: Arial; font-size: 12pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
</span><div>
<span style="font-family: Arial; font-size: 12pt; white-space: pre-wrap;"><br /></span></div>
<div>
<span style="background-color: transparent; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div>
<span style="background-color: transparent; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; font-family: Arial; font-size: 12pt; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;"><br /></span></div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com4tag:blogger.com,1999:blog-5463821059371549738.post-37651152697821614682018-04-16T09:24:00.001-07:002018-04-18T04:48:45.812-07:00Introduction to PSD2 and WSO2 Open Banking<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="line-height: 1.8; margin-bottom: 6pt; margin-top: 18pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Overview of PSD2</span></h2>
<div style="text-align: justify;">
<b id="docs-internal-guid-5812b68a-cf3a-e5ae-7644-f92b61ef39f1" style="font-weight: normal;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></b></div>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The Revised Payment Services Directive (PSD2) of the European Union, seeks to improve the existing European rules for electronic payments. </span></span><span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;">PSD2 deadline is already elapsed and being compliant of PSD2 has become top in the priority list of majority of EU banks and financial institutions. </span><span style="color: black; font-family: "arial" , "helvetica" , sans-serif; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: white; color: black; font-family: "arial" , "helvetica" , sans-serif; vertical-align: baseline; white-space: pre-wrap;">In short, PSD2 enables bank customers, both consumers and businesses, to allow third-party providers to manage their finances. </span><span style="background-color: white; color: black; font-family: "arial" , "helvetica" , sans-serif; vertical-align: baseline; white-space: pre-wrap;"> </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></div>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">PSD2 </span><span style="background-color: transparent; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">sets out rules concerning:</span></span><br />
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Strict security requirements for electronic payments and the protection of consumers' financial data, guaranteeing safe authentication and reducing the risk of fraud;</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">The transparency of conditions and information requirements for payment services;</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">The rights and obligations of users and providers of payment services.</span></li>
</ul>
</div>
<div dir="ltr" style="background-color: white; line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;">The core of the directive is the requirement for banks to open bank data as APIs to third parties under the XS2A (access to account) rule. With the adoption of PSD2, the playing field is finally level for third party payment providers [TPPs] which could be startups in the FinTech space </span></span><span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;">which banks have to interact with this additional party to provide services to banking customers. </span><span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;">Thus it’s essential to identify and select the best fit Open Banking solution for a bank with evaluating the capabilities offered to satisfy PSD2 requirements set by EBA. </span></div>
<h2 style="background-color: white; line-height: 1.8; margin-bottom: 8pt; margin-top: 18pt; padding: 0pt 18.75pt 0pt 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">What will change with PSD2</span></span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><img height="300" src="https://lh5.googleusercontent.com/IpkRTB6oJspQxbYenz0sxHZ5ULnPnOnMNBrmIQH-KsJmd_-viMLp4Hkb2UeVGiRk8qICQy8cReKbtu21DMJibC6o0Xd8mGNK7jVRv-Is_zXAohO9LEbSPHamFU4UtixUECQ99yYJ" style="border: none; transform: rotate(0rad);" width="624" /></span></span></div>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: white; list-style-type: disc; margin-left: -7pt; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; padding: 0pt 18.75pt 0pt 0pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="white-space: pre-wrap;">Access to the Account [XS2A] via APIs enables the provision of entirely new types of services which are regulated under PSD2 as payment initiation & accounts information provided by payment initiation service providers (PISPs) and account information service providers (AISPs).
Through PISPs, third parties will be able to initiate online payments to an e-merchant or other beneficiary directly from the payer’s bank account via an online portal.
Introduction of online payments via direct account transfers in real time will dominate the existing EU region based online payment methods and affect existing card payment surcharges to be less.
Through AISPs, third parties will be able to aggregate customers’ account information data, including transaction history and balances across multiple banks and banking consumers with a consolidated view of their financial picture.
The threat to banks from Access to Account by TPP’s with PSD2 in effect will be loss of fees from card-based transactions and loss of customer ownership and insight.</span></span></div>
</li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="white-space: pre-wrap;"><br /></span></span><span style="color: black; font-family: "arial" , "helvetica" , sans-serif; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Who are Third-party Payment Service Providers[TPPs] </span><span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif;"> </span><br />
<div dir="ltr" style="background-color: white; line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></span>
<span style="background-color: white; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;">The main scope of PSD2 is to provide better customer experiences to Banking consumers by encouraging new players to enter the payment market, and it will happen by the mandating requirement for banks to “open up the bank account information” to external parties with customer’s consent. </span></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;">These Third Party Payment Providers (TPP) are divided into two types:</span></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">PISP (payment initiation Service providers) </span></li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Initiate online payments from the payer’s bank account. This new payment service provider type will actively disrupt the existing payment options for online payments as well as offering cost effective and faster API-based P2P payment solutions. </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Currently (SEPA) Credit Transfers and debit cards are available in EU region, which are both offered only by the account holder’s own bank. In the future consumers will see several different payment options that can move money from the account in real time.</span><br />
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">AISP (Account Information Service Providers) </span></li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;">A Service Provider, which extracts and aggregates bank customers’ account data, including transaction history and account balance from the APIs exposed from different banks in EU region. Eventually this aggregated account information can be used by AISP to analyze behavioral patterns of user such as spending patterns and provide recommendations based on the customer data. </span></div>
<h2 dir="ltr" style="background-color: white; line-height: 1.8; margin-bottom: 6pt; margin-top: 18pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: x-small;"><span style="font-size: large; white-space: pre-wrap;">Benefits for TPPs by PSD2 </span></span></h2>
<h2 dir="ltr" style="background-color: white; line-height: 1.8; margin-bottom: 6pt; margin-top: 18pt; text-align: justify;">
<ul>
<li><span style="font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: small;">More opportunities for fintech startups to enter the financial services ecosystem through new innovative application ideas by connecting to bank exposed APIs.</span></span></li>
<li><span style="font-weight: normal;"><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: small;">C</span></span><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: small; font-weight: normal;">ompetitive market will lead to the introduction of more innovative payment methods, analytics on customer accounts data and grab customers attention.</span></li>
</ul>
</h2>
<h2 dir="ltr" style="background-color: white; line-height: 1.8; margin-bottom: 6pt; margin-top: 18pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: x-small;"><span style="font-size: large; white-space: pre-wrap;">Benefits for Bank Customers by PSD2</span></span></h2>
<h2 dir="ltr" style="background-color: white; line-height: 1.8; margin-bottom: 6pt; margin-top: 18pt; text-align: justify;">
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: small; font-weight: normal;">Instant payment settlements through direct account transfers lead to easiness and time saving.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: small; font-weight: normal;">Service charges for transactions will be eventually less.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: small; font-weight: normal;">More competitive and innovative payment methods to select.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: small; font-weight: normal;">Able to view details of multiple bank accounts from a single view ,thus no need to login to different bank systems separately.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: small; font-weight: normal;">More innovative ways to identify spending patterns from bank accounts and give predictive insights based on account history.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: small; font-weight: normal;">Requirements to support for PSD2 TPP XS2A rule</span></li>
</ul>
</h2>
<ul style="margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
</ul>
<div dir="ltr" style="background-color: white; line-height: 1.8; margin-bottom: 8pt; margin-top: 0pt; text-align: justify;">
<h2>
<span style="background-color: white; color: black; font-style: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Requirements for banks</span></span></h2>
</div>
<div dir="ltr" style="background-color: white; line-height: 1.8; margin-bottom: 8pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;">According to European Banking Authority [EBA] Regulatory Technical Standard in Strong Customer Authentication [RTS SCA][1] ,it has included some requirements to be supported by banks when they exposed customer data through APIs to third party payment providers under XS2A rule as below.</span></span><br />
<br />
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Banks to offer at least one interface to allow TPPs to carry out their services </span></li>
</ul>
<span style="background-color: white; color: black; vertical-align: baseline;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="white-space: pre-wrap;"> Eg: Request and receive accounts information – for AISPs
Initiate a payment order – for PISPs
</span></span></span><br />
<ul><span style="background-color: white; color: black; vertical-align: baseline;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="white-space: pre-wrap;">
<li>Banks need to ensure that the technical specification of the interface is documented and provided, at no charge, upon request by authorized TPPs that have applied with their competent authorities for the relevant authorization.</li>
<li>If a dedicated interface is offered, the performance and availability has to be same as in direct services accessing by bank customers. </li>
<li>Rules and scope of the data exchanges between the service providers-Eg:ISO 20022 message formats</li>
<li>Need to ensure security of communication between the service providers with adhering to eiDAS certificate validation</li>
</span></span></span></ul>
<h2>
<span style="background-color: white; color: black; vertical-align: baseline;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><u style="white-space: pre-wrap;">Requirements for TPPs</u></span></span></h2>
</div>
<div dir="ltr" style="background-color: white; line-height: 1.8; margin-bottom: 8pt; margin-top: 0pt; text-align: justify;">
<br />
<div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="white-space: pre-wrap;">PISPs and AISPs must have access to communicate with bank systems to enable them to carry out their services, as requested by bank customers.</span></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="white-space: pre-wrap;">TPPs must comply with the obligations set out in PSD2 and the accompanying EBA Regulatory Technical Standards mentioned requirements. For example -TPPs must follow the guidelines of on authorization and registration under PSD2 document [2]. </span></span></div>
</div>
</div>
<ul style="margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
</ul>
<h2 style="background-color: white; line-height: 1.8; margin-bottom: 6pt; margin-top: 18pt; text-align: justify;">
<span style="font-size: large;">About WSO2 Open Banking</span></h2>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 10pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">WSO2 Open Banking Solution[</span><a href="https://wso2.com/solutions/financial/open-banking/" style="text-decoration: none;"><span style="background-color: white; color: #1155cc; font-style: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://wso2.com/solutions/financial/open-banking/</span></a><span style="background-color: white; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">] provides all the technology requirements that Banks need to create an “Open Banking” platform to be PSD2 compliant and as a result become a Digitally Transformed Bank. </span></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b style="font-weight: normal;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></b></span></div>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 10pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><img alt="Open Banking.png" height="492" src="https://lh6.googleusercontent.com/rH4P08E0FZiE18ZN0KFQ2tQh6MEV84VSUSd1CZ56jIFFp45va80RWyiARVdLG0hayvg8WJp4uXOfTxM7q1dTTwn7ML59GtyPzJ8d5CLo0ufavEs9FOPjONWYVkh-CW21c1fS7wUp" style="border: none; transform: rotate(0rad);" title="" width="640" /></span></span></div>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 10pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;">The above diagram explains the overall components architecture of PSD2 and where WSO2 Open Banking solution initially fits in. Once the WSO2 Open Banking Solution deployed in a bank, bank will expose their internal core banking and payment service data as RESTful APIs through WSO2 Open Banking solution. Then trusted TPPs will authorize and consume the exposing APIs from their custom applications to aggregate different banks’ exposed APIs and provide the end user that means the bank customer a consolidated view of his/her bank data in a secured manner.</span></span></div>
<h2 style="line-height: 1.8; margin-bottom: 6pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-style: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Key Offerings from WSO2 Open Banking</span></span></h2>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;">The key offerings that are provided through the Open Banking Solution to satisfy the PSD2 technical requirements are as below.</span></span><br />
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Provides comprehensive API management platform support including API governance and run time.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Support for different PSD2 API specifications as openbanking.uk , berlin NextgenPSD2.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Identity access management and security capabilities for PSD2 including API security and Strong Customer Authentication requirements.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Inbuilt support for bank customers’ consent management facility.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Support for TPP interactions with banks including TPP onboarding.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Integration points with core-banking systems</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">API analytics and more powerful business insights</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">GDPR compliance</span></li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;">For more information visit the live demo site <a href="https://openbanking.wso2.com/" target="_blank">openbanking.wso2.com</a> of WSO2 Open Banking solution.</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b style="font-weight: normal;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></b></span></div>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[1] </span><a href="https://www.eba.europa.eu/documents/10180/1761863/Final+draft+RTS+on+SCA+and+CSC+under+PSD2+%28EBA-RTS-2017-02%29.pdf" style="text-decoration: none;"><span style="background-color: transparent; font-style: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://www.eba.europa.eu/documents/10180/1761863/Final+draft+RTS+on+SCA+and+CSC+under+PSD2+%28EBA-RTS-2017-02%29.pdf</span></a></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></span></div>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; font-style: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[2] </span><span style="background-color: white; font-style: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><a href="https://www.eba.europa.eu/documents/10180/1904583/Final+Guidelines+on+Authorisations+of+Payment+Institutions+%28EBA-GL-2017-09%29.pdf" style="text-decoration: none;">https://www.eba.europa.eu/documents/10180/1904583/Final+Guidelines+on+Authorisations+of+Payment+Institutions+%28EBA-GL-2017-09%29.pdf</a></span></span></div>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com0tag:blogger.com,1999:blog-5463821059371549738.post-76203309743493447892017-05-25T04:35:00.000-07:002017-05-25T04:38:55.793-07:00CORS support from WSO2 API Manager 2.0.0<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif;">Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources on a web page to be requested from another domain outside the domain from which the first restricted resource was served.</span></div>
<div style="text-align: justify;">
<span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="border: 0px; margin-bottom: 24px; padding: 0px; text-align: justify;">
<span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif;">For example, an HTML page of a web application served from http://domain-a.com makes an <img src > request for a different domain as 'domain-b.com' to get an image via an API request. </span></div>
<div style="border: 0px; margin-bottom: 24px; padding: 0px; text-align: justify;">
<span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif;">For security reasons, browsers restrict cross-origin HTTP requests initiated from within scripts as in above example and only allows to make HTTP requests to its own domain. To avoid this limitation modern browsers have been used CORS standard to allow cross domain requests. Modern browsers use CORS in an API container - such as <code style="border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; word-wrap: break-word;">XMLHttpRequest</code> or Fetch - to mitigate risks of cross-origin HTTP requests.Thing to note is it's not only sufficient that the browsers handle client side of cross-origin sharing,but also the servers from which these resources getting need to handle server side cross-origin sharing. WSO2 API Manager is fully capable of handling cross-origin sharing for its exposed APIs from gateway.This feature was there in WSO2 API Manager from 1 .x version series and in 2.x onwards it has more improved.</span></div>
<div style="border: 0px; margin-bottom: 24px; padding: 0px;">
<span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif;">Let's first start with understanding more about the CORS protocol.</span></div>
<div style="border: 0px; margin-bottom: 24px; padding: 0px;">
<span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif;"><b>What's CORS</b></span></div>
<div style="margin-bottom: 1.25em; margin-top: 1.25em;">
<span style="background-color: white;"><span style="font-family: "arial" , "helvetica" , sans-serif;">The CORS protocol consists of a set of headers that indicates whether a response can be shared cross-origin.The CORS specification distinguishes two different requests done from browser.</span></span></div>
<div style="margin-bottom: 1.25em; margin-top: 1.25em;">
<span style="background-color: white;"><span style="font-family: "arial" , "helvetica" , sans-serif;">1. Simple requests- A cross origin request from browser which a HTTP GET,HEAD or POST [with content-type <code style="box-sizing: border-box; text-align: justify;">text/plain</code><span style="text-align: justify;">,</span><span style="text-align: justify;"> </span><code style="box-sizing: border-box; text-align: justify;">application/x-www-form-urlencoded</code><span style="text-align: justify;"> </span><span style="text-align: justify;">and</span><span style="text-align: justify;"> </span><code style="box-sizing: border-box; text-align: justify;">multipart/form-data</code><span style="text-align: justify;">.</span>]</span></span></div>
<div style="margin-bottom: 1.25em; margin-top: 1.25em;">
<span style="background-color: white;"><span style="font-family: "arial" , "helvetica" , sans-serif;">2. Preflighted requests- A cross origin request from browser other than above simple request type will do an additional request with HTTP OPTIONS method to check the resource server understand about cross-domain requests.</span></span></div>
<div style="margin-bottom: 1.25em; margin-top: 1.25em;">
<span style="background-color: white;"><span style="font-family: "arial" , "helvetica" , sans-serif;">Note,if you add Authentication header to simple requests,those will become preflighted ones.</span></span></div>
<div style="margin-bottom: 1.25em; margin-top: 1.25em;">
<span style="background-color: white;"><span style="font-family: "arial" , "helvetica" , sans-serif;">With above two types of requests,the client [browser] and the server will exchange a set of specific headers for cross-domain requests as below.</span></span></div>
<div style="margin-bottom: 1.25em; margin-top: 1.25em;">
</div>
<ol style="text-align: left;">
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"><code style="box-sizing: border-box; text-align: justify;">Origin</code><span style="background-color: white; text-align: justify;">: this header is used by the client to specify which domain the request is executed from. The server uses this to allow/not, the cross-domain request.</span></span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"><code style="box-sizing: border-box; text-align: justify;">Access-Control-Request-Method</code><span style="background-color: white; text-align: justify;">: with the preflighted requests, the </span><code style="box-sizing: border-box; text-align: justify;">OPTIONS</code><span style="background-color: white; text-align: justify;"> request from client sends this header to check if the target HTTP method is allowed for cross-domain requests by the server.</span></span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"><code style="box-sizing: border-box; text-align: justify;">Access-Control-Request-Headers</code><span style="background-color: white; text-align: justify;">: with the preflighted requests, the </span><code style="box-sizing: border-box; text-align: justify;">OPTIONS</code><span style="background-color: white; text-align: justify;"> request sends this header to check if headers are allowed for the target method of cross-domain requests.</span></span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"><code style="box-sizing: border-box; text-align: justify;">Access-Control-Allow-Credentials</code><span style="background-color: white; text-align: justify;">: this specifies if credentials are supported for cross-domain requests.</span></span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"><code style="box-sizing: border-box; text-align: justify;">Access-Control-Allow-Methods</code><span style="background-color: white; text-align: justify;">: the server uses this header to acknowledge client which HTTP verbs are allowed for cross domain request. This is typically included in the response headers from server for preflighted requests.</span></span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"><code style="box-sizing: border-box; text-align: justify;">Access-Control-Allow-Origin</code><span style="background-color: white; text-align: justify;">: the server uses this header to acknowledge client which domains are authorized for the request.</span></span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"><code style="box-sizing: border-box; text-align: justify;">Access-Control-Allow-Headers</code><span style="background-color: white; text-align: justify;">: the server uses this header to tell which headers are allowed for therequest. </span>This is typically included in the response headers from server for preflighted requests.</span></li>
</ol>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><br /></b></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b>WSO2 API Manager support for CORS</b></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><br /></b></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">The above requirement mostly came with the web application developers who used WSO2 API Manager deployed API resources in their web applications.Most of the time,since the WSO2 API Manager domain and web application domain is different,when accessing such API resources from browser based web applications,support for CORS specification was identified as an essential feature.</span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">By default,WSO2 API Manager handle setting CORS headers in it's gateway component itself without passing the CORS requests to back-end to handle CORS scenario.</span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">There's a synapse based handler called <span style="background-color: white;">CORSRequestHandler which will be handle CORS support for each API invocation.</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">The flow would be as below for default API invocations.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://4.bp.blogspot.com/-_bcvRdFgh_w/WSa3xP2BwDI/AAAAAAAABUE/q0Ep_oc0pWEVjdiwCixADp9UhqNFic8hQCLcB/s1600/CORS_not_supported.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="720" data-original-width="960" src="https://4.bp.blogspot.com/-_bcvRdFgh_w/WSa3xP2BwDI/AAAAAAAABUE/q0Ep_oc0pWEVjdiwCixADp9UhqNFic8hQCLcB/s1600/CORS_not_supported.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">default flow</td></tr>
</tbody></table>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<ul style="box-sizing: border-box; font-family: "Source Sans Pro", sans-serif; font-size: 16px; list-style-type: none; margin: 10px 0px; padding: 0px 0px 0px 10px; text-align: justify;">
<li></li>
</ul>
<div style="background-color: white; font-family: "Helvetica Neue", sans-serif, "Droid Sans Fallback"; font-size: 16px; margin-bottom: 1.25em; margin-top: 1.25em;">
<br /></div>
<div style="background-color: white; font-family: "Helvetica Neue", sans-serif, "Droid Sans Fallback"; font-size: 16px; margin-bottom: 1.25em; margin-top: 1.25em;">
When an API request comes to APIM gateway ,the defined CORSHandler in each API will be executed in request and response flow.By default when create APIs from API Publisher,the 'OPTIONS' resource is hidden to defined in API resource section as below.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-CHEivRFf_S4/WSa6SF_JJGI/AAAAAAAABUQ/pDhkvtpWnXY3hbpYfjN__6H1IOPEAPF6gCLcB/s1600/asw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="212" data-original-width="1151" height="117" src="https://1.bp.blogspot.com/-CHEivRFf_S4/WSa6SF_JJGI/AAAAAAAABUQ/pDhkvtpWnXY3hbpYfjN__6H1IOPEAPF6gCLcB/s640/asw.png" width="640" /></a></div>
<div style="background-color: white; font-family: "Helvetica Neue", sans-serif, "Droid Sans Fallback"; font-size: 16px; margin-bottom: 1.25em; margin-top: 1.25em;">
<br /></div>
<div style="background-color: white; font-family: "Helvetica Neue", sans-serif, "Droid Sans Fallback"; font-size: 16px; margin-bottom: 1.25em; margin-top: 1.25em;">
<br /></div>
<div style="background-color: white; margin-bottom: 1.25em; margin-top: 1.25em; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">If an API creator specifically want to handle the CORS preflight call from backend,instead APIM gateway;he can click on 'More' section in design tab as in above image and specifically select the 'OPTIONS' resource as an API resource.Else,if the API creator didn't select the 'OPTIONS' verb as an API resource,the CORS will be handle by APIM gateway itself;as shows in above image flow.At the request path,CORS handler validate the incoming request method first.If it's an 'options' call,it checks the synapse API xml contains a resource for 'OPTIONS'.If not,the CORS Handler will set the CORS specific headers <span style="background-color: transparent; text-align: justify;">Access-Control-Allow-Methods,</span><span style="background-color: transparent; text-align: justify;">Access-Control-Allow-Headers,</span><span style="background-color: transparent; text-align: justify;">Access-Control-Allow-Origin from gateway itself and pass back the response code as 200 with the CORS headers to the client.Then client will initiate the actual cross domain request with specific HTTP method and it'll process as in above image 'default flow'.</span></span></div>
<div style="background-color: white; margin-bottom: 1.25em; margin-top: 1.25em; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; text-align: justify;">If the API creator want to handle CORS from the actual backend,then he can specifically define the 'OPTIONS' verb at API creation time and at the run time flow will be as below.</span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-ckDPmVNqtzs/WSa76ZqF5CI/AAAAAAAABUg/oG3mCullKLwqCKNB5UmjNJiOaMEGmT1nQCLcB/s1600/CORS_supported.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="960" src="https://1.bp.blogspot.com/-ckDPmVNqtzs/WSa76ZqF5CI/AAAAAAAABUg/oG3mCullKLwqCKNB5UmjNJiOaMEGmT1nQCLcB/s1600/CORS_supported.jpg" /></a></div>
<div style="background-color: white; margin-bottom: 1.25em; margin-top: 1.25em; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; text-align: justify;"><b><br /></b></span></span></div>
<div style="background-color: white; margin-bottom: 1.25em; margin-top: 1.25em; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; text-align: justify;"><b>How WSO2 APIM Gateway set CORS headers</b></span></span></div>
<div style="background-color: white; margin-bottom: 1.25em; margin-top: 1.25em; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; text-align: justify;">From API Manager 2.0 onwards,API creators can define </span><span style="background-color: transparent;">Access-Control-Allow-xx headers per API from API Publisher or globally from api-manager.xml </span><span style="background-color: transparent; text-align: left;"> <corsconfiguration> config section </corsconfiguration></span><span style="background-color: transparent;">as in previous releases.</span></span></div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://3.bp.blogspot.com/-J0KWY4-q6H0/WSa8ymH-rQI/AAAAAAAABUo/dQOiP91que48kuVf9TDbMwgjePX0jO3TwCLcB/s1600/sd.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1101" data-original-width="1405" height="501" src="https://3.bp.blogspot.com/-J0KWY4-q6H0/WSa8ymH-rQI/AAAAAAAABUo/dQOiP91que48kuVf9TDbMwgjePX0jO3TwCLcB/s640/sd.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Add CORS headers per API at API creation time</td></tr>
</tbody></table>
<div style="background-color: white; margin-bottom: 1.25em; margin-top: 1.25em; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">At runtime ,when an API request come to gateway,with CORS support feature of gateway,the Access-Control allow headers will be set with below validations.</span></div>
<ol>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"><code style="box-sizing: border-box; text-align: justify;">Access-Control-Allow-Origin</code><span style="background-color: white; text-align: justify;">: </span>API gateway checks if the incoming request contains a header as 'Origin' and if yes,it'll compare that header value with the '<span style="text-align: justify;">Access-Control-Allow-Origin</span>' value defined in CORS configuration per API/globally in APIM side.If that origin header is defined in APIM side under CORS config section also,then return back that origin header value as Access-Control-Allow-Origin.Else if the request doesn't send an origin header and if in APIM side Access-Control-Allow-Origin is defined as '*',then APIM gateway will return the Access-Control-Allow-Origin header as '*'.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"><code style="box-sizing: border-box; text-align: justify;">Access-Control-Allow-Methods</code><span style="background-color: white; text-align: justify;">: APIM gateway checks if the particular API specific CORS config has defined such value or in api-manager.xml CORS config section this value is defined.If yes,then match with the actual defined API resource methods in that API and return only the matched method names as Access-Control-Allow-Methods response header.</span></span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"><code style="box-sizing: border-box; text-align: justify;">Access-Control-Allow-Headers</code><span style="background-color: white; text-align: justify;">: APIM gateway will check if the particular API's CORS configuration/globally has defined a value for </span>Access-Control-Allow-Headers,if yes,respond to client with that value as 'Access-Control-Allow-Headers' header.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"><code style="box-sizing: border-box; text-align: justify;">Access-Control-Allow-Credentials</code><span style="background-color: white; text-align: justify;">: </span>APIM gateway will check if the particular API's CORS configuration/globally has defined a value for Access-Control-Allow-Credentials,if yes and if it set as false,gateway will directly respond to client with that value as 'Access-Control-Allow-Credentials' header.If that value set as true in CORS configurations of APIM side,there's a check to see the value of Access-Control-Allow-Origin in gateway side.If it's not '*',then respond to client with '<code style="box-sizing: border-box; text-align: justify;">Access-Control-Allow-Credentials<span style="background-color: white;">' header as true.Else as false.</span></code></span></li>
</ol>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Hope,now you'll be have a basic understanding about how CORS works and how WSO2 API Manager supports it. </span><span style="font-family: "arial" , "helvetica" , sans-serif;">For more info,refer</span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">[1]<span style="text-align: left;"><a href="https://docs.wso2.com/display/AM200/Enabling+CORS+for+APIs">https://docs.wso2.com/display/AM200/Enabling+CORS+for+APIs</a></span></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="text-align: left;">[2] </span><span style="text-align: left;"><a href="https://www.w3.org/TR/cors/">https://www.w3.org/TR/cors/</a></span></span></div>
<div style="text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">[3] <a href="https://www.eriwen.com/javascript/how-to-cors/">https://www.eriwen.com/javascript/how-to-cors/</a></span></div>
<div style="background-color: white; margin-bottom: 1.25em; margin-top: 1.25em; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="background-color: white; border: 0px; margin-bottom: 24px; padding: 0px;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="background-color: white; border: 0px; margin-bottom: 24px; padding: 0px;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<br /></div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com0tag:blogger.com,1999:blog-5463821059371549738.post-83130581466873279302016-03-10T03:36:00.001-08:002016-05-11T00:07:24.550-07:00Sharing applications and subscriptions across multiple application developers through WSO2 API Store<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b"><span style="font-family: "arial" , "helvetica" , sans-serif;"></span></span><br /></span>
</span><br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">In previous WSO2 APIM versions before 1.9.0 version,only the application developer who logs into APIStore can view/manage his applications and subscriptions.But there was a requirement arose mainly due to following two reasons;</span></span></span></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b"><span style="font-family: "arial" , "helvetica" , sans-serif;">
</span></span>
</span><br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">-- What if there’s a group of employees in an organization worked as developers for an application and how all those user group could get access to same subscription/application.</span></span></span></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b"><span style="font-family: "arial" , "helvetica" , sans-serif;">
</span></span>
</span><br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">-- What if the APIStore logged in developer left the organization and organization want to manage his created subscriptions in-order to manage the developed applications under organization name and only prohibit the left developer of accessing those.</span></span></span></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b" style="font-family: "verdana" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">
</span></span>
</span><br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b" style="font-family: "verdana" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Since above two requirements are really valid in an app development organization perspective ,we have introduced the feature of sharing applications and subscriptions across user groups from APIM 1.9.0 version onwards. The API Manager provides facility to users of a specific logical group to view each other's' applications and subscriptions. </span></span></span></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b" style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">
</span></span>
</span><br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b" style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">We have written this feature with the capability to extend it depend on an organization requirement.As the attribute to define the logical user group will be vary based on organizations.For example: </span></span></span></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b" style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">
</span></span>
</span><br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b" style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">1)In one organization,sharing applications and subscriptions need to be control based on user roles</span></span></span></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b" style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">
</span></span>
</span><br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b" style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">2) In another scenario,an APIStore can be run as a common APIStore across multiple organizational users.And in that,user grouping has to be done based on organization attribute.</span></span></span></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b" style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">
</span></span>
</span><br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b" style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Because of above facts,the flow how the sharing apps/subscriptions flow is as below.</span></span></span></div>
<span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b" style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">
</span></span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
</div>
<span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b" style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">
</span></span>
<br />
<ol style="margin-bottom: 0pt; margin-top: 0pt;"><span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b" style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">
<li dir="ltr" style="background-color: white; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">An app developer of an organization tries to login to APIStore</span></div>
</li>
<li dir="ltr" style="background-color: white; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Then in the underlying APIM code,it checks,if that APIStore server’s api-manager.xml have the config <GroupingExtractor> <groupingextractor>enabled and if a custom java class implementation defined inside it.</groupingextractor></span></div>
</li>
<li dir="ltr" style="background-color: white; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">If so,that java class implementation will run and a group ID for logged in user will be set.</span></div>
</li>
<li dir="ltr" style="background-color: white; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="color: black; line-height: 1.8; white-space: pre-wrap;">Once the app developer logged in and try to access ‘My Applications’ page and ‘My subscriptions’ page,from the underlying code,it’ll return all the database saved applications & subscriptions based on the user’s ‘Group ID’.</span></div>
</li>
</span></span></ol>
<span id="docs-internal-guid-75a375f3-603d-c86e-0834-b236e159750b" style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">
</span><span style="background-color: white; color: black; line-height: 1.8; text-align: justify; white-space: pre-wrap;"> With above approach,the applications and subscriptions are shared based on defined ‘Group ID’ from the custom implementation defined in <GroupingExtractor><groupingextractor> of api-manager.xml.</groupingextractor></span></span><br />
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: black; line-height: 1.8; text-align: justify; vertical-align: baseline; white-space: pre-wrap;">By default,we are shipping a sample java implementation as “org.wso2.carbon.apimgt.impl.DefaultGroupIDExtractorImpl” for this feature to consider the organization name which a signup user give at the time he sign up to the API Store as the group ID. From the custom java implementation,it extracts the claim </span><a href="http://wso2.org/claims/organization" style="background-color: white; line-height: 1.8; text-align: justify; text-decoration: none;"><span style="vertical-align: baseline; white-space: pre-wrap;">http://wso2.org/claims/organization</span></a><span style="background-color: white; color: black; line-height: 1.8; text-align: justify; vertical-align: baseline; white-space: pre-wrap;"> of the user who tries to login and uses the value specified in that claim as the group ID. This way, all users who specify the same organization name belong to the same group and therefore, can view each other's' subscriptions and applications. </span></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: black; line-height: 1.8; text-align: justify; white-space: pre-wrap;">For more information on default implementation on sharing subscriptions and applications,please refer; </span><span style="background-color: white; color: black; line-height: 1.8; text-align: justify; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><a href="https://docs.wso2.com/display/AM190/Sharing+Applications+and+Subscriptions" style="background-color: white; line-height: 1.8; text-align: justify; text-decoration: none;">https://docs.wso2.com/display/AM190/Sharing+Applications+and+Subscriptions</a></span></span></div>
<div>
<span style="background-color: white; color: black; font-family: "arial" , "helvetica" , sans-serif; line-height: 1.8; text-align: justify; white-space: pre-wrap;">In a real organization,the requirement can be bit different.The API Manager also provides flexibility to change this default group id extracting implementation.</span></div>
<div>
<span style="background-color: white; color: black; font-family: "arial" , "helvetica" , sans-serif; line-height: 1.8; text-align: justify; white-space: pre-wrap;">From this blog-post,I’ll explain how to write the group id extracting extension based on below use-case.</span><br />
<span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif; line-height: 1.8; text-align: justify; white-space: pre-wrap;"><br /></span></div>
<div>
<span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif; font-weight: 700; line-height: 1.8; text-align: justify; white-space: pre-wrap;"><u>Requirement</u></span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: black; line-height: 1.8; text-align: justify; white-space: pre-wrap;">An organization want to share subscriptions & applications based on user roles of the organization.They have disabled ‘signup’ option for users to access APIStore and their administrator is giving rights to users to access the APIStore. Basically the application developers of that organization can be categorized in-to two role levels.</span><span style="font-family: "arial" , "helvetica" , sans-serif;"></span></span><br />
<ol style="margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: "arial" , "helvetica" , sans-serif;">
<li dir="ltr" style="background-color: white; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 8pt; text-align: justify;">
<span style="background-color: white; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Application developers with ‘manager’ role</span></div>
</li>
</span></ol>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: black; font-family: "arial" , "helvetica" , sans-serif; line-height: 1.8; white-space: pre-wrap;">These developers control production environment deployed mobile applications subscriptions through API Store</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; line-height: 26.3999996185303px; text-align: justify; white-space: pre-wrap;"> </span><span style="background-color: white; color: black; line-height: 26.3999996185303px; text-align: justify; white-space: pre-wrap;"> 2. Application developers with ‘dev’ role</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: black; line-height: 1.71428571428571; text-align: justify; white-space: pre-wrap;">These developers control testing environment deployed mobile applications subscriptions through API Store </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: "arial" , "helvetica" , sans-serif;">Requirement is to share the applications and subscriptions across these two roles separately.</span></div>
<br />
<div style="text-align: justify;">
<b><span style="color: black; font-family: "arial" , "helvetica" , sans-serif;"><u>Solution</u></span></b>
<br />
<div style="text-align: justify;">
<span style="color: black; font-family: "arial" , "helvetica" , sans-serif;">Above can be achieved through writing a custom Grouping Extractor class to set ‘Group ID’ based on user roles. </span></div>
<span style="color: black; font-family: "arial" , "helvetica" , sans-serif;">1. First write a java class with implementing the interface <b>org.wso2.carbon.apimgt.api.LoginPostExecutor</b> interface and make it as a maven module.</span>
<br />
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; white-space: pre-wrap;">
<span id="docs-internal-guid-75a375f3-6046-a2ff-3112-dfde10f2e329"><span style="vertical-align: baseline;"><span style="color: black; font-family: "arial" , "helvetica" , sans-serif; vertical-align: baseline;">2. Then implement the method logic for ‘getGroupingIdentifiers()’ of the interface.<br />
In this method,it has to extract two separate ‘Group ID’s for users having ‘manager’ role and users having ‘dev’ role.
Below is a written sample logic for similar requirement with implementing this method.You can find the complete code from <a href="http://svn.wso2.org/repos/wso2/scratch/lalaji/AppShare/" target="_blank">here</a>.</span></span></span></div>
</div>
</div>
<span style="line-height: 26.3999996185303px;"> </span>
<br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<pre style="background-color: #eeeeee; border: 0px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><span id="docs-internal-guid-75a375f3-6046-a2ff-3112-dfde10f2e329"><span style="font-family: "arial" , "helvetica" , sans-serif; vertical-align: baseline;"><code style="border: 0px; margin: 0px; padding: 0px; white-space: inherit;"><pre class="java" name="code"> public String getGroupingIdentifiers(String loginResponse) {
JSONObject obj;
String username = null;
String groupId = null;
try {
obj = new JSONObject(loginResponse);
//Extract the username from login response
username = (String) obj.get("user");
loadConfiguration();
/*Create client for RemoteUserStoreManagerService and perform user management operation*/
RoleBasedGroupingExtractor extractor = new RoleBasedGroupingExtractor(true);
//create web service client for userStoreManager
extractor.createRemoteUserStoreManager();
//Get the roles of the user
String[] roles = extractor.getRolesOfUser(username);
if (roles != null) {//If user has roles
//Match the roles to check either he/she is from manager/dev role
for (String role : roles) {
if (Constants.MANAGER_ROLE.equals(role)) {
//Set the group id as role name
groupId = Constants.MANAGER_GROUP;
} else if (Constants.ADMIN_ROLE.equals(role)) {
//Set the group id as role name
groupId = Constants.ADMIN_GROUP;
}
}
}
} catch (JSONException e) {
log.error("Exception occurred while trying to get group Identifier from login response");
} catch (org.wso2.carbon.user.api.UserStoreException e) {
log.error("Error while checking user existence for " + username);
} catch (IOException e) {
log.error("IO Exception occurred while trying to get group Identifier from login response");
} catch (Exception e) {
log.error("Exception occurred while trying to get group Identifier from login response");
}
//return the group id
return groupId;
}
</pre>
</code></span></span></pre>
<span style="color: black; font-family: "arial" , "helvetica" , sans-serif; line-height: 1.8; text-align: justify; white-space: pre-wrap;">3. Build the java maven module and copy the jar into AM_Home/repository/components/lib folder.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">4. Then open APIStore running AM server’s api-manager.xml located at {AM_Home}/repository/conf location and uncomment <groupingextractor> </groupingextractor></span><span style="background-color: white; color: black; line-height: 26.3999996185303px;"><GroupingExtractor> </span><span style="color: black; line-height: 1.8;">config inside </span><span style="background-color: white; color: black; line-height: 26.3999996185303px;"><APIStore></span><span style="color: black; line-height: 1.8;"> config and add your wrote custom java class name in it.</span></span></div>
<span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">For eg: </span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="background-color: white; line-height: 26.3999996185303px;"><GroupingExtractor></span><b><groupingextractor>org.wso2.sample.gropuid.impl.RoleBasedGroupingExtractor</groupingextractor></b></span><span style="background-color: white; line-height: 26.3999996185303px;"></GroupingExtractor></span></span>
<span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">5. Then restart the APIM server.</span>
<span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">6. Then try accessing API Store as different users with same ‘Group ID’ value.For example try login to API Store with a developer having ‘manager’ role and do a subscription.Then try to login as another user who also has ‘manager’ role and check his ‘My Applications’ and ‘My subscriptions’ views in API Store. The second user will able to see the first user created application and subscription in his API Store view as below. </span>
<br />
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; white-space: pre-wrap;">
<span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Then try to login as an app developer with ‘dev’ role as well.He’ll not able to see the subscriptions/applications of users with ‘manager’ role.</span></div>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; white-space: pre-wrap;">
<span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; white-space: pre-wrap;">
<span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div class="separator" style="clear: both; text-align: center; white-space: pre-wrap;">
<a href="https://3.bp.blogspot.com/-MzwjrE5Tg00/VuFaEf3RB1I/AAAAAAAABLA/WGyg81sm5tk/s1600/Applications.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="color: black; font-family: "arial" , "helvetica" , sans-serif;"><img border="0" height="368" src="https://3.bp.blogspot.com/-MzwjrE5Tg00/VuFaEf3RB1I/AAAAAAAABLA/WGyg81sm5tk/s640/Applications.png" width="640" /></span></a></div>
<div style="white-space: pre-wrap;">
<span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; white-space: pre-wrap;">
<span style="font-family: "arial" , "helvetica" , sans-serif; vertical-align: baseline;"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; white-space: pre-wrap;">
<span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-aYRjBcYWcqc/VuFaLj69WhI/AAAAAAAABLE/nl-skLu6LWI/s1600/Subscriptions.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="color: black; font-family: "arial" , "helvetica" , sans-serif;"><img border="0" height="410" src="https://1.bp.blogspot.com/-aYRjBcYWcqc/VuFaLj69WhI/AAAAAAAABLE/nl-skLu6LWI/s640/Subscriptions.png" width="640" /></span></a></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
</span><br />
<div style="white-space: pre-wrap;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com1tag:blogger.com,1999:blog-5463821059371549738.post-49745791695455038852015-10-29T02:50:00.003-07:002015-10-29T03:54:09.411-07:00Integrate WSO2 registry lifecycle with WSO2 API Manager 1.10<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<b id="docs-internal-guid-8128db17-b2fa-6a3d-3d4e-d2f63efa91ed" style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">An API artifact has its own lifecycle to govern.A life-cycle contains set of states,actions happened during each state transitions and check list items before do a state transition.With previous APIM previous releases,we had a pre-defined lifecycle with pre-defined six states as ‘CREATED’,’PROTOTYPED’,’PUBLISHED’,’BLOCKED’,’DEPRECATED’,’RETIRED’ and pre-defined actions engaged with each state transitions which cannot be extend or customize.There was a requirement came from many users,can’t they extend the default API lifecycle engaged with WSO2 API Manager as to add their defined state names,invoke their custom actions during state transitions [eg:send notifications at each transition],add custom checklist items before state transitions.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">To achieve above,we decided to integrate WSO2 registry based lifecycle with APIManager.WSO2 registry based lifecycle provides a configurable way to define the lifecycle of an artifact which a user can easily extend.For more information ,refer </span><a href="http://wso2.com/library/tutorials/lifecycles-aspects-wso2-governance-registry/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">http://wso2.com/library/tutorials/lifecycles-aspects-wso2-governance-registry/</span></a></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<div style="line-height: 1.38;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">From APIM 1.10 onwards the default API lifecycle has defined as a xml configuration which a user laterly can extend easily.Following is the default API lifecycle xml configuration shipped with AM 1.10 product and same can be download from <a href="https://github.com/wso2/carbon-apimgt/blob/master/features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/lifecycles/APILifeCycle.xml" target="_blank">here</a>.You can find this from management console by navigating to Extenstions->Configure->Lifecycles left menu.</span></div>
<div class="separator" style="clear: both; line-height: 1.38; text-align: center;">
<a href="http://2.bp.blogspot.com/-JS_dV2adzDo/VjH6IyF7ZwI/AAAAAAAABKI/_vp-aiM5FPU/s1600/lc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="206" src="http://2.bp.blogspot.com/-JS_dV2adzDo/VjH6IyF7ZwI/AAAAAAAABKI/_vp-aiM5FPU/s640/lc.png" width="640" /></a></div>
<div style="line-height: 1.38;">
<br /></div>
</div>
</div>
</div>
</div>
</div>
<span style="line-height: 22.0799999237061px;"></span>
<br />
<pre style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;"><pre class="xml" name="code"> <aspect class="org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle" name="APILifeCycle">
<configuration type="literal">
<lifecycle>
<scxml initialstate="Created" version="1.0" xmlns="http://www.w3.org/2005/07/scxml">
<state id="Created">
<datamodel>
<data name="checkItems">
<item forevent="" name="Deprecate Old Versions">
</item>
<item forevent="" name="Require Re-Subscription">
</item>
</data>
<data name="transitionExecution">
<execution class="org.wso2.carbon.apimgt.impl.executors.APIExecutor" forevent="Deploy as a Prototype">
</execution>
<execution class="org.wso2.carbon.apimgt.impl.executors.APIExecutor" forevent="Publish">
</execution>
</data>
</datamodel>
<transition event="Publish" target="Published">
<transition event="Deploy as a Prototype" target="Prototyped">
</transition></transition></state>
<state id="Prototyped">
<datamodel>
<data name="transitionExecution">
<execution class="org.wso2.carbon.apimgt.impl.executors.APIExecutor" forevent="Publish">
</execution>
<execution class="org.wso2.carbon.apimgt.impl.executors.APIExecutor" forevent="Demote to Created">
</execution>
</data>
</datamodel>
<transition event="Publish" target="Published">
<transition event="Demote to Created" target="Created">
</transition></transition></state>
<state id="Published">
<datamodel>
<data name="transitionExecution">
<execution class="org.wso2.carbon.apimgt.impl.executors.APIExecutor" forevent="Block">
</execution>
<execution class="org.wso2.carbon.apimgt.impl.executors.APIExecutor" forevent="Deprecate">
</execution>
<execution class="org.wso2.carbon.apimgt.impl.executors.APIExecutor" forevent="Demote to Created">
</execution>
<execution class="org.wso2.carbon.apimgt.impl.executors.APIExecutor" forevent="Demote to Prototyped">
</execution>
</data>
</datamodel>
<transition event="Block" target="Blocked">
<transition event="Demote to Prototyped" target="Prototyped">
<transition event="Demote to Created" target="Created">
<transition event="Deprecate" target="Deprecated">
<transition event="Publish" target="Published">
</transition></transition></transition></transition></transition></state>
<state id="Blocked">
<datamodel>
<data name="transitionExecution">
<execution class="org.wso2.carbon.apimgt.impl.executors.APIExecutor" forevent="Re-Publish">
</execution>
<execution class="org.wso2.carbon.apimgt.impl.executors.APIExecutor" forevent="Deprecate">
</execution>
</data>
</datamodel>
<transition event="Deprecate" target="Deprecated">
<transition event="Re-Publish" target="Published">
</transition></transition></state>
<state id="Deprecated">
<datamodel>
<data name="transitionExecution">
<execution class="org.wso2.carbon.apimgt.impl.executors.APIExecutor" forevent="Retire">
</execution>
</data>
</datamodel>
<transition event="Retire" target="Retired">
</transition></state>
<state id="Retired">
</state>
</scxml>
</lifecycle>
</configuration>
</aspect>
</pre>
</code></pre>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">In above configuration,following are the important points.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<ol style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.6666666666667px; font-style: normal; font-variant: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.6666666666667px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Lifecycle Name</b></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.6666666666667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">- APILifecycle</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.6666666666667px; font-style: normal; font-variant: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.6666666666667px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Set of states</b></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.6666666666667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> -which are defined as <state> config elements.In default API lifecycle,it has six states as CREATED,PROTOTYPED,PUBLISHED,BLOCKED,DEPRECATED,RETIRED</state></span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.6666666666667px; font-style: normal; font-variant: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.6666666666667px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>A list of checklist items</b></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.6666666666667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> to be satisfied- </span></div>
</li>
</ol>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> When the API state is in ‘CREATED’ state and have multiple versions,we are checking two checklist items as ‘Deprecate Old Versions’ and ‘Require Re-subscriptions’.These check list items are defined as <data name="checkItems"> configuration element.</data></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> 4. </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.6666666666667px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>State transition events</b></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> -These events are to define from which state to which target state an API can be moved.These are defined as <transition event=""> config elements in registry lifecycle. Below state transition chart explain clearly the state transition events in default API lifecycle.</transition></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="w.png" height="673px;" src="https://lh4.googleusercontent.com/FXrpklyPFKguvQ8ttUcFBflJKe6hpFYxIB-ErmsiwL75abJe-qpBsxi2xbTeDWCiEpXavEuoc0JED93zq0VUWt6PhYfgyO7nZH-uKpuew1Z3ZPSDvH5rNg1HMNOzWhdujarkSbAq" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624px;" /></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> 5. </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.6666666666667px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Actions for each state transitions</b></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> This is the important part.For each state transition,there has to be an action triggered which will execute during state transition.For example,when an API state change from ‘CREATED’ to ‘PUBLISHED’,from APIM side,there will be an execution happend as a relative synapse API xml element will be created and related API data will be saved in database.To happen that execution,developer has to define the execution for state transtion in above registry lifecycle configuration <execution> configuration.</execution></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">With the above change,lifecycle tab in API Publisher UI has also changed.</span><br />
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><a href="http://3.bp.blogspot.com/-mo4YtQGxbPk/VjHsWMFD1NI/AAAAAAAABJ4/dQy4QBt-auM/s1600/API%2BPublisher%2B%2BAPI%2BInfo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="206" src="http://3.bp.blogspot.com/-mo4YtQGxbPk/VjHsWMFD1NI/AAAAAAAABJ4/dQy4QBt-auM/s640/API%2BPublisher%2B%2BAPI%2BInfo.png" width="640" /></a></span></div>
</div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-p3jFSLjtBP4/VjHrRKXIBRI/AAAAAAAABJo/WLJYF1IFwrg/s1600/t.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="210" src="http://1.bp.blogspot.com/-p3jFSLjtBP4/VjHrRKXIBRI/AAAAAAAABJo/WLJYF1IFwrg/s640/t.png" width="640" /></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">On AM 1.10 APIPublisher,the lifecycle UI is showing the current state of an API and target events defined in API lifecycle for that state as buttons.Note this UI is dynamically generated based on defined API LifeCycle xml configuration [Previously this page is static].Thus if you customized the default API LifeCycle configuration included states,transition events or check list items,those changes will be rectified in the lifecycle tab of APIPublisher UI accordingly.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.6666666666667px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Extension points for the API Lifecycle</b></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.6666666666667px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b><br /></b></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">With the registry life-cycle integration,now a developer can changed the API lifecycle easily with modify the above mentioned APILifecycle xml configuration.Note he has to keep the lifecycle name as ‘APILifeCycle’ to engage it for an API by default.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">He can define his own state names except ‘Published’ and ‘Prototyped’ states as those two two will be use from APIPublisher API creation wizard.He can change state transition events as per their environmental preference by changing APILifecycle accordingly.He can add custom checklist items for specific state transitions.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">And also a developer can change the execution code for each state transitions.In default API lifecycle,we have used same execution class called ‘org.wso2.carbon.apimgt.impl.executors.APIExecutor’</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[</span><a href="https://github.com/wso2/carbon-apimgt/blob/release-1.10.x/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/executors/APIExecutor.java" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://github.com/wso2/carbon-apimgt/blob/release-1.10.x/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/executors/APIExecutor.java</span></a><span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">] for all the state transitions.But a developer can plug their own execution code with modifying the lifecycle configuration.For example,if he want to add notifications for a specific state transition,then he can plug his own custom execution class for that particular state in APILifeCycle.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Once a developer changed states,events or checklist items,those will be rectified in APIPublisher life-cycle tab.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">APIM 1.10 will be release by end quarter of 2015 and you'll able to try out these changes by the that release out. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com0tag:blogger.com,1999:blog-5463821059371549738.post-13855115537980382912015-10-27T00:58:00.004-07:002015-10-27T01:29:34.322-07:00Set custom password policies to APIStore signup<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;">
<span style="font-family: verdana, sans-serif;"><br /></span></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; text-align: justify;">
<span style="color: #333333; font-family: Arial, sans-serif; line-height: 20px;">In WSO2 Identity Server, it can define custom password policies and enforce them at user creation. Could the same feature use in WSO2 APIStore self signup?Yes ,it's possible with following below steps.</span></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; text-align: justify;">
<span style="font-family: verdana, sans-serif;">To <span style="color: black;">set the user password policy during sign up for Store </span> in AM 1.9.1,first user need to install the "<span style="color: #333333; line-height: 20px;">Account Recovery and Credential Management' feature on top of API Manager 1.9.1.</span><span style="color: #333333; line-height: 20px;"> </span></span></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; text-align: justify;">
<span style="color: #333333; font-family: verdana, sans-serif; line-height: 20px;">1. Log into the APIM's Management Console [</span><a href="https://localhost:9443/carbon" style="color: #1155cc; font-family: verdana, sans-serif; line-height: 20px;" target="_blank">https://localhost:9443/carbon</a><wbr style="color: #333333; font-family: verdana, sans-serif; line-height: 20px;"></wbr><span style="color: #333333; font-family: verdana, sans-serif; line-height: 20px;">]</span></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif;">
<div style="margin-top: 10px; padding: 0px;">
<span style="font-family: verdana, sans-serif;"></span></div>
<div style="text-align: justify;">
<span style="font-family: verdana, sans-serif;"><span style="color: #333333; line-height: 20px;">2. On the left side menu section 'Configure', go to features -> repository Management and add Repository with a relevant name e.g. account-mgt</span></span></div>
<span style="font-family: verdana, sans-serif;"><span style="color: #333333;"></span></span><br />
<div style="text-align: justify;">
<span style="font-family: verdana, sans-serif;"><span style="color: #333333;"><span style="line-height: 20px;">3. Give the following as the repository URL and add the repository.</span></span></span></div>
<span style="font-family: verdana, sans-serif;"><span style="color: #333333;">
</span></span>
<div style="color: #3b73af; line-height: 20px; text-align: justify; text-decoration: none;">
<span style="font-family: verdana, sans-serif;"><a href="http://dist.wso2.org/p2/carbon/releases/turing/" rel="nofollow" style="color: #3b73af; text-decoration: none;" target="_blank">http://dist.wso2.org/p2/<wbr></wbr>carbon/releases/turing/</a></span></div>
<span style="font-family: verdana, sans-serif;">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-aOFG7_cU2fk/Vi8tn2uFZzI/AAAAAAAABJQ/aXy4jdzj6kc/s1600/a1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="161" src="http://1.bp.blogspot.com/-aOFG7_cU2fk/Vi8tn2uFZzI/AAAAAAAABJQ/aXy4jdzj6kc/s640/a1.png" width="640" /></a></div>
<div style="color: #3b73af; line-height: 20px; text-align: justify; text-decoration: none;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="color: #3b73af; line-height: 20px; text-align: justify; text-decoration: none;">
<br /></div>
<span style="color: #333333;"><div style="text-align: justify;">
<span style="color: #333333;"><span style="line-height: 20px;">4. Then select "</span></span><span style="color: #222222; line-height: 15.6000003814697px;">Show only the latest versions" option in the showing features installation UI and click on </span><span style="line-height: 20px;">"Find the features" button.</span></div>
</span></span><br />
<div style="margin-top: 10px; padding: 0px; text-align: justify;">
<span style="color: #333333; line-height: 20px;"><span style="font-family: verdana, sans-serif;">5. Then select "Account Recovery and Credential Management 4.2.2" feature and install. </span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-bPEb9HL2h68/Vi8tw7n6VSI/AAAAAAAABJY/eRKrImY4LYc/s1600/feature_install_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="339" src="http://1.bp.blogspot.com/-bPEb9HL2h68/Vi8tw7n6VSI/AAAAAAAABJY/eRKrImY4LYc/s640/feature_install_2.png" width="640" /></a></div>
<div style="margin-top: 10px; padding: 0px; text-align: justify;">
<span style="color: #333333; line-height: 20px;"><span style="font-family: verdana, sans-serif;"><br /></span></span></div>
<div style="margin-top: 10px; padding: 0px; text-align: justify;">
<span style="color: #333333; font-family: verdana, sans-serif;"><span style="line-height: 20px;">6. Go through the feature installation process until it completes.</span></span></div>
<div style="margin-top: 10px; padding: 0px; text-align: justify;">
<span style="font-family: verdana, sans-serif;"><span style="color: #333333;"><span style="line-height: 20px;">7. Then modify the </span></span><span style="color: black;">identity-mgt.</span><span style="color: black;">properties</span><span style="color: #333333; line-height: 20px;"> file located in</span><span style="color: #333333;"><span style="line-height: 20px;"> </span></span><span style="color: black;">wso2am-1.9.1/repository/<wbr></wbr>conf/</span><span style="color: black;">security/</span><span style="line-height: 20px;"><span style="color: #333333;"> according to </span></span><span style="color: #333333;"><span style="line-height: 20px;"><a href="https://docs.wso2.com/display/IS500/Password+Policies" style="color: #1155cc;" target="_blank">https://docs.wso2.com/<wbr></wbr>display/IS500/Password+<wbr></wbr>Policies</a></span></span><span style="color: #333333; line-height: 20px;"> </span></span></div>
<div style="margin-top: 10px; padding: 0px; text-align: justify;">
<span style="color: #333333; line-height: 20px;"><span style="font-family: verdana, sans-serif;">8. Restart the server and that's it.Now try self signup feature in APIStore.</span></span></div>
<div style="margin-top: 10px; padding: 0px; text-align: justify;">
<span style="color: #333333; line-height: 20px;"><span style="font-family: verdana, sans-serif;">For more info on feature installation process,refer[1].</span></span></div>
<div style="margin-top: 10px; padding: 0px; text-align: justify;">
<span style="color: #333333; line-height: 20px;"><span style="font-family: verdana, sans-serif;">[1] </span></span><span style="color: #333333; font-family: verdana, sans-serif;"><span style="line-height: 20px;"><a href="https://docs.wso2.com/display/Carbon420/Installing+Features+via+the+UI" style="color: #1155cc;" target="_blank">https://docs.wso2.com/<wbr></wbr>display/Carbon420/Installing+<wbr></wbr>Features+via+the+UI</a></span></span></div>
<div style="margin-top: 10px; padding: 0px; text-align: justify;">
<span style="color: #333333; font-family: verdana, sans-serif;">Note- APIStore self signup UI page input password field validation is based on default password policy.You can change it to match with your custom policy by extending the self signup page with your custom html changes via a <a href="https://docs.wso2.com/display/AM191/Adding+a+new+API+Store+Theme" target="_blank">sub theme</a>.</span></div>
</div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com0tag:blogger.com,1999:blog-5463821059371549738.post-63677761004006102652015-10-19T00:00:00.000-07:002015-10-19T00:00:11.168-07:00How to lock a user to avoid token generation via password grant type in APIM 1.7.0 <div dir="ltr" style="text-align: left;" trbidi="on">
<ol style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">First have to install user lock/unlock feature in APIM 1.7.0.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Login to APIM 1.7.0 management console and navigate to ‘features’ menu via </span></div>
</li>
</ol>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> left menu ‘Configure -> Features’ and select ‘Add Repository’ from shown UI as below.</span></div>
<b id="docs-internal-guid-8d087f58-7ed4-c41b-0ace-c549c0be5601" style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="add.png" height="163px;" src="https://lh4.googleusercontent.com/ZJetmqaSR3AMyrMdo2BeXCQGryyDXD7ihUPIXkVWSFxv0lrMQQKIbeVQ__5cY5dlSL7MR_goPbZOt11BrzI4DJk7ElckXySI7NEBQ_yKVu3gs7o1-j7iQ6XSCMTHIXlpT_ke5FI" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624px;" /></span></div>
<b style="font-weight: normal;"><br /></b>
<ol start="3" style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Then add a new repo with giving the url as </span><a href="http://product-dist.wso2.com/p2/carbon/releases/turing/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">http://product-dist.wso2.com/p2/carbon/releases/turing/</span></a><span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> and click ‘Add’ button as shown below.</span></div>
</li>
</ol>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="a1.png" height="157px;" src="https://lh4.googleusercontent.com/quJlHF4MUB-5gI5NtvXpVnxQM1EVPCoIsn6DkhcEH4Qx5Akrvh3MsNHYFLBGf1qQB6Y8OFJZ1dxXZn_ggh5VtFV-SS-6PO5l_ZssLFhd14KbtOEW4J7_XZ-fzBS-ESQSwsbOMWY" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624px;" /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> 4) Then click on ‘Find Features’ button shown in UI. </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="f.png" height="157px;" src="https://lh4.googleusercontent.com/A1_W2eZLV8b8zyigG3GzXTV_9GYrgJmD3-qaHEY31wquNdN7pse8YUDr7Zeo10vjjqzT4GTJmqxDvx2_aZHTiAODRXDlb4qVIpvAhSQ8_sfIJ04Ig0n3_fjZCzAp3FGahZAPe0g" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624px;" /></span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> 5) There will be a list of features shown based on products. To install user account </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> locking/unlocking feature to AM 1.7.0,you have to select the feature </span><span style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">“</span><span style="background-color: white; color: #222222; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Account Recovery and Credential Management -version 4.2.0</span><span style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">” from ‘Identity Server 4.5.0 feature group’ under Identity Management features section. Select the feature and click on ‘install’ button as shown below.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="i.png" height="235px;" src="https://lh4.googleusercontent.com/5LaldDmwwiEjmM8to1Pigtv6T1YQ7Ip8RppwZ2kDIRV05xf-VTCdYbPZxFXFYZwHi_sJ8RWvW758nWFaRHFQfVgQKgA5K8WfsKfqiA1HO9rjRLDo2SlA-sZ4d2HI2xFox7MWuqY" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624px;" /></span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">6) Then proceed the feature installation process as shown below.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="m.png" height="152px;" src="https://lh3.googleusercontent.com/CcZ53vwCI0dBznzAuV4OGAOArdHN5czJymcqHJ7q4lZ--a09CY0Segf0rvOlzwXEvetmBNhswhXx8uI0K3KrqVSXHskEIC487s6SAld0M5VMYciAmVgOx5HOPW3pMguHlAbg1VA" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624px;" /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="l.png" height="256px;" src="https://lh5.googleusercontent.com/ZEMuqx0_gxSMTcC18jCn0S2zYXnKrBUNnTkIY3fy8abkvSv5uvZmx9KILU8ZWqm8RNlLVXTabaulX8Wa5h9gfQraLyGPaIszvJx5R_FkC0cETS2uG4WQi1Fl2OOgv893EZCZnbI" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624px;" /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">7) Once you successfully installed the above feature,finally you’ll see the below UI.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="q.png" height="124px;" src="https://lh4.googleusercontent.com/D0LROAlbbTPNNUbBx14woKuW4J_4zaVYExEkr2q8xrGF2DVZ1If-Dirm--VmTUxm1ek99P7NwbBlVfeFkl20ufZUoySQwy9rGiNb6uCaVQDe3946XrpAY1ZWGehC3gc1C3eVhP0" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624px;" /></span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">8) As mentioned in above UI,you need to restart the server before use the account lock/unlock feature. But before restart the server, change the below configuration entries in identity-mgt.properties file located at AM/repository/conf/security to enable locking feature.</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Identity.Listener.Enable=true</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Authentication.Policy.Enable=true</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">For more information on configurations on account locking,please refer </span><a href="https://docs.wso2.com/pages/viewpage.action?pageId=30541686" style="text-decoration: none;"><span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://docs.wso2.com/pages/viewpage.action?pageId=30541686</span></a></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Once you did the above config changes for locking feature,restart the server.</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">9) Once restarted the server,now create a new user and assign a suitable role.Then lock the user.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">You can try locking the user via admin service[</span><a href="https://localhost:9443/services/UserIdentityManagementAdminService?wsdl" style="text-decoration: none;"><span style="background-color: white; color: #326ca6; font-family: Verdana; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">https://localhost:9443/services/UserIdentityManagementAdminService?wsdl</span></a><span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">] or via carbon UI.</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Below steps are on how to lock a user from carbon UI.</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> --Go to management console and navigate to Configure->claim management UI.Then set ‘accountLocked’ claim as ‘ supported by default’ true by following below UI flow.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="w.png" height="140px;" src="https://lh5.googleusercontent.com/q67uan-1uTxer4VV8MZbBBq3RhSFTD9a95jur26a5vf21vEEpzZLyOxPQBbz3iHzUbNAc4S6n0tWF8kM7AnsrtbpHKdvki-CoyZvR4zgPnW4gje0mR5ImPYajmdh6PnkMQ0SRS8" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624px;" /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="e.png" height="395px;" src="https://lh4.googleusercontent.com/KCWd8PGNv6_kEncFMocfDXI0DzX0bXAJNAdaMEoBghHW8o2OXboBKNplIBD57T9CmAMYtQyN9UIp2v_-EEy1bqsu4Vquhe04sJyyUgGRaxm-ZC-Ek7FyCZ7Rx2Zk8mxJYpC93Go" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624px;" /></span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="r.png" height="308px;" src="https://lh6.googleusercontent.com/c-Z-GXQ2CbZr2Hv5QH9J2_80OPVSrirloIzrggFVtxN1OBErWj-hrrrkWedjZ9BMDN_9FYEJgbkMDhJkuh873U60UJC35C8T-vBbjy4gQUMwinmcQShLWlCBpbn0Vyh50ZToyJQ" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624px;" /></span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> -- Then click on ‘Configure->Users and Roles’ left menu and navigate to users list.Click on ‘User Profile’ link of newly created user.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="u.png" height="151px;" src="https://lh3.googleusercontent.com/EZMosBdC1Phxppw6VIjOo8cO3jtODrSAH3OZZ9kUihNscn4f0CrnF2MpBKapoWV977NKcMztn35BTU2sU1fiMIVk0-I4BkDmXuc7632Rxws41wsyxvrcnHbg9GFV80CRyPwvj1Y" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="624px;" /></span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">-- Then set the ‘accountLocked’ value as ‘true’ and update the user profile.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="p.png" height="555px;" src="https://lh5.googleusercontent.com/cVUEVpiubaH12VWYfO-JEW_On7W_HAh-aNW875LUFYEAklLO2ENXuMyMg-ghHNwroJ2Wt6F7CE6RJUUDJqnbKO23FFv7VGSERrSrWyXrw8F12lzW14c0AlxRiItZvjECOB73LVo" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="566px;" /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Now the user is locked.</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">10) Now try to generate the token with giving newly created user’s credentials via password grant type as follows.</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">curl -k -d "grant_type=password&username=lalaji2&password=xxxx&scope=PRODUCTION" -H "Authorization: Basic RFY0dtNDFJVk50VUl2YXdMeDJubUxFYTozNG9aTmZhQmpHWHdUQmo1N19mT045dHpqaUVh, Content-Type: application/x-www-form-urlencoded" </span><a href="https://localhost:8243/token" style="text-decoration: none;"><span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://localhost:8243/token</span></a></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">You’ll see the below response coming from APIM to client app.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">{"error":"invalid_grant","error_description":"Provided Authorization Grant is invalid."} </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">And following warning and the error will shown in the APIM logs.</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[2015-10-19 10:55:36,586] WARN - IdentityMgtEventListener User account is locked for user : lalaji2. cannot login until the account is unlocked </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[2015-10-19 10:55:36,586</span><span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">] ERROR - PasswordGrantHandler Error when authenticating the user for OAuth Authorization.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">org.wso2.carbon.user.core.UserStoreException: 17003</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">at org.wso2.carbon.identity.mgt.IdentityMgtEventListener.doPreAuthenticate(IdentityMgtEventListener.java:167)</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: #fefdfa; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">xxxxxx </span></div>
<br /></div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com3tag:blogger.com,1999:blog-5463821059371549738.post-91643923976553968372015-09-10T03:15:00.003-07:002016-02-18T22:28:27.821-08:00WSO2 API Manager features integration with Governance Center of WSO2 Governance Registry 5.0.0<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">For past five months I was involved with the team effort of integrating APIM capabilities to the governance center which is released as WSO2 Governance Registry (GReg) product 5.0.0.Let's get into more details on the topic.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-family: "arial" , "helvetica" , sans-serif;">WSO2 Governance Registry 5.0.0</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">WSO2 GReg product is a fully open source SOA integrated repository for storing and managing metadata related to service artifacts.In other words,it's a repository to store metadata like policies, wsdls, wadls,swagger definitions related to SOAP/REST services and store SOAP/REST services themselves. Each of these metadata models can be called as an asset type.Such that GReg can be introduced as a repository to keep different asset types as wsdl,wadl,policy,soap service,rest service.Additionally a user can configure and extend GReg to add their customized metadata models via adding "configurable governance artifacts" option(rxt) which is described in <a href="https://docs.wso2.com/pages/viewpage.action?pageId=43985876" target="_blank">here</a>.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">In previous GReg releases [before 5.0.0 version],to govern the above mentioned metadata models[asset types],only option was to use the management console UI shipped with GReg.But it was lacking of rich UI interface and value added UI features like showing associations/dependencies among assets,add user reviews and many other UI features.Thus having a rich user friendly governance center integrated with GReg was raised by many users.And now <a href="http://wso2.com/products/governance-registry/" target="_blank">WSO2 GReg 5.0.0</a> has released to public with providing this feature.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-family: "arial" , "helvetica" , sans-serif;">Governance Center</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Conceptually a governance center means a common place for a user to govern multiple assets [metadata models] with managing its life-cycle,associations with other assets,providing a social view and many more features as explained in <a href="https://docs.wso2.com/display/Governance500/Governance+Center+Features" target="_blank">here</a>.With the aid of WSO2 in-premise asset management product <a href="https://docs.wso2.com/display/ES200/Introducing+WSO2+Enterprise+Store" target="_blank">WSO2 Enterprise Store</a>[ES],the governance center has been implemented with keeping two web apps as publisher and store.The publisher (Back-office) will act as the central UI place where a user navigate and manage assets throughout their life-cycles with versioning support. The store [store-front] will act the central portal available for users to discover different asset types with facilitating social interactions.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-family: "arial" , "helvetica" , sans-serif;">APIM features integration with Governance Center of GReg 5.0.0</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="http://wso2.com/api-management/try-it/" target="_blank">WSO2 API Manager</a> is fully focused on API asset type by covering all its aspects as governing its lifecycle from API creation point and managing its run time usage via applications.Such that since API is also an asset type and there's already an <a href="https://docs.wso2.com/display/Governance500/Integrating+with+WSO2+API+Manager" target="_blank">use-case</a> of GReg as ability to promote GReg stored services as APIs,isn't it a good use-case to integrate API asset-governance part also into the GReg in-built governance center?This is the exact requirement came from few GReg users and its what we have achieved with APIM features integrated with governance center of GReg 5.0.0. Now a user can integrate API asset to GReg governance center by installing APIM features and use the publisher and store apps of gc [governance center] to govern API life-cycle and manage its subscriptions with app developer audience as well.This integration comes in -handy when a user start with storing a SOAP/REST web service in GReg and promote it to an API via its lifecycle. Then to manage the promoted API,he can use same governance center UI without pointing to external API Manager instance.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b>Architecture -</b><b>APIM features integration with Governance Center of GReg 5.0.0</b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Following diagram shows the designed deployment with the APIM features integration on GReg 5.0.0. From a general APIM distributed setup,what differentiate on below deployment is instead of keeping separate APIM instances as publisher and store,we have used GReg instances.In this way,there will be a common publisher and store for all the assets including API,wsdl,wadl,soap/rest service,policy,etc. Still APIM instances will be use as the gateway and keymanager nodes.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">We have completed revamping existing APIM publisher/store UIs built on older jaggery version to be new UIs built on-top of enterprise store with using latest technologies as caramal framework [in-built javascript MVC framework in wso2], javascript, jquery and handlebar templating support. We have written this APIM publisher/store UI parts as <a href="https://docs.wso2.com/display/ES200/Working+with+the+ES+Extension+Model" target="_blank">Enterprise store extensions</a>.To integrate with GReg,we have shipped this newly written es extensions to API publisher and store as separate <a href="http://wso2.com/projects/carbon/provisioning-wso2-carbon-with-equinox-p2/" target="_blank">carbon features</a>.Thus if a user need these,he can install the required APIM publisher,store extension features on top of GReg 5.0.0. </span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-oxYlt1c_fqs/VfFGWMx1xlI/AAAAAAAABGw/yJg_QoEvSi4/s1600/greg-apim%2Bintegration%2B%25281%2529.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="color: black; font-family: "arial" , "helvetica" , sans-serif;"><img border="0" height="480" src="https://2.bp.blogspot.com/-oxYlt1c_fqs/VfFGWMx1xlI/AAAAAAAABGw/yJg_QoEvSi4/s640/greg-apim%2Bintegration%2B%25281%2529.png" width="640" /></span></a></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br />
The steps on how to configure the above deployment can be find from <a href="https://svn.wso2.org/repos/wso2/scratch/apim/release-2.0.0/final/APIM-2.0.0FeaturesInstallationGuideonGReg5.0.0.pdf">https://svn.wso2.org/repos/wso2/scratch/apim/release-2.0.0/final/APIM-2.0.0FeaturesInstallationGuideonGReg5.0.0.pdf</a> </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Sample Screenshots for APIM publisher/store new UIs done on top of WSO2 ES and installed into GReg 5.0.0.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> </span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-8ZTtcsD_5iY/VfFml0EIOLI/AAAAAAAABIA/Mwo5SjTgVZc/s1600/a.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="176" src="https://2.bp.blogspot.com/-8ZTtcsD_5iY/VfFml0EIOLI/AAAAAAAABIA/Mwo5SjTgVZc/s320/a.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">API design wizard</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-PnMQWtG-o3M/VfFcq0nlvjI/AAAAAAAABHI/czflYWkM3DI/s1600/b.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="153" src="https://4.bp.blogspot.com/-PnMQWtG-o3M/VfFcq0nlvjI/AAAAAAAABHI/czflYWkM3DI/s320/b.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">API implementation wizard</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-d8N-mB60SV0/VfFctsIaFDI/AAAAAAAABHQ/wFGmu2zi4c0/s1600/hh.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="202" src="https://2.bp.blogspot.com/-d8N-mB60SV0/VfFctsIaFDI/AAAAAAAABHQ/wFGmu2zi4c0/s320/hh.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">API Manage wizard</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-S1wSk5xyfs0/VfFm7r82n0I/AAAAAAAABII/52KNZf-WFkw/s1600/q.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="184" src="https://1.bp.blogspot.com/-S1wSk5xyfs0/VfFm7r82n0I/AAAAAAAABII/52KNZf-WFkw/s320/q.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">API Overview</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-CRSyJbUIIi8/VfFyqFxvpkI/AAAAAAAABIY/M5uxV76Ipbo/s1600/lc.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="260" src="https://3.bp.blogspot.com/-CRSyJbUIIi8/VfFyqFxvpkI/AAAAAAAABIY/M5uxV76Ipbo/s320/lc.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">API Lifecycle View</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-F8_lAcLLDO8/VfFcwUZZN7I/AAAAAAAABHY/_zReHHr3v5c/s1600/ee.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="105" src="https://2.bp.blogspot.com/-F8_lAcLLDO8/VfFcwUZZN7I/AAAAAAAABHY/_zReHHr3v5c/s320/ee.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Store Listing View</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-irKM3Z6oaSI/VfFcyD8qIFI/AAAAAAAABHg/3UZT1vK1Bwc/s1600/ff.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="159" src="https://4.bp.blogspot.com/-irKM3Z6oaSI/VfFcyD8qIFI/AAAAAAAABHg/3UZT1vK1Bwc/s320/ff.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Store API Browse View</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-gmEmW8A86VA/VfFc081iE6I/AAAAAAAABHo/Xl7vJrwTrgQ/s1600/ii.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="139" src="https://4.bp.blogspot.com/-gmEmW8A86VA/VfFc081iE6I/AAAAAAAABHo/Xl7vJrwTrgQ/s320/ii.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Swagger Console</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-mIMeWYwiVzk/VfFc5fNJgeI/AAAAAAAABHw/UQ_bQPkGTWc/s1600/sn.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://3.bp.blogspot.com/-mIMeWYwiVzk/VfFc5fNJgeI/AAAAAAAABHw/UQ_bQPkGTWc/s320/sn.png" width="198" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Store-Subscriptions View</td></tr>
</tbody></table>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com0tag:blogger.com,1999:blog-5463821059371549738.post-66608638321947893402014-10-09T06:40:00.000-07:002014-10-09T06:42:34.121-07:00Design,Implement and Manage a RESTful API with WSO2 API Manager<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Times, Times New Roman, serif;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Times, Times New Roman, serif;"><span style="background-color: transparent; color: black; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">A proper API has to be intuitive,well documented,consistent and wrap with security and analytics support.This is where the importance of WSO2 API Manager product comes. WSO2 API Manager</span><span style="font-size: 19px; vertical-align: baseline; white-space: pre-wrap;"> is a complete solution to design,implement and manage APIs.</span><span style="font-size: 19px; vertical-align: baseline; white-space: pre-wrap;">It comes with an out of the box API Publisher which allows to design the API properly and convert it to a managed API.API Publisher is the main entry point,which is a web application in which an API developer will starts developing his API and expose it to public.</span></span></div>
<div style="text-align: justify;">
<b id="docs-internal-guid-a4c61540-f4d9-20f7-90e2-fb0f31ffa28c" style="font-weight: normal;"><span style="font-family: Times, Times New Roman, serif;"><br /></span></b></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Times, Times New Roman, serif;">Basically API Publisher provide capabilities to cover the three API phases of design,implement and manage.</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Times, Times New Roman, serif;"><br /></span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
</div>
<ul style="text-align: left;">
<li style="text-align: justify;"><span style="font-family: Times, 'Times New Roman', serif; font-size: 19px; line-height: 1.15; white-space: pre-wrap;">Design phase-</span></li>
</ul>
<span style="font-family: Times, 'Times New Roman', serif; font-size: 19px; line-height: 1.15; white-space: pre-wrap;"></span><br />
<div style="text-align: justify;">
<span style="font-family: Times, 'Times New Roman', serif; font-size: 19px; line-height: 1.15; white-space: pre-wrap;"><span style="line-height: 1.15;">The phase in which API creator is planning and designing the API with defining the set of API resources exposed from the API.</span></span></div>
<span style="font-family: Times, 'Times New Roman', serif; font-size: 19px; line-height: 1.15; white-space: pre-wrap;">
</span><span style="font-family: Times, Times New Roman, serif;"><div style="text-align: justify;">
<span style="font-size: 19px; line-height: 21.850000381469727px; white-space: pre-wrap;"><br /></span></div>
</span><br />
<ul style="text-align: left;">
<li><span style="font-family: Times, 'Times New Roman', serif; font-size: 19px; line-height: 1.15; text-align: justify; white-space: pre-wrap;">Implement phase-</span></li>
</ul>
<span style="font-family: Times, 'Times New Roman', serif; font-size: 19px; line-height: 1.15; text-align: justify; white-space: pre-wrap;">The phase in which API creator try to deploy the API and test it as a Prototyped API to check the designed API is working as expected.Additionally API creator can connect with back-end implementation and test it as a sandbox endpoint. Then try to connect with real production endpoint.</span><br />
<span style="font-family: Times, Times New Roman, serif;"><br /></span>
<div style="text-align: justify;">
<span style="font-family: Times, Times New Roman, serif;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
</div>
<ul>
<li><span style="font-family: Times, 'Times New Roman', serif; font-size: 19px; line-height: 1.15; white-space: pre-wrap;">API manage phase- </span></li>
</ul>
<span style="font-family: Times, 'Times New Roman', serif; font-size: 19px; line-height: 1.15; white-space: pre-wrap;">The phase in which ,API creator will engage the value added features as security,throttling to the API.This way the RESTful API will become a managed API as the API creator has engaged policies into it ,in-order to convert it to a more controllable API.</span><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Times, 'Times New Roman', serif; font-size: 19px; line-height: 1.15; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Times, 'Times New Roman', serif; font-size: 19px; line-height: 1.15; white-space: pre-wrap;"><u>Design APIs with WSO2 API Manager</u></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Times, 'Times New Roman', serif; font-size: 19px; line-height: 1.15; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span id="docs-internal-guid-a797bdff-f4ef-31ee-40c5-f4bfa89c5eb8" style="font-family: Times, Times New Roman, serif;"><img alt="design.png" height="375" src="https://lh5.googleusercontent.com/w8-u0TI7XoV_1t2edWkwsJhMeVmq7jwKAfwLZxbqspx23fB4WWGEhRCT5iR2W47WY29ue7o6GK5iM6QnHsNPLgPYRa3VeU_fIzr1YgGnC1lBQnAjVQAN62hxiK9qEe0so0vj" width="640" /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Times, Times New Roman, serif;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Times, Times New Roman, serif;">This is the starting phase of creating a good RESTful API.An API design is a proper definition for the actual back-end implementation,its supporting resources and methods.In other words,it’s the contact for end users who are willing to consume the API.Thus designing the API properly matters.Thus we have introduced API designing capability with API Publisher application in WSO2 API Manager from the released 1.7.0 on-wards.</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Times, Times New Roman, serif;"><br /></span></span></div>
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Times, Times New Roman, serif;">API designing involves making the API intutitive,well documented and consistent.To achieve these,it has to properly define the API resources and well document them for consuming each.Thus in WSO2 API Manager,we have integrate swagger framework with the API resource defining function.Swagger is a declarative resource specification,which consumers could understand and consume services without knowledge of server implementation.It' is an open source framework which will describe,visualize and consume a RESTful API.The swagger documentation of methods,parameters and models are tightly integrated to back-end implementation and it allows APIs to always in sync with implementation.</span></span></div>
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Times, Times New Roman, serif;"><br /></span></span></div>
<div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Times, Times New Roman, serif;">From API Publisher ,design API UI,an API developer can declare API resources with swagger in style.Swagger integration to API Publisher provide support for API developers to define API resources inline with swagger or import pre-defined API resources directly.</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span id="docs-internal-guid-a4c61540-f4ef-ec3a-f2f8-b267fcca15e4" style="font-family: Times, Times New Roman, serif;"></span></div>
<div dir="ltr" style="line-height: 1.4318181818181819; margin-bottom: 4pt; margin-left: 4pt; margin-right: 4pt; margin-top: 4pt;">
<span style="font-family: Times, Times New Roman, serif;"><br /></span></div>
<div dir="ltr" style="line-height: 1.4318181818181819; margin-bottom: 4pt; margin-left: 4pt; margin-right: 4pt; margin-top: 4pt;">
<span id="docs-internal-guid-a797c587-f4f4-ecc5-3993-74be4452fa36" style="font-family: Times, Times New Roman, serif;"><img alt="swaggr4.png" height="401" src="https://lh5.googleusercontent.com/NLttcFnMWLPM3097e1Mc4guJYzF2QbN216ehrDN98K_QYD_XQXpHSymuutOoJdM6F1TqNtxbJxdqMJtSDqILuqWKenpsD46BscX95oLqIJmCT6LRnjZBQVOcWCLxnjdliGp0" width="640" /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Times, Times New Roman, serif;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Times, Times New Roman, serif;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<u style="font-size: 19px; line-height: 21.850000381469727px; white-space: pre-wrap;"><span style="font-family: Times, Times New Roman, serif;">Implement APIs with WSO2 API Manager</span></u></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Times, Times New Roman, serif;"><br /></span></div>
<div dir="ltr" style="line-height: 1.4318181818181819; margin: 4pt; text-align: justify;">
<span style="font-size: 19px; line-height: 1.4318181818181819; white-space: pre-wrap;"><span style="font-family: Times, Times New Roman, serif;">Next phase is how the API developer can continue testing the designed API.Before exposing the API to public for consuming it,API developers has to properly test the API with its defined API resources set. For this, an API developer can try sampling the responses for each API definition as prototyped APIs and test or either directly connecting to the backend through WSO2 API Manager. With the prototyped APIs concept an API developer could initially test whether he has properly designed API resource definitions without costing additional network delay on connecting to actual backend implementation.The advantage of having a prototyped API is it provides early promotion for the created API.API developer could get early feedbacks from API Consumers as API consumers can consume the prototyped APIs without subscribing to them. A prototyped API can sample its implementation inline with javascript.</span></span></div>
<div dir="ltr" style="line-height: 1.4318181818181819; margin: 4pt; text-align: justify;">
<span style="font-family: Times, Times New Roman, serif; font-size: 19px; line-height: 1.4318181818181819; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.4318181818181819; margin: 4pt; text-align: justify;">
<span id="docs-internal-guid-a797c5e2-f512-fe45-6bd2-6c26eae58e88" style="font-family: Times, Times New Roman, serif;"><img alt="prototype.png" height="348" src="https://lh3.googleusercontent.com/uZVAjYKTOvC4-_vEmsx6YhBXvzqX9k1AtL0AobTklmdkRoU1w1NhaREGqbRf9nNVQVeM9bfZ-t0h8ZrvzJSCFZJto34DfYRq4V2GNJP7SGSKFgOl1CWd_Ttb5X7dQOjnaJPt" width="640" /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Times, Times New Roman, serif;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span id="docs-internal-guid-a4c61540-f513-c5f8-f4d5-0b914badd8fe" style="font-family: Times, Times New Roman, serif;"></span></div>
<div dir="ltr" style="line-height: 1.4318181818181819; margin: 4pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Times, Times New Roman, serif;">Once the API creator deploy and test the API as a prototype,now it has confirmed the API resource definitions are properly defined.Now the missing part is test with actual back-end implementation.For that,API developer can switch the implementation method in ‘Implement’ phase UI of API Publisher to back-end endpoint as shown below.Since this is for testing purposes,better to give the testing environment back-end endpoint as the sandbox url. Then as an APIConsumer a user can subscribe to this API ,generate a sandbox token and continue testing on this.</span></span></div>
<div dir="ltr" style="line-height: 1.4318181818181819; margin: 4pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Times, Times New Roman, serif;"><br /></span></span></div>
<div dir="ltr" style="line-height: 1.4318181818181819; margin: 4pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-4561470f-f515-1879-c93c-9209fea489c3" style="font-family: Times, Times New Roman, serif;"><img alt="sandbox.png" height="343" src="https://lh5.googleusercontent.com/wtAS6R8ZMI2qEeJE4dWkvK2KqLYa5dSspLWIacax0WwjHRcoRbL8bb5r7WcE5vLEdMgKdupQa4oNUvpD_iBxmnncrxAPcybKwV4p8jeh3DIL2wi2LKz2MgcRyqkx4xZSnd_O" width="640" /></span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Times, Times New Roman, serif;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Times, Times New Roman, serif;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<u style="font-size: 19px; line-height: 21.850000381469727px; white-space: pre-wrap;"><span style="font-family: Times, Times New Roman, serif;">Manage APIs with WSO2 API Manager</span></u></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<u style="font-size: 19px; line-height: 21.850000381469727px; white-space: pre-wrap;"><span style="font-family: Times, Times New Roman, serif;"><br /></span></u></div>
<div dir="ltr" style="line-height: 1.4318181818181819; margin-bottom: 4pt; margin-left: 4pt; margin-right: 4pt; margin-top: 4pt;">
<span style="background-color: transparent; color: black; font-family: Times, Times New Roman, serif; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Above has covered how to design a RESTful API,test the implementation and now remaining is expose it as a managed API to the public.In this phase ,with WSO2 API Manager,an API developer can engage policies to an API as throttling ,security and expose it to public for subscriptions.There are more value added features in API manage phase like restrict the API exposing transport either to be http or https,engage additional mediation logics via sequences to fire during API invocations,control API subscriptions.Additionally API Publisher provides capability of managing the API life-cycle.</span><br />
<span style="background-color: transparent; color: black; font-family: Times, Times New Roman, serif; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="background-color: transparent; color: black; font-family: Times, Times New Roman, serif; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-45614715-f524-dd98-98b5-876373a7cee0"><img alt="manage.png" height="409" src="https://lh6.googleusercontent.com/Dd1SZFpT_mQiM6VhuqZh7m6QylCgF2P3KNugn2I_SHXvWMeU0L7LpV0ta4m-kT5y3LDKsznbmzUmZkZpB3BXbTE046M6ENUJ2nwJR8vbs1NJlyJkFJEOPYZ5-e8cTDL5d2F3" width="640" /></span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span id="docs-internal-guid-a4c61540-f515-9d9c-6dc3-e9ed1d9ee3cc" style="font-family: Times, Times New Roman, serif;"></span></div>
<div dir="ltr" style="line-height: 1.4318181818181819; margin-bottom: 4pt; margin-left: 4pt; margin-right: 4pt; margin-top: 4pt;">
<span style="font-family: Times, Times New Roman, serif;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com3tag:blogger.com,1999:blog-5463821059371549738.post-60926227810664725612014-06-24T06:31:00.003-07:002014-06-25T21:43:54.052-07:00WSO2 API Manager- Extended Mediation Capabilities on APIs -Part1<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" trbidi="on">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">After a while,thought to write a blog-post about how we can use extended mediation capabilities with the published APIs from WSO2 APIManager.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><b>Requiremen</b>t- A back-end endpoint with returning xml content need to wrap with an API from WSO2 APIManager to give additional security,throttling and monitoring capabilities for it.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">For this blog-post,as the back-end endpoint,I have used the sample JAX-RS based web-app which can be found from <a href="https://svn.wso2.org/repos/wso2/scratch/lalaji/Order-1.0.war">here</a>,deployed in WSO2 AS 5.2.1.You can try downloading <a href="http://wso2.com/products/application-server/">WSO2 AS 5.2.1</a> and try deploying this web-app as instructed in here.I have started AS with port offset 2.Thus the deployed jax-rs web-app url is <a href="http://localhost:9765/Order-1.0/">http://localhost:9765/Order-1.0/</a></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">This jax-rs web app supports following HTTP verbs with the url-patterns;</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">POST /submitOrder Input & Output content-type : text/xml</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="vertical-align: baseline; white-space: pre-wrap;">Input Payload</span><span style="vertical-align: baseline; white-space: pre-wrap;">:</span></span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<div style="text-align: justify;">
<i style="line-height: 17.25px; white-space: pre-wrap;"><span style="font-family: Arial, Helvetica, sans-serif;"><Order></span></i></div>
<div style="text-align: justify;">
<span id="docs-internal-guid-3a6fcc59-cddb-4016-181a-8893ae0b6a94" style="font-family: Arial, Helvetica, sans-serif;"><i style="line-height: 17.25px; white-space: pre-wrap;"> <customerName>Jack</customerName></i></span></div>
<span id="docs-internal-guid-3a6fcc59-cddb-4016-181a-8893ae0b6a94" style="font-family: Arial, Helvetica, sans-serif;">
<span style="line-height: 17.25px; white-space: pre-wrap;"><i> <quantity>5</quantity>
</i></span></span><br />
<div style="text-align: justify;">
<div style="display: inline !important; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span id="docs-internal-guid-3a6fcc59-cddb-4016-181a-8893ae0b6a94"><span style="line-height: 17.25px; white-space: pre-wrap;"><i><i style="text-align: left;"> <creditCardNumber>233</cre</i></i></span></span><i style="line-height: 17.25px; white-space: pre-wrap;"><i>ditCardNumber></i></i></span></div>
<span id="docs-internal-guid-3a6fcc59-cddb-4016-181a-8893ae0b6a94"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 17.25px; white-space: pre-wrap;"><i><i> <delivered>false</deliver</i><i style="text-align: left;">ed></i></i></span></span></div>
<div style="text-align: justify;">
<div style="display: inline !important; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span id="docs-internal-guid-3a6fcc59-cddb-4016-181a-8893ae0b6a94"><span style="line-height: 17.25px; white-space: pre-wrap;"><i><i style="text-align: left;"></Ord</i></i></span></span><i style="line-height: 17.25px; white-space: pre-wrap;"><i style="text-align: left;"><i>er></i></i></i></span></div>
<span id="docs-internal-guid-3a6fcc59-cddb-4016-181a-8893ae0b6a94"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 17.25px; white-space: pre-wrap;"><i><i style="text-align: left;">
</i></i></span></span></div>
<span id="docs-internal-guid-3a6fcc59-cddb-4016-181a-8893ae0b6a94"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 17.25px; white-space: pre-wrap;"><i>
</i></span></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><span id="docs-internal-guid-3a6fcc59-cddb-4016-181a-8893ae0b6a94">
</span>
</span><br />
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">GET /orderStatus Output content-type : text/xml </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">GET /cancelOrder Output content-type : text/xml</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Then download the latest WSO2 AM 1.7.0 binary pack from <a href="http://wso2.com/products/api-manager/">here</a>. With AM 1.7.0 we have done a major re-design the APIPublisher UI,in which allowing users to get the experience of designing APIs addition to implement APIs and manage APIs as previous AM publisher versions are only focus on implement and manage APIs.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Start AM server,log in to APIPublisher app and create an API with below details;For more information,refer the <a href="https://docs.wso2.org/display/AM170/Quick+Start+Guide">quick start guide</a>,</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;">In Design API view,enter below parameters.</span></div>
</div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span id="docs-internal-guid-50a5f51a-cdb0-dee9-ba28-b8330e392a15"><br /></span>
</span></div>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="list-style-type: disc; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: black; vertical-align: baseline; white-space: pre-wrap;">Name -</span><span style="color: black; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">order</span></span></div>
</div>
</li>
<li dir="ltr" style="list-style-type: disc; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: black; vertical-align: baseline; white-space: pre-wrap;">Context -</span><span style="color: black; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">order</span></span></div>
</div>
</li>
<li dir="ltr" style="list-style-type: disc; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: black; vertical-align: baseline; white-space: pre-wrap;">Version-</span><span style="color: black; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;">v1</span></span></div>
</div>
</li>
</ul>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: black; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="color: black; vertical-align: baseline; white-space: pre-wrap;">Under Resources section,define following three API resources.</span></span></div>
</div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="list-style-type: disc; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;"> URL-Pattern - submitOrder</span></div>
</div>
</li>
</ul>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;"> HTTP Verb - POST</span></div>
</div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
</div>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="list-style-type: disc; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;"> URL-Pattern -cancelOrder/{id}</span></div>
</div>
</li>
</ul>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;"> HTTP Verb- GET</span></div>
</div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="list-style-type: disc; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;"> URL-Pattern - orderStatus/{id}</span></div>
</div>
</li>
</ul>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;"> HTTP Verb- GET</span></div>
</div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="list-style-type: disc; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;"> URL-Pattern - confirmCancelOrder/*</span></div>
</div>
</li>
</ul>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;"> HTTP Verb- GET</span></div>
</div>
<div style="text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: black; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><img alt="a.png" height="168px;" src="https://lh3.googleusercontent.com/qv_1fWz1OeCsvoiVTgtbM8h9udpsf9LBJH3FCfyZHiexFr-GR65204oFJC-BUjjYxaUqev6Abdip5oD6JFVsa0R7F-Tbi6b0yK3vLYFAPw_48b3GTlavsns9gk9gIua_bA" style="-webkit-transform: rotate(0rad); border: none;" width="624px;" /></span></div>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;"> 4) Then save the design API view content.Then click on ‘Implement’ button.</span></div>
</div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
</div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: black; vertical-align: baseline; white-space: pre-wrap;"> 5) Enter above deployed JAXRS web app url [http://localhost:9765/Order-1.0/] as the production endpoint value with setting endpoint type as </span><span style="background-color: white; color: black; vertical-align: baseline; white-space: pre-wrap;">‘HTTP Endpoint’. </span></span></div>
</div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="background-color: yellow; color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
</div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;"> 6) Then save the details and next click on ‘manage’ button.</span></div>
</div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial, Helvetica, sans-serif; vertical-align: baseline; white-space: pre-wrap;"> 7) Select ‘Tier Availability’ as ‘Unlimited’</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-ftwWybUq0vI/U6lueua_5gI/AAAAAAAAA-w/hJBSARW9Prg/s1600/aa.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-ftwWybUq0vI/U6lueua_5gI/AAAAAAAAA-w/hJBSARW9Prg/s1600/aa.png" height="168" width="320" /></a></div>
<span style="color: black; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: black; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.15; white-space: pre-wrap;">8) Set the Authentication Type for all API resources as ‘Application &amp; Application User’</span></div>
</div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="color: black; font-family: Arial, Helvetica, sans-serif; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">9) Click ‘save & publish’ option in it.</span></div>
</div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Once created the above API and publish the API,you'll see a xml configuration named as admin--Order_v1.xml has been created at {AM}/repository/deployment/server/synapse-configs/default/api location.</span></div>
<br /></div>
<pre class="brush:xml">
<?xml version="1.0" encoding="UTF-8"?><api xmlns="http://ws.apache.org/ns/synapse" name="admin--Order" context="/Order" version="1" version-type="url">
<resource methods="POST" url-mapping="/submitOrder">
<inSequence>
<property name="POST_TO_URI" value="true" scope="axis2"/>
<filter source="$ctx:AM_KEY_TYPE" regex="PRODUCTION">
<then>
<send>
<endpoint name="admin--TTT_APIproductionEndpoint_0" >
<address uri="https://10.100.1.85:9463/services/orderSvc/" format="soap11">
<timeout>
<duration>30000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<errorCodes>-1</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<errorCodes>-1</errorCodes>
</markForSuspension>
</address>
</endpoint>
</send>
</then>
<else>
<sequence key="_sandbox_key_error_"/>
</else>
</filter>
</inSequence>
<outSequence>
<send/>
</outSequence>
</resource>
<resource methods="GET" uri-template="/cancelOrder/{id}">
<inSequence>
<property name="POST_TO_URI" value="true" scope="axis2"/>
<filter source="$ctx:AM_KEY_TYPE" regex="PRODUCTION">
<then>
</then>
<else>
<sequence key="_sandbox_key_error_"/>
</else>
</filter>
</inSequence>
<outSequence>
<send/>
</outSequence>
</resource>
<resource methods="GET" uri-template="/orderStatus/{id}">
<inSequence>
<property name="POST_TO_URI" value="true" scope="axis2"/>
<filter source="$ctx:AM_KEY_TYPE" regex="PRODUCTION">
<then>
<send>
<endpoint name="admin--TTT_APIproductionEndpoint_0" >
<address uri="https://10.100.1.85:9463/services/orderSvc/" format="soap11">
<timeout>
<duration>30000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<errorCodes>-1</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<errorCodes>-1</errorCodes>
</markForSuspension>
</address>
</endpoint>
</send>
</then>
<else>
<sequence key="_sandbox_key_error_"/>
</else>
</filter>
</inSequence>
<outSequence>
<send/>
</outSequence>
</resource>
<handlers>
<handler class="org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler"/>
<handler class="org.wso2.carbon.apimgt.gateway.handlers.throttling.APIThrottleHandler">
<property name="id" value="A"/>
<property name="policyKey" value="gov:/apimgt/applicationdata/tiers.xml"/>
</handler>
<handler class="org.wso2.carbon.apimgt.usage.publisher.APIMgtGoogleAnalyticsTrackingHandler">
<property name="configKey" value="gov:/apimgt/statistics/ga-config.xml"/>
</handler>
<handler class="org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerExtensionHandler"/>
</handlers>
</api>
</pre>
<br />
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Once publish the API,browse APIStore and create a subscription for this API and generate a application token from APIstore. </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Now let's try to invoke /submitOrder method of API. </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">A sample curl request would be as ;</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">curl -d @payload.xml -H "Authorization:Bearer xxxxx" -H "Content-Type:text/xml" <a href="http://localhost:8280/Order/1/submitOrder" style="background-color: white; text-decoration: none;">http://localhost:8280/Order/1/submitOrder</a> </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">payload.xml content -
</span></div>
<br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17.25px; white-space: pre-wrap;"><i><Order>
<customerName>Jack</customerName>
<quantity>5</quantity>
<creditCardNumber>233</creditCardNumber>
<delivered>false</delivered>
</Order></i></span></span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17.25px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17.25px; white-space: pre-wrap;">You'll observe a response similar to below.</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17.25px; white-space: pre-wrap;"><br /></span></span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17.25px; white-space: pre-wrap;"><Order>
<creditCardNumber>233</creditCardNumber>
<customerName>Jack</customerName>
<date>06/24/2014 08:43:52</date>
<delivered>false</delivered>
<orderId>a4c1315d-8a07-4e80-85b1-3795ab47db7a</orderId>
<quantity>5</quantity>
</Order></span></span><br />
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17.25px; white-space: pre-wrap;"><br /></span></span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17.25px; white-space: pre-wrap;"><b>New Requirement 1</b></span></span><br />
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17.25px; white-space: pre-wrap;"><b><br /></b></span></span></div>
<div style="text-align: justify;">
</div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 17.25px; white-space: pre-wrap;">Now,let's say you want to make the above Order API as a json/REST API.Thus the input and output has to be in json format.For this,you have to change the Order API xml content.Since AM 1.7.0 doesn't provide mediation UI capabilities,you can try directly editing the deployed api xml file located at {AM}/repository/deployment/server/synapse-configs/default/api.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 15px; line-height: 17.25px; white-space: pre-wrap;">
</span>
</span><br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<i><span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: transparent; color: black; font-size: 15px; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Replace </span><span style="background-color: white;"><span style="color: black; font-size: 15px; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">‘</span><span style="color: black; font-size: 15px; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">json</span><span style="color: black; font-size: 15px; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">’</span></span><span style="background-color: transparent; color: black; font-size: 15px; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> message formatter and message builder</span></span></i></div>
<b id="docs-internal-guid-50a5f51a-d176-a8e2-013d-dffa5a741451" style="font-weight: normal;">
</b>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; 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>
<span style="background-color: white; 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;">Replace below message-formatter and builder to axis2.xml of {AM}/repository/conf/axis2/ location and restart AM server.</span></div>
<b style="font-weight: normal;">
</b>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; 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>
<span style="background-color: white; 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;">Message Formatter</span><br />
<span style="background-color: white; 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></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17.25px; white-space: pre-wrap;"><messageFormatter contentType="application/json"
class="org.apache.synapse.commons.json.JsonFormatter"/></span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; 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></div>
<b style="font-weight: normal;">
</b>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; 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;">Message Builder</span></div>
<b style="font-weight: normal;">
</b>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; 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><span style="background-color: white; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">messageBuilder contentType="</span><span style="background-color: white;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">application/json</span><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">"</span></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; 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;"> class="org.apache.synapse.commons.json.JsonBuilder"/></span></div>
<div>
<span style="background-color: white; 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></div>
</div>
</div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17.25px; white-space: pre-wrap;"><i><br /></i></span></span>
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 17.25px; white-space: pre-wrap;"><i>To set response to be json format in /submitOrder resource of Order API.</i></span></div>
</div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-50a5f51a-cdea-11bd-1187-eee331b23ab4"><span style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Set messageType and content-type as ‘application/json’ in out-sequence of /submitOrder resource.</span></span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<br />
<span style="font-family: Arial;"><span style="font-size: 15px; line-height: 17.25px; white-space: pre-wrap;"><outSequence>
<span style="background-color: yellow;"><property name="messageType" value="application/json" scope="axis2"/>
<property name="ContentType" value="application/json" scope="axis2"/></span>
<send/>
</outSequence></span></span><span style="line-height: 1.15;">
</span></div>
<div>
</div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><i><br /></i></span>
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><i>To accept json formatted inputs for /submitOrder API resource</i></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;">
</span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: justify;">
<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;">To pass the payload as json from client and then convert that payload from json to xml in APIManager side,we have added below payload factory inside ‘/submitOrder’ API resource.</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;"><br /></span></div>
</div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial;"><span style="background-color: yellow;"><i><span style="font-size: 15px; line-height: 17.25px; white-space: pre-wrap;"><payloadFactory media-type="xml">
<format>
<Order>
<customerName>$1</customerName>
<quantity>$2</quantity>
<creditCardNumber>$3</creditCardNumber>
<delivered>$4</delivered>
</Order>
</format>
<args>
<arg expression="$.Order.customerName" evaluator="json"></arg>
<arg expression="$.Order.quantity" evaluator="json"></arg>
<arg expression="$.Order.creditCardNumber" evaluator="json"></arg>
<arg expression="$.Order.delivered" evaluator="json"></arg>
</args>
</payloadFactory> </span></i></span></span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial;"><span style="background-color: white; font-size: 15px; line-height: 17.25px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="background-color: white; font-size: 15px; line-height: 17.25px; white-space: pre-wrap;">The changed order API is as below.</span></span></div>
<div>
<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></div>
<pre class="brush:xml"><?xml version="1.0" encoding="UTF-8"?><api xmlns="http://ws.apache.org/ns/synapse" name="admin--Order" context="/Order" version="1" version-type="url">
<resource methods="POST" url-mapping="/submitOrder">
<inSequence>
<payloadFactory media-type="xml">
<format>
<Order>
<customerName>$1</customerName>
<quantity>$2</quantity>
<creditCardNumber>$3</creditCardNumber>
<delivered>$4</delivered>
</Order>
</format>
<args>
<arg expression="$.Order.customerName" evaluator="json"></arg>
<arg expression="$.Order.quantity" evaluator="json"></arg>
<arg expression="$.Order.creditCardNumber" evaluator="json"></arg>
<arg expression="$.Order.delivered" evaluator="json"></arg>
</args>
</payloadFactory>
<property name="POST_TO_URI" value="true" scope="axis2"/>
<filter source="$ctx:AM_KEY_TYPE" regex="PRODUCTION">
<then>
<send>
<endpoint name="admin--TTT_APIproductionEndpoint_0" >
<address uri="https://localhost:9463/services/orderSvc/" format="soap11">
<timeout>
<duration>30000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<errorCodes>-1</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<errorCodes>-1</errorCodes>
</markForSuspension>
</address>
</endpoint>
</send>
</then>
<else>
<sequence key="_sandbox_key_error_"/>
</else>
</filter>
</inSequence>
<outSequence>
<property name="messageType" value="application/json" scope="axis2"/>
<property name="ContentType" value="application/json" scope="axis2"/>
<send/>
</outSequence>
</resource>
<resource methods="GET" uri-template="/cancelOrder/{id}">
<inSequence>
<property name="POST_TO_URI" value="true" scope="axis2"/>
<filter source="$ctx:AM_KEY_TYPE" regex="PRODUCTION">
<then>
<send>
<endpoint name="admin--TTT_APIproductionEndpoint_0" >
<address uri="https://localhost:9463/services/orderSvc/" format="soap11">
<timeout>
<duration>30000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<errorCodes>-1</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<errorCodes>-1</errorCodes>
</markForSuspension>
</address>
</endpoint>
</send>
<else>
<sequence key="_sandbox_key_error_"/>
</else>
</filter>
</inSequence>
<outSequence>
<send/>
</outSequence>
</resource>
<resource methods="GET" uri-template="/orderStatus/{id}">
<inSequence>
<property name="POST_TO_URI" value="true" scope="axis2"/>
<filter source="$ctx:AM_KEY_TYPE" regex="PRODUCTION">
<then>
<send>
<endpoint name="admin--TTT_APIproductionEndpoint_0" >
<address uri="https://localhost:9463/services/orderSvc/" format="soap11">
<timeout>
<duration>30000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<errorCodes>-1</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<errorCodes>-1</errorCodes>
</markForSuspension>
</address>
</endpoint>
</send>
</then>
<else>
<sequence key="_sandbox_key_error_"/>
</else>
</filter>
</inSequence>
<outSequence>
<send/>
</outSequence>
</resource>
<handlers>
<handler class="org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler"/>
<handler class="org.wso2.carbon.apimgt.gateway.handlers.throttling.APIThrottleHandler">
<property name="id" value="A"/>
<property name="policyKey" value="gov:/apimgt/applicationdata/tiers.xml"/>
</handler>
<handler class="org.wso2.carbon.apimgt.usage.publisher.APIMgtGoogleAnalyticsTrackingHandler">
<property name="configKey" value="gov:/apimgt/statistics/ga-config.xml"/>
</handler>
<handler class="org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerExtensionHandler"/>
</handlers>
</api>
</pre>
<span style="font-family: Times, Times New Roman, serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Now let's try to invoke /submitOrder method of API.
A sample curl request would be as ; </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">curl -d @payload.json "Authorization:Bearer xxxxx" -H "Content-Type:application/json" <span style="background-color: #fce5cd; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><a href="http://localhost:8280/Order/1/submitOrder" style="background-color: white; text-decoration: none;">http://localhost:8280/Order/1/submitOrder</a></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">payload.json content -
</span><br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.25px; white-space: pre-wrap;"><i>{"Order":{"customerName:"PP_88","quantity":"8" ,"</i></span><i><span style="line-height: 17.25px; white-space: pre-wrap;">.creditCardNumber</span></i><i style="line-height: 17.25px; white-space: pre-wrap;">":"1234","delivered":"true"}}</i></span><br />
<i style="font-family: Arial; font-size: 15px; line-height: 17.25px; white-space: pre-wrap;">
</i>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.25px; white-space: pre-wrap;">Response would be as below</span><i style="line-height: 17.25px; white-space: pre-wrap;">.</i></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><i style="line-height: 17.25px; white-space: pre-wrap;">
</i>
<span style="line-height: 17.25px; white-space: pre-wrap;"><i>{"Order":{"orderId</i></span><i style="line-height: 17.25px; white-space: pre-wrap;">:"</i><span style="background-color: rgba(254, 254, 254, 0.992157); white-space: normal;">a4c1315d-8a07-4e80-85b1-3795ab47db7a</span><i style="line-height: 17.25px; white-space: pre-wrap;">",</i><i style="line-height: 17.25px; white-space: pre-wrap;">"date:"</i><span style="background-color: rgba(254, 254, 254, 0.992157); white-space: normal;">06/24/2014 08:43:52</span><i style="line-height: 17.25px; white-space: pre-wrap;">",</i><span style="line-height: 17.25px; white-space: pre-wrap;"><i>"customerName:"PP_88","quantity":"8" ,"</i></span><i><span style="line-height: 17.25px; white-space: pre-wrap;">.creditCardNumber</span></i><i style="line-height: 17.25px; white-space: pre-wrap;">":"1234","delivered":"true"}}</i></span><br />
<i style="font-family: Arial; font-size: 15px; line-height: 17.25px; white-space: pre-wrap;">
</i>
</div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com0tag:blogger.com,1999:blog-5463821059371549738.post-49995382649339698142014-01-21T08:24:00.002-08:002014-03-24T00:19:13.008-07:00[WSO2 AM] APIStore User Signup as an approval process<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">In previous versions of WSO2 APIManager before 1.6.0, it was allowed any user who's accessible the running APIStore come and register to the app.But there will be requirement like,without allowing any user to signup by him/her self alone,first get an approve by a privileged user and then allow to complete app registration.Same requirement can be apply to application creation and subscription creation as well.To fulfill that,we have introduced workflow extension support for </span><span style="font-family: Arial, Helvetica, sans-serif;">WSO2 APIManager </span><span style="font-family: Arial, Helvetica, sans-serif;">and you can find the introductory post on this feature from my previous blog post on "<a href="http://lalajisureshika.blogspot.com/2013/12/workflow-extentions-with-wso2-am-160.html">workflow-extentions-with-wso2-am-160</a></span><span style="font-family: Arial, Helvetica, sans-serif;">"</span><span style="font-family: Arial, Helvetica, sans-serif;">.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">From this blog-post,I'll explain how to achieve simple workflow integration with default shipped resources with WSO2 APIManager 1.6.0 and WSO2 Business Process Server 3.1.0 with targeting "user-signup" process.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<u><span style="font-family: Arial, Helvetica, sans-serif;">Steps</span></u></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
</div>
<ul>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">First download the WSO2 APIManager 1.6.0[AM] binary pack from <a href="http://wso2.com/products/api-manager/">product download page</a>.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Extract it and navigate to {AM_Home}/business-processes directory.You'll be find three sub-directories and browse "user-signup" directory.You'll notice a bpel and a human task exist inside it.These bpel and human task created with WSO2 Business Process Server 3.1.0 and try downloading BPS 3.1.0 from <a href="http://wso2.com/products/business-process-server/">product download page</a> and extract it.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">For further references,we'll keep APIM offset value as 0 and BPS offset value as 2 </span></li>
</ul>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> For BPS ->Change <offset>2</offset> in carbon.xml [{BPS_Home}/repository/conf]</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> For AM- >Keep the default value</span></div>
<ul>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Copy /epr directory found in {AM_Home}/business-processes directory in to repository/conf folder of Business Process Server.</span></li>
<li style="text-align: left;"><span style="font-family: Arial, Helvetica, sans-serif;">Then copy the UserApprovalTask-1.0.0.zip file located at {AM_Home}/business-processes/user-signup/HumanTask to {BPS_Home}repository/deployment/server/humantasks directory.</span></li>
<li style="text-align: left;"><span style="font-family: Arial, Helvetica, sans-serif;">Then copy the UserSignupApprovalProcess_1.0.0.zip file located at {AM_Home}/business-processes/user-signup/BPEL to {BPS_Home}repository/deployment/server/bpel directory.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Then start Business Process Server 3.1.0 [BPS].Once you login to BPS management console,you'll see the BPEL and Human Task are successfully deployed in BPS as follow.</span></li>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-BnzkGFi7Aic/Ut58TH7_cAI/AAAAAAAAA5w/bxpYzTXva3U/s1600/bpel.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://2.bp.blogspot.com/-BnzkGFi7Aic/Ut58TH7_cAI/AAAAAAAAA5w/bxpYzTXva3U/s1600/bpel.png" height="104" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">deployed user-signup bpel</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-Xvak1tm9JRA/Ut58UmyRevI/AAAAAAAAA54/GBr1iBhDX5Y/s1600/ht.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://2.bp.blogspot.com/-Xvak1tm9JRA/Ut58UmyRevI/AAAAAAAAA54/GBr1iBhDX5Y/s1600/ht.png" height="94" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">deployed user-signup human task</td></tr>
</tbody></table>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<ul>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Now,we have configured BPS server and it's time to configure AM with enabling triggering the BPS side deployed user-signup process.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Edit WSO2 APImanager configuration file to enable web service based workflow execution. For this we need to edit api-manager.xml located inside {AM_Home}/repository/conf.All work flow related configurations are located inside <workflowextensions> configuration section. Replace the existing content for WorkFlowExtension section for user-signup as follows. </workflowextensions></span></li>
</ul>
<span style="font-family: Arial, Helvetica, sans-serif;"> <UserSignUp executor="org.wso2.carbon.apimgt.impl.workflow.UserSignUpWSWorkflowExecutor"></span><br />
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"> <Property name="serviceEndpoint">http://localhost:9765/services/UserSignupProcess</Property></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"> <Property name="username">admin</Property></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"> <Property name="password">admin</Property></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"> <Property name="callbackURL">https://localhost:8243/services/WorkflowCallbackService</Property></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"> </UserSignUp></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<div>
<ul>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Then start the AM server.Browse for APIStore [https://localhost:9443/store].Try registering a new user from signup link shown in /Store page.Say a user called lalaji tries to register as an APIStore subscriber.</span></li>
</ul>
</div>
</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-Md0Vslopows/Ut6BZ9PQALI/AAAAAAAAA6I/pWm3JEJN_6c/s1600/signup.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-Md0Vslopows/Ut6BZ9PQALI/AAAAAAAAA6I/pWm3JEJN_6c/s1600/signup.png" height="320" width="292" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<ul>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Once the user submit user signup data a message similar to below saying "<span style="background-color: white; line-height: 20px;">User account awaiting Administrator approval</span>" will popup.</span></li>
</ul>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-_YBySATMvVM/Ut6BcyzdsFI/AAAAAAAAA6Q/jjYCsr4qk34/s1600/msg.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-_YBySATMvVM/Ut6BcyzdsFI/AAAAAAAAA6Q/jjYCsr4qk34/s1600/msg.png" height="156" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul style="text-align: left;">
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">If the user lalaji try to login ,it will failed as still the user-signup process hasn't completed and it's waiting until get the approval from administrator. <div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-CrvhRXEjiqs/Ut9ffuICVCI/AAAAAAAAA7o/z9qknxhE0-Q/s1600/sup.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-CrvhRXEjiqs/Ut9ffuICVCI/AAAAAAAAA7o/z9qknxhE0-Q/s1600/sup.png" height="213" width="320" /></a></div>
</span></li>
</ul>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<ul style="text-align: left;">
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">However,now the related business process has been triggered. You can view the created process instance by navigating to BPS management console [https://localhost:9445/carbon] and click on left menu Business Processes- >Instances<span style="color: #111111;"><span style="line-height: 15px;"> as shown below.</span></span></span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-N0vFMkGKinQ/Ut6XlhWNBoI/AAAAAAAAA6g/8U6EddGubag/s1600/bps.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-N0vFMkGKinQ/Ut6XlhWNBoI/AAAAAAAAA6g/8U6EddGubag/s1600/bps.png" height="256" width="640" /></a></div>
<div style="text-align: justify;">
<span style="color: #111111; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 15px;"><br /></span></span></div>
<div style="text-align: justify;">
<ul>
<li><span style="color: #111111; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 15px;">The BPEL,we deployed in WSO2 BPS is having a simple flow as below.</span></span></li>
</ul>
<span style="color: #111111; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 15px;">trigger the process -> Execute the Human Task [Approve/Reject] ->Send response to APIM callback endpoint</span></span></div>
<div style="text-align: justify;">
<span style="color: #111111; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 15px;"><br /></span></span></div>
<div style="text-align: justify;">
<ul>
<li><span style="color: #111111; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 15px;">Now the question coming,how we can execute the human task.Do we provide a custom UI to do this in WSO2 BPS side? No,but we have introduced a new web app called workflow-admin in APIM side to achieve this. </span></span></li>
<li><span style="color: #111111; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 15px;">Navigate to workflow-admin [https://localhost:9443/workflow-admin] web app from web browser and try login as a user who's having admin rights.</span></span></li>
</ul>
<span style="color: #111111; font-family: Arial, Helvetica, sans-serif; line-height: 15px;"> <b>NOTE</b>- In the sample human task we written,we have allowed only to users having </span><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; line-height: 15px;"> admin role to able to approve/disapprove task requests.So by default,only the users with admin role will able to login to workflow-admin app.But if you need to plug your own bpel and human task to APIM with allowing different user roles to accept/reject task requests he still can use the new human task with this web app and the task allowed role can be configurable from web app itself.</span></div>
<div style="text-align: justify;">
<span style="color: #111111; font-family: Arial, Helvetica, sans-serif; line-height: 15px;"><br /></span></div>
<div style="text-align: justify;">
<span style="color: #111111; font-family: Arial, Helvetica, sans-serif; line-height: 15px;">And make sure,to share the users-stores between WSO2 AM and WSO2 BPS </span></div>
<div style="text-align: justify;">
<span style="color: #111111; font-family: Arial, Helvetica, sans-serif; line-height: 15px;"><br /></span></div>
<div style="text-align: justify;">
<ul>
<li><span style="color: #111111; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 15px;">Once a user with admin role login to workflow-admin web app,he would see the pending tasks list which are waiting for approval by admin users.The logged in user can assign it to him,start the task then approve/reject the task request and finally complete the task.</span></span></li>
</ul>
<span style="color: #111111; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 15px;"></span></span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-raC7qdEpSPI/Ut6avlDxGcI/AAAAAAAAA60/Bi0agGrv-TQ/s1600/tasks.png" imageanchor="1" style="font-family: Arial, Helvetica, sans-serif; line-height: 15px; margin-left: auto; margin-right: auto; text-align: center;"><img border="0" src="http://1.bp.blogspot.com/-raC7qdEpSPI/Ut6avlDxGcI/AAAAAAAAA60/Bi0agGrv-TQ/s1600/tasks.png" height="106" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<br />
<span style="color: #111111; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 15px;"></span></span><br />
<span style="color: #111111; font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 15px;"><br /></span></span></div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-A8KiNmnXvRk/Ut6bKwFKbII/AAAAAAAAA68/9hhgHfY37cU/s1600/tasks2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-A8KiNmnXvRk/Ut6bKwFKbII/AAAAAAAAA68/9hhgHfY37cU/s1600/tasks2.png" height="142" width="640" /></a></div>
<br /></div>
<div style="text-align: justify;">
<br />
<ul>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Let's say,admin user approved above requested task from workflow-admin UI. Then the triggered process will be completed with calling the APIM callback endpoint and then the signup request sent user could able to login to APIStore successfully.</span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-fs268lvT3BM/Ut6cIYkPuaI/AAAAAAAAA7I/iEkIFItmNPQ/s1600/list.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-fs268lvT3BM/Ut6cIYkPuaI/AAAAAAAAA7I/iEkIFItmNPQ/s1600/list.png" height="138" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">In similar manner,you can try the default shipping BPELs for subscription process and application creation process triggerred from APIStore UI as well.For more info,please refer the readme.txt located at {AM_Home}/business-processes directory.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">NOTE- You can create your own bpels and human tasks with different flows on WSO2 BPS and then use with APIM.You can find more information on how to write business processes with WSO2 BPS,by reffering [1,2].</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Additionally,you can plug your own custom workflow executor to APIM without using WSO2 BPS.For that please refer [3].</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">[1] </span><a href="http://wso2.com/library/articles/writing-simple-ws-bpel-process-wso2-bps-apache-ode/">http://wso2.com/library/articles/writing-simple-ws-bpel-process-wso2-bps-apache-ode/</a></div>
<div>
[2] <a href="http://wso2.com/library/articles/2012/09/develop-wsbpel-apache-ode-wso2-developer-studio/">http://wso2.com/library/articles/2012/09/develop-wsbpel-apache-ode-wso2-developer-studio/</a></div>
<div>
[3] <a href="http://docs.wso2.org/display/AM160/Adding+Workflow+Extensions" style="background-color: white; color: #015782; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none;">http://docs.wso2.org/display/AM160/Adding+Workflow+Extensions</a></div>
</div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com0tag:blogger.com,1999:blog-5463821059371549738.post-67643161672742754502014-01-06T04:57:00.003-08:002014-01-20T19:18:55.379-08:00Exchanging SAML2 bearer tokens with OAuth2 tokens in WSO2 API Manager<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white; background-image: none; line-height: 17.325000762939453px; margin-bottom: 10px; padding: 0px; text-align: justify;">
<span style="line-height: 17.325000762939453px;"><span style="font-family: Arial, Helvetica, sans-serif;">To get access to a a managed API of WSO2 API Manager,a user has to pass an oauth token.From APIM 1.5.0 onwards a user can exchange his SAML2 token to obtain an OAuth2 token.This feature will be useful,in the following use-case :</span></span></div>
<div style="background-color: white; background-image: none; line-height: 17.325000762939453px; margin-bottom: 10px; padding: 0px; text-align: justify;">
<span style="line-height: 17.325000762939453px;"><span style="font-family: Arial, Helvetica, sans-serif;">Most of enterprise applications use SAML2 to engage a third-party identity provider to grant access to systems that are only authenticated against the enterprise application. These enterprise applications might need to consume OAuth-protected resources through APIs, after validating them against an OAuth2.0 authentication server. However, an enterprise application that already has a working SAML2.0 based Single Sign On infrastructure between itself and the IDP prefers to use the existing trust relationship, even if the OAuth authorization server is entirely different from the IDP. The SAML2 Bearer Assertion Profile for OAuth2.0 helps leverage this existing trust relationship by presenting the SAML2.0 token to the authorization server and exchanging it to an OAuth2.0 access token and then use that OAuth token to get access to APIs.</span></span></div>
<div style="background-color: white; background-image: none; line-height: 17.325000762939453px; margin-bottom: 10px; padding: 0px; text-align: justify;">
<span style="line-height: 17.325000762939453px;"><span style="font-family: Arial, Helvetica, sans-serif;">WSO2 API Manager provides SAML2 Bearer Assertion Profile Support with the OAuth 2.0 feature. WSO2 Identity Server (version 4.5.0 onwards) or any other SAML2 Identity provider can act as an identity service provider for the systems enabled with SSO. WSO2 API Manager acts as the OAuth authorization server. This way, an enterprise application can exchange the SAML2.0 bearer token that it retrieves when authenticating against an IDP (e.g., WSO2 Identity Server) with an OAuth2.0 access token from an OAuth authorization server (e.g., WSO2 API Manager). It can then use the OAuth2 token in API invocations.</span></span></div>
<div style="background-color: white; background-image: none; line-height: 17.325000762939453px; margin-bottom: 10px; padding: 0px; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">SAML 2.0 is an XML-based <a class="external-link" href="http://en.wikipedia.org/wiki/Communications_protocol" rel="nofollow" style="outline: none; text-decoration: none;">protocol </a>. It uses <a class="external-link" href="http://en.wikipedia.org/wiki/Software_token" rel="nofollow" style="outline: none; text-decoration: none;">security tokens </a>containing <a class="external-link" href="http://en.wikipedia.org/wiki/Security_Assertion_Markup_Language" rel="nofollow" style="outline: none; text-decoration: none;">assertions </a>to pass information about an enduser between a SAML authority and a SAML consumer. A SAML authority is an <a class="external-link" href="http://en.wikipedia.org/wiki/Identity_provider" rel="nofollow" style="outline: none; text-decoration: none;">identity provider </a>(IDP) and a SAML consumer is a <a class="external-link" href="http://en.wikipedia.org/wiki/Service_provider" rel="nofollow" style="outline: none; text-decoration: none;">service provider </a>(SP).</span></div>
<div style="background-color: white; background-image: none; color: #333333; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13.600000381469727px; line-height: 17.325000762939453px; margin-bottom: 10px; padding: 0px; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Wf5EP4QKwUs/UsqlD86UlKI/AAAAAAAAA5Y/q5miNTkLcNE/s1600/saml2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-Wf5EP4QKwUs/UsqlD86UlKI/AAAAAAAAA5Y/q5miNTkLcNE/s1600/saml2.png" height="532" width="640" /></a></div>
<div style="background-color: white; background-image: none; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13.600000381469727px; line-height: 17.325000762939453px; margin-bottom: 10px; padding: 0px; text-align: justify;">
<br /></div>
<div style="background-color: white; background-image: none; line-height: 17.325000762939453px; margin-bottom: 10px; padding: 0px; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><strong>[1]</strong>: User initiates the login call to an enterprise application<strong> <strong>.</strong></strong></span></div>
<div style="background-color: white; background-image: none; line-height: 17.325000762939453px; margin-bottom: 10px; padding: 0px; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><strong>[2]</strong>: </span></div>
<ul style="background-color: white; line-height: 17.325000762939453px; list-style-position: outside; margin-bottom: 10px; margin-left: 0px; margin-top: 0px; padding-left: 3em; padding-top: 0px;">
<li style="line-height: 13pt; margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-top: 0px;">As the application is a SAML Service Provider[SP], it redirects the user to the SAML2.0 IDP to log in. </span></li>
<li style="line-height: 13pt; margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-top: 0px;">The user provides credentials at the IDP and is redirected back to SP with a SAML2.0 token signed by the IDP. </span></li>
<li style="line-height: 13pt; margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-top: 0px;">The SP verifies the token and logs the user to the application. </span></li>
<li style="line-height: 13pt; margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-top: 0px;">The SAML 2.0 token is stored in the user's session by the SP.<strong> <strong> </strong></strong></span></li>
</ul>
<div style="background-color: white; background-image: none; line-height: 17.325000762939453px; margin-bottom: 10px; padding: 0px; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><strong>[3]</strong>:</span></div>
<ul style="background-color: white; line-height: 17.325000762939453px; list-style-position: outside; margin-bottom: 10px; margin-left: 0px; margin-top: 0px; padding-left: 3em; padding-top: 0px;">
<li style="line-height: 13pt; margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-top: 0px;">The enterprise application (SP) wants to access an OAuth2 protected API resource through WSO2 API Manager.</span></li>
<li style="line-height: 13pt; margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-top: 0px;">The application makes a request to the API Manager to exchange the SAML2 bearer token for an OAuth2.0 access token.</span></li>
<li style="line-height: 13pt; margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-top: 0px;">The API Manager validates the assertion and returns the access token.</span></li>
</ul>
<div style="background-color: white; background-image: none; line-height: 17.325000762939453px; margin-bottom: 10px; padding: 0px; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><strong>[4]</strong>: With the above returned oauth access token in step [3],API invocation through the API Manager will be happened successfully</span></div>
<div style="background-color: white; background-image: none; line-height: 17.325000762939453px; margin-bottom: 10px; padding: 0px; text-align: justify;">
<span style="font-size: x-small;"><br /></span></div>
<h4 id="TokenAPIs-Prerequisites" style="background-color: white; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 10px !important; padding: 0px; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">
Steps</span></h4>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<ul style="background-color: white; line-height: 13pt; list-style-position: outside; margin-bottom: 0px; margin-left: 0px; margin-top: 0px; padding-left: 3em; padding-top: 0px; text-align: left;">
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 13pt;">A signed SAML2 token (encoded assertion value), which you retrieve when authenticating against a SAML2 IDP is required. With the authentication request, you must pass attributes such as SAML2 issuer name, token endpoint and the restricted audience.</span></li>
</ul>
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 13pt; text-align: justify;">
</span><span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; line-height: 13pt; text-align: justify;"> To try out saml2 token grant type token generation with WSO2 IS/WSO2 APIM itself as IDP,you can use the saml2 client included in </span><a href="http://nallaa.wordpress.com/2013/04/04/saml2-bearer-assertion-profile-for-oauth-2-0-with-wso2-identity-server/" style="background-color: white; line-height: 13pt; text-align: justify;" target="_blank">here</a> and execute that java client with the command mentioned in it<span style="background-color: white; line-height: 13pt; text-align: justify;">. </span></span><br />
<ul style="background-color: white; line-height: 13pt; list-style-position: outside; margin-bottom: 0px; margin-left: 0px; margin-top: 0px; padding-left: 3em; padding-top: 0px; text-align: left;">
</ul>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.328125px;"><br /></span></span>
</div>
<ul style="background-color: white; list-style-position: outside; margin-bottom: 0px; margin-left: 0px; margin-top: 0px; padding-left: 3em; padding-top: 0px; text-align: left;">
<li style="line-height: 13pt; margin: 0px; padding: 0px;"><div style="background-image: none; line-height: 13pt; padding: 0px;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 13pt;">Then it need to register a <a href="http://docs.wso2.org/display/IS450/Trusted+Identity+Providers" target="_blank">Trusted Identity Provider </a>entry against above used IDP in WSO2 APIM,in-order to use the above generated saml2 token. L</span>og in to the APIM management console (https://ip:port/carbon) using admin/admin credentials and select <strong>Trusted Identity Providers</strong> sub menu from the <strong>Configure</strong> menu. </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
</li>
<li style="margin: 0px; padding: 0px;"><div style="line-height: 13pt; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 13pt;">Provide the following values in the page that opens:</span></div>
<ul style="list-style-position: outside; list-style-type: disc; margin-bottom: 0px; margin-left: 0px; margin-top: 0px; padding-left: 3em; padding-top: 0px;">
<li style="line-height: 13pt; margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;"><strong style="margin-bottom: 0px; margin-top: 0px;">Identity Provider Name: </strong>Enter a unique name for idP [Your SAML2 IDP]</span></li>
<li style="line-height: 13pt; margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;"><strong style="margin-top: 0px;">Identity Provider Issuer</strong> : The SAML2 issuer name specified when generating assertion token, <span style="margin-bottom: 0px;">which contains the unique identifier of the IDP</span></span></li>
<li style="margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;"><strong style="line-height: 13pt; margin-top: 0px;">Identity Provider Url</strong><span style="line-height: 13pt;"> : OAuth endpoint URL to which SAML2.0 assertion is delivered. It is defined with <i>SAML2 </i></span><span style="line-height: 17.328125px;"><i>assertion recipient</i></span><span style="line-height: 13pt;"> when generating SAML2.0 assertion token.</span></span></li>
<li style="line-height: 13pt; margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;"><strong style="margin-top: 0px;"><span style="color: black;">Identity Provider Public Certificate: </span></strong><span style="margin-bottom: 0px;">Upload Identity Provider public certificate.You can generate this by </span><span style="line-height: 20px; text-align: start;">keytool command as follow: </span></span></li>
</ul>
</li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 20px;">keytool -export -alias {alias} -file {fcertificateFileNameToBeCreated} -keystore {jks_file_name}</span></li>
<ul style="list-style-position: outside; list-style-type: disc; margin-bottom: 0px; margin-left: 0px; margin-top: 0px; padding-left: 3em; padding-top: 0px;">
<li style="margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 13pt;"><strong style="margin-bottom: 0px; margin-top: 0px;">Identity Provider Audience</strong> : The audience to which the SAML2 assertion is restricted. This URI is used when generating SAML2.0 assertion token.For example ,in this use-case,since saml2 token will be used by APIM,audience value can be added as </span><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.328125px;">https://{ip_apim:port_apim}/oauth2/token</span></span></li>
</ul>
</ul>
<br />
<ul style="background-color: white; list-style-position: outside; margin-bottom: 0px; margin-left: 0px; margin-top: 0px; padding-left: 3em; padding-top: 0px; text-align: left;">
<li style="margin: 0px; padding: 0px;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 13pt; text-align: justify;">A valid subscriber account in the API Store has to be created. See</span><span class="plugin_pagetree_children_span" style="font-family: Arial, Helvetica, sans-serif; line-height: 13pt; text-align: justify;"> <span class="confluence-link"><a href="http://docs.wso2.org/display/AM150/Signing+up+to+API+Store" style="outline: none;"><span class="confluence-link">Signing up to API Store</span></a></span>.</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 13pt; text-align: justify;"> </span></li>
</ul>
<ul style="background-color: white; line-height: 17.325000762939453px; list-style-position: outside; margin-bottom: 10px; margin-left: 0px; margin-top: 0px; padding-left: 3em; padding-top: 0px;">
<li style="line-height: 13pt; margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-top: 0px;">A valid consumer key and consumer secret need to be generated. Initially, these keys must be generated through APIStore by clicking the <strong>Generate</strong> link on <strong>My Subscriptions</strong> page. For more information, see<span class="confluence-link"> <a href="http://docs.wso2.org/display/AM150/Working+with+Access+Tokens" style="outline: none;">Working with Access Tokens</a>.</span> </span></li>
</ul>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.328125px;"><br /></span></span>
<br />
<ul style="background-color: white; line-height: 17.325000762939453px; list-style-position: outside; margin-bottom: 10px; margin-left: 0px; margin-top: 0px; padding-left: 3em; padding-top: 0px;">
</ul>
<h4 id="TokenAPIs-InvokingTokenAPItogenerateusertokensGenerateToken " style="background-color: white; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 10px !important; padding: 0px; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">
Invoking Token API to generate user tokens <span class="confluence-anchor-link" id="TokenAPIs-GenerateToken"></span> <span class="confluence-anchor-link"> </span></span></h4>
<div style="background-color: white; background-image: none; line-height: 17.325000762939453px; margin-bottom: 10px; padding: 0px;">
<div style="text-align: justify;">
<span class="confluence-anchor-link"><span style="font-family: Arial, Helvetica, sans-serif;">Follow the steps below to invoke Token API to generate user tokens from SAML2 assertions.</span></span></div>
</div>
<ol style="background-color: white; list-style-position: outside; margin-bottom: 0px; margin-left: 0px; margin-top: 0px; padding-left: 3em; padding-top: 0px;">
<li style="line-height: 13pt; margin: 0px; padding: 5px 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Combine the consumer key and consumer secret keys as<strong style="margin-top: 0px;"> </strong><code>consumer-key:consumer-secret</code> and encode the combined string using base64 using <span class="nolink"><a class="external-link" href="http://base64encode.org/" rel="nofollow" style="outline: none;">http://base64encode.org</a>. </span></span></li>
<li style="margin: 0px; padding: 5px 0px;"><div style="line-height: 13pt; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 13pt;">Access the Token API using a REST client such as the</span><span class="confluence-link" style="font-family: Arial, Helvetica, sans-serif; line-height: 13pt; margin-top: 0px;"> <a href="http://docs.wso2.org/display/AM150/Testing+APIs" style="outline: none;">WSO2 REST Client</a> </span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 13pt;">or Curl. The parameters are explained below:</span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><div style="text-align: justify;">
<span style="line-height: 17.328125px;"><br /></span></div>
</span><ul style="line-height: 13pt; list-style-position: outside; list-style-type: disc; margin-bottom: 0px; margin-left: 0px; margin-top: 0px; padding-left: 3em; padding-top: 0px;">
<li style="line-height: 13pt; margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Assuming that both the client and the API Gateway run on the same server, the Token API URL is <a class="external-link" href="https://localhost:8243/login" rel="nofollow" style="margin-bottom: 0px; margin-top: 0px; outline: none;">https://localhost:8243/token.</a></span></li>
<li style="line-height: 13pt; margin: 0px; padding: 0px; text-align: left;"><span style="font-family: Arial, Helvetica, sans-serif;">payload - <code style="margin-top: 0px;"><code>"grant_type=<a href="https://www.blogger.com/blogger.g?blogID=5463821059371549738" rel="nofollow" style="text-decoration: underline;">urn:ietf:params:oauth:grant-type:saml2-bearer&assertion=</a><saml2_encoded_assertion_token></saml2_encoded_assertion_token></code> {generated_saml2_token}</code><code>;scope=PRODUCTION"</code>. Replace the <code style="margin-bottom: 0px;"><saml2_encoded_assertion_token></saml2_encoded_assertion_token></code> value as appropriate.</span></li>
<li style="line-height: 13pt; margin: 0px; padding: 0px; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">headers - <code style="margin-top: 0px;">Authorization :Basic </code> Replace the <code style="margin-bottom: 0px;"><base64 encoded="" string=""></base64></code> as appropriate.</span></li>
</ul>
<div style="background-image: none; line-height: 13pt; margin-bottom: 10px; padding: 0px;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">For example, use the following cURL command used to access the Token API generates an access token and a refresh token. You can use the refresh token at the time a<span class="confluence-link"> <a href="http://docs.wso2.org/display/AM150/Token+APIs#TokenAPIs-Renewing" style="outline: none;">token is renewed</a>. </span></span></div>
</div>
<div style="background-image: none; margin-bottom: 10px; padding: 0px;">
<div style="text-align: justify;">
<div style="line-height: 13pt;">
<span class="confluence-link" style="font-family: Arial, Helvetica, sans-serif;"><b><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">curl -k -d </code><code class="java string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">"grant_type=urn:ietf:params:oauth:grant-type:saml2-bearer&assertion=<saml2_encoded assertion="">{generated_saml2_token}&scope=PRODUCTION"</saml2_encoded></code><span style="line-height: 15.1875px; white-space: pre-wrap;"> </span><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">-H </code><code class="java string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">"Authorization: Basic {base64encoded consumer key:secret}"</code><span style="line-height: 15.1875px; white-space: pre-wrap;"> </span><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">https:</code><code class="java comments" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">//ip_apim:port_apim/token</code></b></span></div>
<div style="line-height: 13pt;">
<span class="confluence-link" style="font-family: Arial, Helvetica, sans-serif;"><b><code class="java comments" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><br /></code></b></span></div>
<br /></div>
</div>
</li>
</ol>
<div style="background-color: white; background-image: none; color: #333333; font-family: Arial, Helvetica, FreeSans, sans-serif; line-height: 17.325000762939453px; margin-bottom: 10px; padding: 0px; text-align: justify;">
<span style="font-size: x-small;"><br /></span></div>
<div style="background-color: white; background-image: none; color: #333333; font-family: Arial, Helvetica, FreeSans, sans-serif; line-height: 17.325000762939453px; margin-bottom: 10px; padding: 0px; text-align: justify;">
<span style="font-size: x-small;"><br /></span></div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com1tag:blogger.com,1999:blog-5463821059371549738.post-57036653781589250202014-01-01T04:18:00.002-08:002014-01-01T04:18:41.718-08:00Good Bye 2013 !!!<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<span style="font-family: Arial, Helvetica, sans-serif; text-align: justify;">It was really a one of best year which I was able to bring my life a step ahead.There were times very challenging,cheerful,full of happiness and even with bit of sad.But still I do really love each and every moment of passed year as I was able to get a lot of experiences and fulfill some of my life-time dreams,which I never thought I will get a chance.</span><br />
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">The most precious opportunity I was got last year is step into my one from both ever dreamed country..FRANCE! :) We were there for around 1.5 weeks and of course it was an official visit.But once we completed our job successfully,was able to visit my dreamed places as;</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Eiffel Tower,Louvre Museum and more nice places and was able to meet really nice people from there..Merci Beaucoup<span style="line-height: 19px;">! for WSO2 to give this chance for me.. </span></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 19px;"><br /></span></span></div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-CxWTm7XUCpQ/UsMA9Fwx5WI/AAAAAAAAAwk/D7uZgUanIdA/s1600/IMG_0726.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-CxWTm7XUCpQ/UsMA9Fwx5WI/AAAAAAAAAwk/D7uZgUanIdA/s320/IMG_0726.JPG" width="320" /></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 19px;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-U61-OiFm_Po/UsL8Y9qeNdI/AAAAAAAAAwI/0vzEpv6ixew/s1600/IMG_0681.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-U61-OiFm_Po/UsL8Y9qeNdI/AAAAAAAAAwI/0vzEpv6ixew/s320/IMG_0681.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-pQf5EXb602c/UsL9EGydXcI/AAAAAAAAAwQ/qUJKikaEJZY/s1600/IMG_0719.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-pQf5EXb602c/UsL9EGydXcI/AAAAAAAAAwQ/qUJKikaEJZY/s320/IMG_0719.JPG" width="320" /></a></div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-y1H-Y75C3GY/UsMBjPLOu0I/AAAAAAAAAws/fqnyKER4WRY/s1600/IMG_0732.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-y1H-Y75C3GY/UsMBjPLOu0I/AAAAAAAAAws/fqnyKER4WRY/s320/IMG_0732.JPG" width="320" /></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 19px;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-BNFZ5DHhEeM/UsLS_SwBxBI/AAAAAAAAAv4/wUTjy2yCDsc/s1600/IMG_0708.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-BNFZ5DHhEeM/UsLS_SwBxBI/AAAAAAAAAv4/wUTjy2yCDsc/s320/IMG_0708.JPG" width="320" /></a><a href="http://4.bp.blogspot.com/-QDGTeydf4yI/UsMAzVblbaI/AAAAAAAAAwc/cE7vAQlVUU8/s1600/IMG_0925.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-QDGTeydf4yI/UsMAzVblbaI/AAAAAAAAAwc/cE7vAQlVUU8/s320/IMG_0925.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-8J5ih3NNceU/UsMP8SzZh6I/AAAAAAAAAxM/_NrprGZLQf4/s1600/IMG_1233.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-8J5ih3NNceU/UsMP8SzZh6I/AAAAAAAAAxM/_NrprGZLQf4/s320/IMG_1233.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-rVyyWpoQVpw/UsMPnzOCG8I/AAAAAAAAAxE/tn4tIe1GES8/s1600/IMG_1331.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-rVyyWpoQVpw/UsMPnzOCG8I/AAAAAAAAAxE/tn4tIe1GES8/s320/IMG_1331.JPG" width="240" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-cdxGJN5wtSc/UsMPaKeLEvI/AAAAAAAAAw8/fWark4VFDM4/s1600/IMG_1357.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-cdxGJN5wtSc/UsMPaKeLEvI/AAAAAAAAAw8/fWark4VFDM4/s320/IMG_1357.JPG" width="240" /></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 19px;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 19px;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 19px;">Then,not to forgot,the most challenging experience of my life ->Survive in a middle of really busy state[San Fransisco] in USA alone for one and half month! It was really a challenging and a memorable stay.It was mine first cal train experience without having navigator.It was mine first experience of figuring out how to find the way to staying apartment with only from road signals,without having any digital equipments ;) It was mine first experience of vising all the gardens,roads,and nice places to visit by figuring out by my own! And importantly it was mine first experience of such a long stay for an official visit.</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-1oQrBMuWBlA/UsPOg7VmfAI/AAAAAAAAAyg/PNmiSZa8Xc8/s1600/SAM_5487.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-1oQrBMuWBlA/UsPOg7VmfAI/AAAAAAAAAyg/PNmiSZa8Xc8/s320/SAM_5487.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-tNs_pFiYRIM/UsPEJXIciUI/AAAAAAAAAxg/SKutbqNnQiY/s1600/SAM_5509.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-tNs_pFiYRIM/UsPEJXIciUI/AAAAAAAAAxg/SKutbqNnQiY/s320/SAM_5509.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-kRpy8xXSDUo/UsPLlCMR_1I/AAAAAAAAAyM/veMM7cu6V2E/s1600/SAM_5523.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-kRpy8xXSDUo/UsPLlCMR_1I/AAAAAAAAAyM/veMM7cu6V2E/s320/SAM_5523.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-zsFEGxHKYJU/UsPGn00atRI/AAAAAAAAAxs/PEYTkule9ck/s1600/SAM_5529.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-zsFEGxHKYJU/UsPGn00atRI/AAAAAAAAAxs/PEYTkule9ck/s320/SAM_5529.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-DbaJvFSYPbY/UsPI2643ErI/AAAAAAAAAx4/ljvr7DBpoQ8/s1600/SAM_5527.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-DbaJvFSYPbY/UsPI2643ErI/AAAAAAAAAx4/ljvr7DBpoQ8/s320/SAM_5527.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-XMQDULvc16s/UsPLkVB3fZI/AAAAAAAAAyI/PrUwiTPA1C8/s1600/SAM_5534.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-XMQDULvc16s/UsPLkVB3fZI/AAAAAAAAAyI/PrUwiTPA1C8/s320/SAM_5534.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-ZfSPzRYASjI/UsPOOWKDpKI/AAAAAAAAAyY/Q_p9KLDeALU/s1600/SAM_5588.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-ZfSPzRYASjI/UsPOOWKDpKI/AAAAAAAAAyY/Q_p9KLDeALU/s320/SAM_5588.JPG" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-IokkjOwro2M/UsPP6kd7PvI/AAAAAAAAAys/UQKO107axiA/s1600/SAM_5726.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-IokkjOwro2M/UsPP6kd7PvI/AAAAAAAAAys/UQKO107axiA/s320/SAM_5726.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-xaw2DeYgQjo/UsPRr5L3gaI/AAAAAAAAAy4/voZiBp-VwVU/s1600/SAM_5728.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-xaw2DeYgQjo/UsPRr5L3gaI/AAAAAAAAAy4/voZiBp-VwVU/s320/SAM_5728.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-RuyQx2HieI0/UsPT6IGDNcI/AAAAAAAAAzE/f8cIfWpCjAE/s1600/SAM_5769.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-RuyQx2HieI0/UsPT6IGDNcI/AAAAAAAAAzE/f8cIfWpCjAE/s320/SAM_5769.JPG" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-OYsO_GZrOTs/UsPXHrQ_dnI/AAAAAAAAAzw/y8tpvtj8Fug/s1600/SAM_5808.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-OYsO_GZrOTs/UsPXHrQ_dnI/AAAAAAAAAzw/y8tpvtj8Fug/s320/SAM_5808.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-T7HhnCjJ3X8/UsPUbs3CMVI/AAAAAAAAAzM/wdZadRJx0H8/s1600/SAM_5827.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-T7HhnCjJ3X8/UsPUbs3CMVI/AAAAAAAAAzM/wdZadRJx0H8/s320/SAM_5827.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-9T-ReMWFZes/UsPcRGc3QAI/AAAAAAAAA04/KP6tpEIE7A0/s1600/SAM_5854.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-9T-ReMWFZes/UsPcRGc3QAI/AAAAAAAAA04/KP6tpEIE7A0/s320/SAM_5854.JPG" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-NnfexOVZ9pA/UsPU9aBhaFI/AAAAAAAAAzU/kHv2oNUq3zY/s1600/SAM_6031.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-NnfexOVZ9pA/UsPU9aBhaFI/AAAAAAAAAzU/kHv2oNUq3zY/s320/SAM_6031.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-POkFjZ1Yf48/UsPVcp06RRI/AAAAAAAAAzc/ifUQiwyVyxA/s1600/SAM_6039.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-POkFjZ1Yf48/UsPVcp06RRI/AAAAAAAAAzc/ifUQiwyVyxA/s320/SAM_6039.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-c9l6DW2R-wM/UsPWkjkJHSI/AAAAAAAAAzo/MLHL-Zze38g/s1600/SAM_6037.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://1.bp.blogspot.com/-c9l6DW2R-wM/UsPWkjkJHSI/AAAAAAAAAzo/MLHL-Zze38g/s400/SAM_6037.JPG" width="300" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-XdRWle5LYZQ/UsPXtB8apII/AAAAAAAAAz4/62FydagLHS8/s1600/SAM_6085.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-XdRWle5LYZQ/UsPXtB8apII/AAAAAAAAAz4/62FydagLHS8/s320/SAM_6085.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-vgqBp_MPoTw/UsPXwOwSH2I/AAAAAAAAA0A/APaw1sOSh9Y/s1600/SAM_6155%25281%2529.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-vgqBp_MPoTw/UsPXwOwSH2I/AAAAAAAAA0A/APaw1sOSh9Y/s320/SAM_6155%25281%2529.JPG" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-QFsRGoIzXrg/UsPYVD323bI/AAAAAAAAA0I/iioYWLsqgdI/s1600/SAM_6167%25281%2529.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-QFsRGoIzXrg/UsPYVD323bI/AAAAAAAAA0I/iioYWLsqgdI/s320/SAM_6167%25281%2529.JPG" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-vTK-q0eHyVk/UsPYeFeF4hI/AAAAAAAAA0Q/yVu2vG5TUis/s1600/SAM_6162%25281%2529.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-vTK-q0eHyVk/UsPYeFeF4hI/AAAAAAAAA0Q/yVu2vG5TUis/s320/SAM_6162%25281%2529.JPG" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-IORDyM0Tjq4/UsPZUCzUlZI/AAAAAAAAA0c/uqnRU-_C3AQ/s1600/SAM_6182.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-IORDyM0Tjq4/UsPZUCzUlZI/AAAAAAAAA0c/uqnRU-_C3AQ/s320/SAM_6182.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-D8F2uLIX3zY/UsPeUjGRkuI/AAAAAAAAA1Q/znWnFyy5aCQ/s1600/SAM_6215%25281%2529.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-D8F2uLIX3zY/UsPeUjGRkuI/AAAAAAAAA1Q/znWnFyy5aCQ/s320/SAM_6215%25281%2529.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-m1VkQxo2fIQ/UsPaVNVvYCI/AAAAAAAAA0k/TCdwR89Wfvk/s1600/SAM_6225.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-m1VkQxo2fIQ/UsPaVNVvYCI/AAAAAAAAA0k/TCdwR89Wfvk/s320/SAM_6225.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-RAemeHNn4dk/UsPb11l3UqI/AAAAAAAAA0w/eogKA273cjQ/s1600/SAM_6235.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-RAemeHNn4dk/UsPb11l3UqI/AAAAAAAAA0w/eogKA273cjQ/s320/SAM_6235.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-lFVfWp127iM/UsPdKfarwOI/AAAAAAAAA1A/keS-eMhTrMo/s1600/SAM_6264.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-lFVfWp127iM/UsPdKfarwOI/AAAAAAAAA1A/keS-eMhTrMo/s320/SAM_6264.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-i9-Uihs2L6A/UsPdpGULDrI/AAAAAAAAA1I/bHDkpqGeUEk/s1600/SAM_6272.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-i9-Uihs2L6A/UsPdpGULDrI/AAAAAAAAA1I/bHDkpqGeUEk/s320/SAM_6272.JPG" width="320" /></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 19px;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 19px;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 19px; text-align: left;">Next next was buying a land from my own! This was a dream in my mind for a quite a long time,but couldn't able to achieve it.Finally I was lucky enough to fulfill my dream.Now my parents already started planting in that land with many many fruits,vegetables :)and with the start of this December,we already have got the first set of vegetables and fruits for our meal from which we planted there :) </span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://4.bp.blogspot.com/-X8womuioJdY/UsLOH-AY0lI/AAAAAAAAAvg/WbQgvuGXW90/s1600/SAM_1417.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-X8womuioJdY/UsLOH-AY0lI/AAAAAAAAAvg/WbQgvuGXW90/s320/SAM_1417.JPG" width="213" /></a></span></div>
<br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 19px;"></span></span><br />
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 19px;"> And for the second time,I was there in USA for five weeks in last October and was able to discover SF state more.The interesting part of this stay is could able to join a cruise in Bay Area and watch Golden Gate Bridge from sea.And additionally,was got the chance to walk in Golden Gate Bridge,watched the movie Gravity and able to meet few new friends.</span></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 19px;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 19px;"><b>The most important lession </b>I learnt in 2013 was how to survive by my own foot! And I believe I could manage it.</span></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 19px;"><span style="text-align: left;">Thanks a lot everyone who encourage me and helped me from various ways. </span></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 19px;"><span style="text-align: left;"><b>Good Bye 2013 which had so much joyful and challenging memories! And warmly welcome 2014!</b></span></span></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com0tag:blogger.com,1999:blog-5463821059371549738.post-59787649561119780582013-12-30T09:17:00.000-08:002013-12-30T09:45:51.707-08:00Workflow Extentions with WSO2 AM 1.6.0<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">This is a major requirement raised by many WSO2 API Manager users many times and finally it was introduced with latest <a href="http://wso2.com/products/api-manager/" target="_blank">WSO2 APIManager 1.6.0</a> release.It's the ability of plugin workflow extensions in to APIManager major functionalities. As the first cut,we have introduced workflow extension support for below three major functionalities;</span><br />
<ul style="text-align: left;">
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">User Signup</span></li>
</ul>
<ul style="text-align: left;">
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">API Subscription </span></li>
</ul>
<ul style="text-align: left;">
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Application Creation</span></li>
</ul>
<span style="font-family: Arial, Helvetica, sans-serif;">By default,APIM binary pack is shipped with a java workflow executor and a web service executor to trigger workflow processes on above three functions and that executor can be defined and configurable via api-manager.xml file.If you wish to add your own workflow executor on each above three processes,that also possible.What you have to do is write your own custom executor and integrate it to WSO2 APIM pack via a configuration change in api-manager.xml file.For more information,please refer </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://docs.wso2.org/display/AM160/Adding+Workflow+Extensions">http://docs.wso2.org/display/AM160/Adding+Workflow+Extensions</a>.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Addition to providing ability to plug workflow executors to above three functions,with this release we are shifting three BPELs and three human tasks to use with default web-service executors mentioned above.To try that,download <a href="http://wso2.com/products/api-manager/" target="_blank">WSO2 AM 1.6.0</a> and navigate to {AM_Home}/business-processes and refer readme.txt of it.To deploy these provided BPELs and human tasks you need to download <a href="http://wso2.com/products/business-process-server/" target="_blank">WSO2 BPS </a>[which provides a <span style="background-color: white; line-height: 19px; text-align: left;">complete web-based graphical console to deploy, manage and view business processes</span>].</span><span style="font-family: Arial, Helvetica, sans-serif;">Generally the flow of usage of each of these BPEL is that;</span><br />
<ol>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">A user will trigger a one of above functional request [For eg: a user tries to signup to APIStore ] from APStore UI and that function request will be result with pending status until that request complete its workflow process.<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-Fiqn1ZX48hU/UsGxRHXBdQI/AAAAAAAAAvQ/_M9SQ1alZLI/s1600/useraccount-notification.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="128" src="http://4.bp.blogspot.com/-Fiqn1ZX48hU/UsGxRHXBdQI/AAAAAAAAAvQ/_M9SQ1alZLI/s320/useraccount-notification.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</span></li>
<li style="text-align: justify;"><div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">It needed to configure api-manager.xml with the default web-service workflow executor for each above functions and it needed to give the ws endpoints as the deployed bpel endpoints in WSO2 BPS.Such that,once a workflow request execute from APIStore UI as in 1),then the configured ws workflow executor will be executed and will trigger a business process instance in WSO2 BPS side based on deploed BPELs.</span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-9ZWwzdh9DDE/UsGwNUX8L2I/AAAAAAAAAvE/-XvNDMhu6mQ/s1600/aaf.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="130" src="http://3.bp.blogspot.com/-9ZWwzdh9DDE/UsGwNUX8L2I/AAAAAAAAAvE/-XvNDMhu6mQ/s640/aaf.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Deployed BPELs in WSO2 BPS</td></tr>
</tbody></table>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"><br /></span></div>
<span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-Io8SiXLnJbk/UsGv8h09i3I/AAAAAAAAAu8/KmAqi8XPRo4/s1600/nnv.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="234" src="http://1.bp.blogspot.com/-Io8SiXLnJbk/UsGv8h09i3I/AAAAAAAAAu8/KmAqi8XPRo4/s640/nnv.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Created business process instances in WSO2 BPS</td></tr>
</tbody></table>
</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">From that business process instance, a human task also will be created and to continue this process further,a permitted human interaction require to approve/reject the triggered task request.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Once the permitted human being,approve/reject the triggered workflow request [for eg: a </span><span style="font-family: Arial, Helvetica, sans-serif;">user signup request],then that human response will be pass to </span><a href="http://docs.wso2.org/display/AM160/Callback+Endpoint" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">APIM workflow callback </a><a href="http://docs.wso2.org/display/AM160/Callback+Endpoint" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">endpoint </a><span style="font-family: Arial, Helvetica, sans-serif;">and the APIM database tables will be updated accordingly based on workflow response.</span></li>
</ol>
</div>
<div style="text-align: justify;">
<ol>
</ol>
<span style="font-family: Arial, Helvetica, sans-serif;">You can get better idea,on usage of above BPELs,if you follow the above mentioned readme.txt inside APIM binary pack.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br />For above 3rd step in the BPEL flow,we have introduced a new web-application UI called 'workflow-admin' [https://ip:port/wotkflow-admin] in APIM binary pack.From this web application,it will basically list down the pending tasks,which needed to get approved/rejected by permitted users groups[admin users].A permitted user can login to this web application and view the pending tasks and assign to him/her and proceed with approving/rejecting that request and complete that human interaction needed task.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /><b>NOTE :</b>By default workflow-admin web application allows only users with admin role to be login to that web application,as the default shifting three human tasks in APIM has written as allowing the users having 'admin' roles to be approve/reject the created human tasks.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="285px;" src="https://lh6.googleusercontent.com/W-lUUsLI9cwlZsgdvpx9NewRPxlhYfc0Y9UbiUDkvBjs_5P8IiQ7PmfNa4Qn9LReZhy12ieveq_LTeCfKxwNaZ6TRfdFxKb0izCGjyLtLdWWRFMG-1XxZVUOig" style="margin-left: auto; margin-right: auto;" width="624px;" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Workflow-admin webapp UI</td></tr>
</tbody></table>
<div style="text-align: justify;">
<span id="docs-internal-guid-5b2c785d-446f-f42d-a77f-5c14ef5e4820"></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<br /></div>
<div>
<br /></div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com0tag:blogger.com,1999:blog-5463821059371549738.post-39621535403623941622013-12-28T09:21:00.001-08:002014-01-06T03:10:12.229-08:00Digging to WSO2 BAM<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">From this blog-post,I'm going to explain how to setup WSO2 BAM 2.3.0 clustered setup with getting data from mediation agents[WSO2 ESB] and service agents[WSO2 AS].</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Components of the setup</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">1. ESB Cluster</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">2. AS Cluster</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">3. BAM Cluster</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> --- Two DR nodes</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> --- Four cassandra nodes</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> --- Two DA nodes</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> --- Two zoo-keeper nodes</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> --- One dashboard node</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">WSO2 BAM is used to aggregate ,analyze and visualize the data events coming from different agents.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">By default WSO2 BAM contains data agents for</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">--Collecting mediation statistics</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">--Collecting service statistics </span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">and more.To get more information on it,please refer [<a href="http://docs.wso2.org/display/BAM230/Data+Agents" target="_blank">1</a>].</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Once different data agents send different stat events to BAM side,first those row data will be stored to BAM integrated <b>No-SQL cassandra data store</b>.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><b>Note -</b>In WSO2 BAM,primary default data-store would be No-SQL cassandra and secondary data store is H2 based RDBMS database.Secondary database can be changed to any other RDBMS database type or Cassandra database.The reason to keep Cassandra as the primary data-store is because,there will be a very large volume of row data statistics come from different data agents to BAM in a real-world use-case.Since cassandra is having the capability of horizantal scalability and distributed storage;in other words,since we can have a large number of cluster nodes and able to write them to parelle<span style="line-height: 18px;">l cassandra has ben chosen.</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Then through hive-scripts, map-reduce jobs will be scheduled [this can be one-time or periodical] to underlying hadoop file-system and data will be analyzed and then move the analyzed data to a relational database.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Then by querying this relational database,the analyzed data will be visualize as gadgets/rendered html pages with using wso2 inbuilt dashboard capability.So in a company,the managerial level can be used these visualize data to analyze and make decisions on their business related data.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Due to flexible and componentize architecture of WSO2 BAM, same BAM node can be scale to act as different components.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">For example,a single BAM node consists the components of</span></div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<ul>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Data-Receiver</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Data-Analyzer</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Internal Cassandra</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Internal Hadoop</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Internal zoo-keeper</span></li>
</ul>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">If an organization wants to keep a BAM node as only to function as Data-receiver,that can be achieved through configurations easily.This is same for other BAM inbuilt componentize features as well.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Additionally,BAM can setup with external cassandra store or external hadoop cluster or external zookeeper cluster without using internal embedded ones.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">In our setup,we have used BAM to collect mediation statistics and service statistics.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">First we'll look into the data flow of the setup. Below diagram is showing the high-level architecture of the setup.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="http://1.bp.blogspot.com/-rrEMjNUDma0/UoNHPzOQaII/AAAAAAAAAto/8XAxz7jnmL0/s1600/BAM_Cluster+(2).png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Arial, Helvetica, sans-serif;"><img border="0" src="http://1.bp.blogspot.com/-rrEMjNUDma0/UoNHPzOQaII/AAAAAAAAAto/8XAxz7jnmL0/s640/BAM_Cluster+(2).png" height="412" width="640" /></span></a></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<ul>
<li><b><span style="font-family: Arial, Helvetica, sans-serif;">Setting ESB & AS Data Agents</span></b></li>
</ul>
<span style="font-family: Arial, Helvetica, sans-serif;">First we need to enable BAM statistics in ESB and AS.Then we have to enable mediation agent and service agent from each.For those,please refer;</span></div>
<div>
<div style="text-align: justify;">
<a href="http://docs.wso2.org/display/BAM230/Setting+up+Mediation+Data+Agent" style="font-family: Arial, Helvetica, sans-serif;">http://docs.wso2.org/display/BAM230/Setting+up+Mediation+Data+Agent</a><span style="font-family: Arial, Helvetica, sans-serif; text-align: justify;">t</span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://docs.wso2.org/display/BAM230/Setting+up+Service+Statistics+Data+Agent">http://docs.wso2.org/display/BAM230/Setting+up+Service+Statistics+Data+Agent</a></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;">
</span>
<br />
<ul style="text-align: left;">
</ul>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> In our-case,since we have setup two DR nodes to receive BAM stat events in load-balancing manner.We need to set ESB and AS data agents as load balancing data agents and we need to add two BAM receiver nodes urls in a load balancing manner in ESB and AS data agents side.To refer on how to do that,please refer </span><br />
<a href="http://docs.wso2.org/display/BAM230/Setting+up+Multi+Receiver+and+Load+Balancing++Data+Agent"><span style="font-family: Arial, Helvetica, sans-serif;">http://docs.wso2.org/display/BAM230/Setting+up+Multi+Receiver+and+Load+Balancing++Data+Agent</span></a><br />
<ul>
<li><span style="font-family: Arial, Helvetica, sans-serif;"><b>Setting BAM Data Receiver Nodes</b></span></li>
</ul>
<span style="font-family: Arial, Helvetica, sans-serif;">Then it need to configure BAM Data Receiver [DR]nodes. From setting multiple BAM receiver nodes,what will happen is,the data events from ESB/AS will recieve to those BAM nodes in a high available manner.If one DR node is down,the other node will be act as the data receiver.Once data events recieved to these BAM nodes,those need to send to primary cassandra storage to store the row data.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">As the configuration changes,we need to point these nodes to cassandra cluster and we need to define read/write consistency levels of data receivers which write data to cassandra.</span></div>
</div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Pointing to the cassandra cluster from DR nodes can be done by modifying cassandra-component.xml which can be found from {BAM_Home}/repository/conf as below.</span></div>
<div style="text-align: justify;">
<code class="html plain" style="background-color: white; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><</code><code class="html keyword" style="background-color: white; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">Cassandra</code><code class="html plain" style="background-color: white; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">></code></div>
<div style="text-align: justify;">
<div class="line number8 index7 alt1" style="background-color: rgb(255, 255, 255) !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; text-align: justify; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">
<div class="line number6 index5 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<div class="line number1 index0 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; font-family: 'Times New Roman'; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Cluster</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">></code></code></div>
<div class="line number2 index1 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: 'Times New Roman'; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: Arial, Helvetica, sans-serif;"><code class="html spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Name</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">>Test Cluster</</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="color: #336699;"><b>Name</b></span></code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">></code></span></span></code></div>
<div class="line number3 index2 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; font-family: 'Times New Roman'; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: Arial, Helvetica, sans-serif;"><code class="html spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Nodes</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">></code></span></span><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">cass_node1_ip:</code><code class="java value" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 153, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">9160</code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">,cass_node2_ip:</code><code class="java value" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 153, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">9160</code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">,cass_node3_ip:</code><code class="java value" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 153, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">9160</code><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: Arial, Helvetica, sans-serif;"><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"></</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Nodes</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">></code></span></span></code></div>
<div class="line number4 index3 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; font-family: 'Times New Roman'; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: Arial, Helvetica, sans-serif;"><code class="html spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">DefaultPort</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">>9160</</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">DefaultPort</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">></code></span></span></code></div>
<div class="line number5 index4 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; font-family: 'Times New Roman'; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: Arial, Helvetica, sans-serif;"><code class="html spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">AutoDiscovery disable="false" delay="1000" /</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">&gt</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">;</code></span></span></code></div>
<div style="color: rgb(0, 0, 0) !important;">
<code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"></</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Cluster</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">></code><span style="font-family: Arial, Helvetica, sans-serif;"><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"></code></span></code></div>
<div class="line number6 index5 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; font-family: 'Times New Roman'; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: Arial, Helvetica, sans-serif;"><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"></</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Cassandra</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">></code></span></span></code></div>
</div>
<code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">
</span></code></div>
<div class="line number8 index7 alt1" style="background-color: rgb(255, 255, 255) !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #333333; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; text-align: justify; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">
<code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></code></div>
<div class="line number8 index7 alt1" style="background-color: rgb(255, 255, 255) !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; text-align: justify; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">
<span style="font-family: Arial, Helvetica, sans-serif;"><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">Defining the </span></code><span style="background-color: transparent; text-align: justify;">read/write consistency levels of data receivers on writing data to cassandra cluster can be changed from streamdefn.xml which can be found from </span><span style="background-color: transparent; text-align: justify;">{BAM_Home}/repository/conf/advanced.</span></span></div>
<div class="line number8 index7 alt1" style="background-color: rgb(255, 255, 255) !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">
<span style="background-color: transparent; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">For example;</span></span></div>
<div class="line number8 index7 alt1" style="background-color: rgb(255, 255, 255) !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">
<span style="background-color: transparent; text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span></div>
<div class="line number8 index7 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<div class="line number1 index0 alt2" style="background-color: rgb(255, 255, 255) !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #333333; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; text-align: justify; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">
<span style="font-family: Arial, Helvetica, sans-serif;"><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">StreamDefinition</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">></code></span></div>
<div class="line number2 index1 alt1" style="background-color: rgb(255, 255, 255) !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #333333; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; text-align: justify; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">
<span style="font-family: Arial, Helvetica, sans-serif;"><code class="html spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">ReplicationFactor</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">>3</</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">ReplicationFactor</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">></code></span></div>
<div class="line number3 index2 alt2" style="background-color: rgb(255, 255, 255) !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #333333; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; text-align: justify; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">
<span style="font-family: Arial, Helvetica, sans-serif;"><code class="html spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">ReadConsistencyLevel</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">>QUORUM</</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">ReadConsistencyLevel</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">></code></span></div>
<div class="line number4 index3 alt1" style="background-color: rgb(255, 255, 255) !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #333333; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; text-align: justify; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">
<span style="font-family: Arial, Helvetica, sans-serif;"><code class="html spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">WriteConsistencyLevel</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">>QUORUM</</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">WriteConsistencyLevel</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">></code></span></div>
<div class="line number5 index4 alt2" style="background-color: rgb(255, 255, 255) !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #333333; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; text-align: justify; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">
<span style="font-family: Arial, Helvetica, sans-serif;"><code class="html spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">StrategyClass</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">>org.apache.cassandra.locator.SimpleStrategy</</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">StrategyClass</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">></code></span></div>
<div class="line number6 index5 alt1" style="background-color: rgb(255, 255, 255) !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #333333; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; text-align: justify; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">
<span style="font-family: Arial, Helvetica, sans-serif;"><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"></</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">StreamDefinition</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">></code></span></div>
<div class="line number6 index5 alt1" style="background-color: rgb(255, 255, 255) !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #333333; float: none !important; height: auto !important; left: auto !important; line-height: 15.1875px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; text-align: justify; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 0, 0) !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></code></div>
<div class="line number6 index5 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"></span></code><br />
<div style="background-color: rgb(255, 255, 255) !important; color: rgb(0, 0, 0) !important; line-height: 1.2em !important; text-align: justify; white-space: normal;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">In above configuration,the WriteConsistency and ReadConsistency has set as QUORUM = '(replication_factor / 2) +1' = '3/2 +1' = 2. Such that, you should have atleast 2 cassandra nodes up and running to the write to be succeed. </span></code></div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">
</span></code>
<br />
<div style="background-color: rgb(255, 255, 255) !important; color: rgb(0, 0, 0) !important; line-height: 1.2em !important; text-align: justify; white-space: normal;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">Hence we need to plan what is the tolerance level of the system, and we have to plan the WriteConsistency and ReadConsistency depending on that. To keep the tolerance of 1 node to be down, then it can be specified as 'ONE' or 'ANY'. Please refer <a href="http://www.datastax.com/docs/1.1/dml/data_consistency" style="color: #1155cc;" target="_blank">http://www.datastax.com/docs/<wbr></wbr>1.1/dml/data_consistency</a></span></code></div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">
</span></code>
<br />
<div style="background-color: rgb(255, 255, 255) !important; color: rgb(0, 0, 0) !important; line-height: 1.2em !important; text-align: justify; white-space: normal;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">Additionally we need to change default users-store of each nodes to common users-store by configuring user-mgt.xml in {BAM_Home}/repository/conf location.</span></code></div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">
</span></code>
<br />
<div style="background-color: rgb(255, 255, 255) !important; color: rgb(0, 0, 0) !important; line-height: 1.2em !important; text-align: justify; white-space: normal;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">Since these BAM DR nodes will not use BAM data analyzing feature and inbuilt cassandra support;</span></code></div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">
</span></code>
<br />
<div style="background-color: rgb(255, 255, 255) !important; color: rgb(0, 0, 0) !important; line-height: 1.2em !important; text-align: justify; white-space: normal;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">-- Can remove the <span style="color: black; line-height: 17.325000762939453px; text-align: left;">BAM Tool Box Deployer feature using </span><a href="http://docs.wso2.org/display/BAM230/Installed+Features" style="color: #326ca6; line-height: 17.325000762939453px; outline: none; text-align: left;">feature manager</a></span></code></div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">
</span></code>
<br />
<div style="background-color: rgb(255, 255, 255) !important; color: rgb(0, 0, 0) !important; line-height: 1.2em !important; text-align: justify; white-space: normal;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">-- Start BAM nodes with stop starting cassnadra bundled with server by giving below property with the server startup command.</span></code></div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">
</span></code>
<br />
<div style="color: rgb(0, 0, 0) !important; line-height: 1.2em !important; text-align: justify; white-space: normal;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; color: black; line-height: 17.325000762939453px; text-align: left;">sh wso2server.sh -Ddisable.cassandra.server.startup=true</span></span></code></div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">
</span></code>
<br />
<div style="color: rgb(0, 0, 0) !important; line-height: 1.2em !important; text-align: justify; white-space: normal;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; color: black; line-height: 17.325000762939453px; text-align: left;"><br /></span></span></code></div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">
</span></code>
<div style="text-align: justify;">
<ul><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">
<li><span style="line-height: 17.3125px;"><b>Setting BAM Cassandra Cluster</b></span></li>
</span></code></ul>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;">Next,it need to configure BAM cassandra cluster.</span><span style="line-height: 17.3125px;">As the cassandra cluster,you can either setup an external cassandra cluster or you can use BAM nodes with their inbuilt cassandra feature support.In this setup,we have used four BAM nodes with their inbuilt cassandra support as the cassandra cluster.In each of these BAM nodes,you have to change cassandra.yaml file which can be found from {BAM_Home}/repository/conf/etc location.</span></span></code><br />
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;"><br /></span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;">Basically,we need to change the following configurations in cassandra.yaml file.</span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;">--cluster_name- Change to a common name</span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;">--listen_address- Hostname of each BAM cassandra node</span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;">--seeds- Hostname of the seed nodes in cassandra cluster.Here we have set only one BAM node as the seed node.</span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;">--</span><span style="background-color: white; line-height: 15.1875px; text-align: left; white-space: pre-wrap;">initial_token -Tokens can be generated from </span><a class="external-link" href="http://www.datastax.com/docs/0.8/install/cluster_init#calculating-tokens-for-a-single-data-center" rel="nofollow" style="background-color: white; color: #326ca6; line-height: 17.325000762939453px; outline: none; text-align: left;">http://www.datastax.com/docs/0.8/install/cluster_init#calculating-tokens-for-a-single-data-center</a></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;">--rpc_address- </span><span style="line-height: 17.3125px;">Hostname of each BAM cassandra node</span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;">--rpc_port -A common port value across cassandra BAM nodes.Default value is 9160</span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;">--storage_port- Default value is 7000.Shoud be common across cassandra BAM nodes.</span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;"><br /></span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;"><b>NOTE</b> : If you have setup the BAM cassandra nodes with port-offset values,then you have to add additional two system properties to server startup as below,to connect all the nodes to one cassandra cluster.</span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;"><br /></span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;">-Dcassandra.rpc.port= default_port[9160]+offset</span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;">-Dcassandra.storage.port=defaut_port[7000]+offset</span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;"><br /></span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;">From above system properties,cassandra rpc and storage ports have been set to a common value with adding the offset value.Please note,the above defined same nodes need to be define in cassandra.yaml file.</span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;"><br /></span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;">The next major fact that we need to aware is, <b>whether the cassandra cluster successfully created and nodes are joined successfully or not</b>.</span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;">For that,we have used nodetool which is shipped with apache-cassandra 1.1.3.First downloaded apache-cassandra 1.1.3 from <a href="http://archive.apache.org/dist/cassandra/1.1.3/" target="_blank">here</a>,unzipped it and executed the below nodetool command.</span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;"><br /></span></span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; color: #222222; text-align: start;"> <b>./nodetool -u admin -pw admin -host <ip_of_bam_node> -p <jndi_rmi_port_of_bam_ndoe eg:9999=""> ring</jndi_rmi_port_of_bam_ndoe></ip_of_bam_node></b></span></span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; color: #222222; text-align: start;"><br /></span></span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; color: #222222; text-align: start;">From above command,it will list down all the nodes connected with that cassandra cluster.</span></span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; line-height: 19.1875px;">Additionally we need to change default users-store of each nodes to common users-store by configuring user-mgt.xml in {BAM_Home}/repository/conf location.</span></span></code></div>
<div style="text-align: justify;">
<ul><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">
<li><span style="color: #222222;"><b>Setting BAM Data Analyzer Nodes</b></span></li>
</span></code></ul>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #222222;">Next step is to configure BAM data analyzer nodes,which function as analyzing the row data stored in cassandra primary storage and put into a different secondary storage.For that BAM provided hive scripts support,such that,hive scripts will handle scheduling tasks into local inbuilt hadoop system in BAM nodes and process tasks with analyzing row data.</span></span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #222222;">To collect anayzed statistics of ESB mediation data and AS service data,BAM itself has predefined hive-scripts written to do analytics jobs from hadoop.</span></span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #222222;">These hive-scripts has been included to BAM binary pack in a deployable artifact type called<a href="http://docs.wso2.org/display/BAM230/Toolboxes+-+Installable+Artifacts" target="_blank"> BAM toolbox </a>.</span></span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #222222;">In our deployment,we have kept two BAM nodes as DA nodes in which one will act as read-write mode with ability to deploy toolbox artifacts,while other node is in read-only mode with disabling BAM toolbox deployment feature.Addition to that,we have used external zookeepr cluster setup to use with scheduling hadoop jobs in a high availability manner.The steps on how we did that can be found from the section "Configuring data analyzer cluster" described in </span></span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://docs.wso2.org/display/BAM230/Partially-Distributed%2C+Highly-Available+BAM+Setup">http://docs.wso2.org/display/BAM230/Partially-Distributed%2C+Highly-Available+BAM+Setup</a>.</span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">Once you configured two nodes and zookeeper cluster,to check whether the DA nodes provide high availability,try first deploy the relevant analytic scripts as toolboxes and enable executing those analytic scripts to be run as scheduled tasks.Then down one DA node and check whether the schedule task is properly trigger with the second DA node,when the first DA node is down.</span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">In this setup,we have not configured external hadoop cluster and used BAM inbuilt hadoop support.The reason for it is,the resources allocation we were had was less and the analyzing rate of data in our setup is not very frequent.Thus if one DA server down and if the analyzing of a row data entry failed at first time,when second task execution time,still that row data entry elligable to be analyzed and since analyzing of data not needed to be done frequently,we used BAM inbuilt hadoop support as it is.</span></code></div>
<div style="text-align: justify;">
<div style="background-color: white; color: #222222; text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>The advantage you get from having an external Hadoop cluster</b> is the possible performance increase. That is, basically, this affects the execution of a single Hive analytics operation. So if the Hive operation is an expensive operation, it's execution can be made faster if we had split operation among multiple Hadoop nodes, but in above setup, it will always execute in the local node. So if it need to scale the execution of individual jobs, it can be added an external Hadoop cluster and add nodes to it to make the operations ultimately finish executing earlier. If each individual Hive operations are not that large, and does not execute for a long period,then going with the internal Hadoop of each BAM node is fine.</span></code></div>
</div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></code></div>
<div style="text-align: justify;">
<div style="background-color: rgb(255, 255, 255) !important; line-height: 1.2em !important;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">Since these nodes will not use inbuilt cassandra support;</span></code></div>
<div style="background-color: rgb(255, 255, 255) !important; line-height: 1.2em !important;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 1.2em;">-- Start BAM nodes with stop starting cassandra bundled with server by giving below property with the server startup command.</span></span></code><br />
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 1.2em;"><br /></span>
<span style="line-height: 1.2em;"><span style="line-height: 17.3125px; text-align: left;">sh wso2server.sh -Ddisable.cassandra.server.startup=true</span></span></span></code></div>
</div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></code></div>
<div style="text-align: justify;">
<ul><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">
<li><span style="color: #222222;"><b>Setting BAM Dashboard Node</b></span></li>
</span></code></ul>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #222222;">This node is only to show the presentation dashboard with collected analyzed statistics.Such that you can edit the toolboxes to only include the presentation part and deploy in this node.Then modify the master-datasources.xml in {BAM_Home}/repository/conf/data-sources location to add the secondary relational database storage,which contains the analyzed statistics and same time which will be used to query to visualize from dashboard.</span></span></code></div>
<div>
<div style="background-color: rgb(255, 255, 255) !important; line-height: 1.2em !important;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">Since this node will not use inbuilt cassandra support;</span></code></div>
<div style="background-color: rgb(255, 255, 255) !important; line-height: 1.2em !important;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 1.2em;">-- Start BAM nodes with stop starting cassandra bundled with server by giving below property with the server startup command.</span></span></code><br />
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 1.2em;"><br /></span>
<span style="line-height: 1.2em;"><span style="line-height: 17.3125px; text-align: left;">sh wso2server.sh -Ddisable.cassandra.server.startup=true</span></span></span></code><br />
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 1.2em;"><span style="line-height: 17.3125px; text-align: left;"><br /></span></span></span></code>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 1.2em;"><span style="line-height: 17.3125px; text-align: left;">And disable data analyzing of the BAM node as well. For that remove the analyzer based features from that server from </span></span></span><a href="http://docs.wso2.org/display/BAM230/Installed+Features" style="color: #326ca6; font-family: Arial, Helvetica, sans-serif; line-height: 17.325000762939453px; outline: none; text-align: left;">feature manager</a><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 1.2em;"><span style="line-height: 17.3125px; text-align: left;">. </span></span></span></code></div>
</div>
<div style="background-color: rgb(255, 255, 255) !important; line-height: 1.2em !important;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 1.2em;"><br /></span></span></code></div>
<div style="background-color: rgb(255, 255, 255) !important; line-height: 1.2em !important;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></code></div>
</div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; color: #222222; text-align: start;"><br /></span></span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; color: #222222; text-align: start;"><br /></span></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></code></div>
<div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 17.3125px;"><br /></span></span></code></div>
</div>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">
</span></code></div>
</div>
</div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com0tag:blogger.com,1999:blog-5463821059371549738.post-77982305752942035022013-06-30T09:08:00.000-07:002013-07-22T04:51:08.561-07:00How to rollback/commit processing messages from WSO2 ESB when enabled JMS transaction<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;">This blog post describes the below use-case where WSO2 ESB 4.6.0 act as the intermediate channel in-between two JMS queues.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">The Use-case</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-vcQIEUF-w04/UdBd171uQbI/AAAAAAAAArg/7hCtOPGMcgY/s870/aa1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="121" src="http://1.bp.blogspot.com/-vcQIEUF-w04/UdBd171uQbI/AAAAAAAAArg/7hCtOPGMcgY/s400/aa1.jpg" width="400" /></a></div>
<br />
<ol style="text-align: left;">
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">First messages will be de-queue to a proxy service deployed in WSO2 ESB from an queue in ActiveMQ message broker.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Then inside ESB,the incoming messages will undergo with some message mediation flow and then the message will be send to another JMS queue deployed in JBoss server.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Inside the ESB,following failures could be happen; </span></li>
</ol>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> a) Failures during message mediation process failure inside ESB [for example if you </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> use </span><span style="font-family: Arial, Helvetica, sans-serif;">dbreportmediator/lookup mediator inside mediation flow,some times failures can </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> happen due </span><span style="font-family: Arial, Helvetica, sans-serif;">to database connection failures]</span></div>
<div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> b) Message sending failure,due to endpoint is unavailability.[For example,the JBoss </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> server </span><span style="font-family: Arial, Helvetica, sans-serif;">in which the endpoint queue deployed is down]</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">The requirement is if any of above failures happen,the message should not process further and send </span><span style="font-family: Arial, Helvetica, sans-serif;">to endpoint,rather it should rollback to the queue of JMS provider [ActiveMQ].If none of failures </span><span style="font-family: Arial, Helvetica, sans-serif;">happen the message should send to back-end endpoint.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">So how to achieve above requirement with JMS?</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">It can be achieve via enabling JMS transactions enabled.In this scenario,there will be no more transaction resources like databases,thus here it can be used JMS local transactions enabled.To enable it ,add below property in approapriate JMS transport receiver config of axis2.xml file of ESB [{ESB}/repositry/conf/axis2]</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><code class="html spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #333333; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"> </code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-size: 13px; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">parameter</code><span style="background-color: white; color: #333333; font-size: 13px; line-height: 15px; text-align: left; white-space: pre-wrap;"> </span><code class="html color1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(128, 128, 128) !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">name</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">=</code><code class="html string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 51, 102) !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">"transport.jms.SessionTransacted"</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">>true</</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-size: 13px; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">parameter</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">></code></span></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></code></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Additionally,there should be a way to control message rollbacking/commiting based on message mediation flow status.This can be achieved via setting the correct JMS acknowledgement mode.The correct acknowledgement mode for this scenario is 'Client Acknowledgement' mode.The different acknowledgement modes support by JMS are;</span></div>
<div style="text-align: justify;">
<br />
<br />
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><b style="line-height: 20px; margin-bottom: 10px; margin-top: 10px;">Auto mode:</b> The messages sent from ActiveMQ are automatically acknowledged. This is the simplest mode and expresses JMS's power by enabling once-only message delivery guarantee.If we set this in above scenario,the message will de-queue as the message reach to ESB from ActiveMQ without waiting until the message processed.</span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><b style="line-height: 20px; margin-bottom: 10px; margin-top: 10px;"> </b></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><b style="line-height: 20px; margin-bottom: 10px; margin-top: 10px;">Duplicates okay mode:T</b>he messages sent from ActiveMQ are automatically acknowledged just like auto mode.Under rare circumstances, the messages might be delivered more than once. This mode enables at-least-once message delivery guarantee.</span><span style="font-family: Arial, Helvetica, sans-serif;"><b style="line-height: 20px; margin-bottom: 10px; margin-top: 10px;"> </b></span><br /><span style="font-family: Arial, Helvetica, sans-serif;"><b style="line-height: 20px; margin-bottom: 10px; margin-top: 10px;"> </b></span><br /><span style="font-family: Arial, Helvetica, sans-serif;"><b style="line-height: 20px; margin-bottom: 10px; margin-top: 10px;">Client mode:</b> The messages sent from ActiveMQ are not acknowledged automatically. The application must acknowledge the message receipt. In above use-case,ESB should acknowledge ActiveMQ.This mode gives the application (rather than the JMS provider) complete control over message acknowledgement, at the cost of increased code complexity.</span></div>
<div style="text-align: justify;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">In above scenario the JMS message sending to the back-end is handle with ESB[JMS consumer],not by ActiveMQ [JMS provider].And until the message processed and send to backend,it need to pause de-queing the message from ActiveMQ to ESB.Thus it need to avoid JMS auto acknowledgement mode in this use-case.And based on ESB side failures/success,the message from queue in ActiveMQ should rollback or commit.For that on each failure/success statuses in message flow of ESB,it should acknowledge ActiveMQ,either to rollback or commit.And ESB need to send acknowledgement messages to ActiveMQ on its message mediation flow success/failure.In other words,its like sending 'client acknowledgement' messages to ActiveMQ.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">To set 'Client Acknowledgement' in ESB,set below property inapproapriate JMS transport receiver config of axis2.xml file of ESB [{ESB}/repositry/conf/axis2]</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-size: 13px; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">parameter</code><span style="background-color: white; color: #333333; font-size: 13px; line-height: 15px; text-align: left; white-space: pre-wrap;"> </span><code class="html color1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(128, 128, 128) !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">name</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">=</code><code class="html string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 51, 102) !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">"transport.jms.SessionAcknowledgement"</code><code class="html color1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(128, 128, 128) !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">locked</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">=</code><code class="html string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 51, 102) !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">"true"</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">>CLIENT_ACKNOWLEDGE</</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-size: 13px; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">parameter</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">></code></span><br />
<span style="font-family: monospace;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Then as an failure occurred in message mediation flow,we need to rollback the processing message back to ActiveMQ queue,<span style="background-color: white; line-height: 17px; text-align: left;"> the below property SET_ROLLBACK_ONLY has to be set to </span><b style="background-color: white; line-height: 17px; text-align: left;">true</b><span style="background-color: white; line-height: 17px; text-align: left;"> in relevant fault handler.</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; line-height: 17px; text-align: left;"><br /></span></span>
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">property</code><span style="background-color: white; color: #333333; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 15px; text-align: left; white-space: pre-wrap;"> </span><code class="html color1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(128, 128, 128) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">name</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">=</code><code class="html string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 51, 102) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">"SET_ROLLBACK_ONLY"</code><span style="background-color: white; color: #333333; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 15px; text-align: left; white-space: pre-wrap;"> </span><code class="html color1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(128, 128, 128) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">value</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">=</code><code class="html string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 51, 102) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">"true"</code><span style="background-color: white; color: #333333; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 15px; text-align: left; white-space: pre-wrap;"> </span><code class="html color1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(128, 128, 128) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">scope</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">=</code><code class="html string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 51, 102) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">"axis2"</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">/></code></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><br /></code></span></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">Once set as above,the above a) failure instances can be managed.Now the question comes,is it possible to cover message rollbacking to ActiveMQ queue again when the above b) failure instances also with JMS transactions and JMS client acknowledgement mode.Answer is yes,it's possible to do so.If your backend endpoint is;</span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">A http/https endpoint -Then you need to use 'callout mediator' to send the messages to backend.NOTE-If you use 'send mediator',you cannot achieve,JMS message rollbacking /commiting based on endpoint failure,due to http and https transports are asynchronous.</span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></code></div>
<div style="text-align: justify;">
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;">A JMS endpoint- You can use one from both 'callout' and 'send' mediator to send the messages to backend as JMS is a blocking transport.NOTE -If you are using the 'send' mediator,make sure you have remove below axis2 level property by your proxy service configuration.</span></code><br />
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><property name="</code"><code class="java string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 51, 102) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><</code><code class="html keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(51, 102, 153) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">property</code><span style="background-color: white; color: #333333; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 15px; text-align: left; white-space: pre-wrap;"> </span><code class="html color1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(128, 128, 128) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">name</code><code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">=</code><code class="html string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 51, 102) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">"</code></code></property></code><span style="font-family: monospace;">ClientApiNonBlocking</span><code class="java string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 51, 102) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"><code class="html string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 51, 102) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">" </code></code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">action=</code><code class="java string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 51, 102) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">"remove"</code><span style="background-color: white; color: #333333; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 15px; text-align: left; white-space: pre-wrap;"> </span><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">scope=</code><code class="java string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 51, 102) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">"axis2"</code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;">/></code><br />
<code class="html plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 15px; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap; width: auto !important;"></code><table border="0" cellpadding="0" cellspacing="0" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; clear: left; color: #333333; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 13px; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; width: 858px;"><tbody style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="code" style="background-color: white; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px dashed !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: 858px;"><div class="container" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 0px 0px 0em !important; position: relative !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre-wrap !important; width: auto !important;" title="Hint: double-click to select code">
<div class="line number1 index0 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; text-align: justify; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<div style="text-align: justify;">
<div style="text-align: left;">
<code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="line-height: 17px; white-space: normal;"><span style="color: black; font-family: Arial, Helvetica, sans-serif; font-size: small;">Axis2 will spawn a new thread to handle each outgoing message. To change this behavior,</span></span></code><br />
<code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin: 0px !important; min-height: inherit !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><span style="line-height: 17px; white-space: normal;"><span style="font-family: Arial, Helvetica, FreeSans, sans-serif;">remove this property from the message.</span></span></code><span style="font-family: Arial, Helvetica, sans-serif; line-height: 17px; text-align: justify;">A sample proxy service configuration,would be as below;</span></div>
</div>
</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://1.bp.blogspot.com/-zj1PbzpAgfU/UdBXYWFz_KI/AAAAAAAAArQ/qxGiAap2ZdA/s1048/Screenshot-16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="308" src="http://1.bp.blogspot.com/-zj1PbzpAgfU/UdBXYWFz_KI/AAAAAAAAArQ/qxGiAap2ZdA/s640/Screenshot-16.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;">To learn about JMS transactions and acknowledgement modes,please refer;</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: small;">[1]<a href="http://docs.wso2.org/wiki/display/ESB460/JMS+Transactions" style="line-height: 1.2em;">http://docs.wso2.org/wiki/display/ESB460/JMS+Transactions</a></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: small;">[2]<a href="http://www.javaworld.com/javaworld/jw-02-2002/jw-0315-jms.html" style="line-height: 1.2em;">http://www.javaworld.com/javaworld/jw-02-2002/jw-0315-jms.html</a></span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com4tag:blogger.com,1999:blog-5463821059371549738.post-7535145213331493482013-06-29T10:50:00.002-07:002013-06-30T05:08:47.670-07:00Setting up monitoring outgoing message from WSO2 API Manager with TCPMon<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
There will be some requirements that need to monitor the outgoing message from WSO2 API Manager to real back-end endpoint.For example monitor JWT token value as explained in <a href="http://lalajisureshika.blogspot.com/2013/06/passing-end-user-details-from-client-to.html" target="_blank">here</a>.</div>
<div style="text-align: justify;">
This blog-post describes how to add TCPMon monitoring in between WSO2 AM and real endpoint.In a diagram,below is how we going to setup TCPMon with WSO2 AM and endpoint.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-hhBzwLmqGpI/Uc8Y99iBKxI/AAAAAAAAAqQ/juPCHzQPaFY/s862/bbcc.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="278" src="http://2.bp.blogspot.com/-hhBzwLmqGpI/Uc8Y99iBKxI/AAAAAAAAAqQ/juPCHzQPaFY/s400/bbcc.jpg" width="400" /></a></div>
<div style="text-align: justify;">
In other words,it means that the messages from WSO2 APIM should go to real endpoint via TCPMon tool.</div>
<div style="text-align: justify;">
Say,real back-end endpoint is a web-service running in WSO2 Application Server[WSO2 AS] called 'echo'.</div>
<div style="text-align: justify;">
The web-service endpoint will be as <b>http://10.200.1.30:9763/echo</b></div>
<div style="text-align: justify;">
<b><br /></b></div>
<div style="text-align: justify;">
When you create an API from WSO2 API Manager,you have to give the 'Production URL' of Add API page in APIPublisher app pointing to above 'echo' web service endpoint as below.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-9rgalQ6ylxU/Uc8daby3wXI/AAAAAAAAAq4/YR-ravWP0rA/s536/Screenshot-14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-9rgalQ6ylxU/Uc8daby3wXI/AAAAAAAAAq4/YR-ravWP0rA/s1600/Screenshot-14.png" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
But,if you need to place TCPMon in-between WSO2 APIM and WSO2 AS ,that means you need to direct messages from WSO2 APIM to WSO2 AS via TCPMon tool.</div>
<div style="text-align: justify;">
Thus first start TCPMon.You can do this by executing tcpmon.sh script which can be found from WSO2 Products bin directories or by running TCPMon externally.\</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-dOLUkB2kIVo/Uc8d70eCQXI/AAAAAAAAArA/so_aeq7t_2M/s628/Screenshot-15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-dOLUkB2kIVo/Uc8d70eCQXI/AAAAAAAAArA/so_aeq7t_2M/s1600/Screenshot-15.png" /></a></div>
<div style="text-align: justify;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Define a listen port for TCPMon [here 8085] and then define the listener target hostname and port values as the back-end endpoint hostname[10.200.1.30] and port values[9763].</div>
<div style="text-align: justify;">
Then edit the 'Production URL' of the created API from WSO2 API Manager by changing its hostname and port values to map with TCPMon running hostname[localhost] and its defined listen port [8085] value.Hence as per above set TCPMon,the production URL of the API would be;</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>http://localhost:8085/echo</b></div>
<div style="text-align: justify;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-uvxJvDgmDpw/Uc8dHFhk5fI/AAAAAAAAAqw/0ePmJ9TJvZE/s569/Screenshot-13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-uvxJvDgmDpw/Uc8dHFhk5fI/AAAAAAAAAqw/0ePmJ9TJvZE/s1600/Screenshot-13.png" /></a></div>
<div style="text-align: justify;">
<b><br /></b></div>
Once done above changes,try invoking the created API.You will able to monitor the request and response flow in between APIManager and real endpoint [App Server].<br />
<br />
<br /></div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com2tag:blogger.com,1999:blog-5463821059371549738.post-63750850667517341942013-06-29T09:52:00.002-07:002013-06-30T05:10:13.428-07:00Passing end-user details from client to real backend endpoint via JWT token<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;">In real-world business system,WSO2 API Manager useful on exposing company APIs, in a secured and controlled manner with the features provided by APIManager as;</span><br />
<ul style="text-align: justify;">
<li><span style="font-family: Arial, Helvetica, sans-serif;">OAuth support [To secure API invocations]</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Throttling support [To control API invocations]</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Monitoring support [To track API usage] </span></li>
</ul>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">More technically what happening is when a user sends a particular API request,it will goes to WSO2 APIManager node and from there,the request will route to the real implemented back-end endpoint of the particular API and get back the response and returned it to the API invoked user. There can be a use-case,that this back-end endpoint may expect the details of API invoked user as to pass those details to some internal company usage as;</span><br />
<ul>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Additional authentication/authorization</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Track usage data from an internal system.</span></li>
</ul>
<span style="font-family: Arial, Helvetica, sans-serif;">So how to support above requirement from WSO2 AM.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">There comes the use of JSON Web Token[JWT] implementation done inside WSO2 AM. JWT is a means of representing claims to be transferred between two parties. <span style="background-color: white; text-align: -webkit-auto;">The claims in a JWT are encoded as a JavaScript Object Notation (JSON) object that is used as the payload of a JSON Web Signature (JWS) structure or as the plain-text of a JSON Web Encryption (JWE) structure, enabling the claims to be digitally signed or MACed and/or encrypted.For get more information on JWT tokens ,please refer this <a href="http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html" target="_blank">link</a>.</span></span><br />
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: -webkit-auto;">With current JWT token implementation of APIManager,following details will be pass to backend endpoint.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">
<span style="background-color: white; text-align: -webkit-auto;"></span>
</span><br />
<ol>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Subscriber Name</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Application Name</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Tier</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">End-User Name</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">API context</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Version</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Key Type [Production/Sandbox]</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">User Type[Application Token/User Token]</span></li>
</ol>
<span style="font-family: Arial, Helvetica, sans-serif;">
<span style="background-color: white; text-align: -webkit-auto;">Below blog content will guide you on how to enable JWT token passing support from APIManager.</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; text-align: -webkit-auto;"><br /></span>
<b>
<span style="background-color: white; text-align: -webkit-auto;">Configure WSO2 APIManager to pass JWT token</span></b></span><br />
<ol>
<li><span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: -webkit-auto;">Enable JWT token generation by uncommenting below configuration and set its value as true from api-manager.xml.</span></li>
</ol>
<span style="font-family: Arial, Helvetica, sans-serif;"> <b> <<enabletokengeneration>EnableTokenGeneration>true</EnableTokenGeneration></enabletokengeneration></b></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br />
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: -webkit-auto;"> 2. Start the AM server,create,publish API and subscribe it from the APIStore.</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br />
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: -webkit-auto;"> 3. Invoke the API and capture the outgoing message from the API Manager.Here its required to </span></span><br />
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: -webkit-auto;"> monitor transport level header values as JWT token will be pass to backend as a transport header.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; text-align: -webkit-auto;"><br /></span>
<span style="background-color: white; text-align: -webkit-auto;"> </span> To capture the outgoing message,you can use;</span><br />
<ul>
<li><span style="font-family: Arial, Helvetica, sans-serif;">By Tcpmon tool in-between APIManager node and backend endpoint.For more info,refer the <a href="http://lalajisureshika.blogspot.com/2013/06/monitoring-outgoing-message-from-wso2.html" target="_blank">blog</a>.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">By enabling wire logs of APIManager -By updating below configurations into log4j.properties file which can be found from {AM_Home}/repository/conf.If you follow this,you need to restart AM node.</span></li>
</ul>
<div>
<div style="text-align: left;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> <b>Uncomment</b> l<span class="pln" style="text-align: left;">og4j</span><span class="pun" style="color: #666600; text-align: left;">.</span><span class="pln" style="text-align: left;">category</span><span class="pun" style="color: #666600; text-align: left;">.</span><span class="pln" style="text-align: left;">org</span><span class="pun" style="color: #666600; text-align: left;">.</span><span class="pln" style="text-align: left;">apache</span><span class="pun" style="color: #666600; text-align: left;">.</span><span class="pln" style="text-align: left;">synapse</span><span class="pun" style="color: #666600; text-align: left;">.</span><span class="pln" style="text-align: left;">transport</span><span class="pun" style="color: #666600; text-align: left;">.</span><span class="pln" style="text-align: left;">nhttp</span><span class="pun" style="color: #666600; text-align: left;">.</span><span class="pln" style="text-align: left;">wire</span><span class="pun" style="color: #666600; text-align: left;">=</span><span class="pln" style="text-align: left;">DEBUG</span></span></div>
</div>
<div style="text-align: left;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> <b>Update </b>log4j.category.org.apache.synapse.transport=INFO as </span></div>
</div>
<div style="text-align: left;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> log4j.category.org.apache.synapse.transport=DEBUG</span></div>
</div>
</div>
<div>
<div style="text-align: justify;">
<span class="pln" style="font-family: Arial, Helvetica, sans-serif; text-align: left;"><br /></span></div>
</div>
<div>
<div style="text-align: justify;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="text-align: left;">With capturing APIManager outputting message from one of either above option,you'll see a HTTP header </span><span class="pln" style="text-align: left;">name as "</span><span style="background-color: white;"><span style="color: navy; font-weight: bold; line-height: 15px; text-align: -webkit-auto;">X-JWT-Assertion</span><span style="text-align: left;"><b>" </b>has append to transport headers.Note the JWT-Assertion header value will contains base64 encoded value.If you capture the outgoing message of </span></span><span style="background-color: white; text-align: left;">APIM with wirelogs,when you invoke an API,you'll see below logs will be output in APIM with JWT-Assertion.</span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: justify;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: left;"><br /></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: justify;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: left;">TID: [0] [AM] [2013-06-29 09:05:05,548] DEBUG {org.apache.synapse.transport.http.headers} - http-outgoing-1>><b>X-JWT-Assertion</b>: <span style="color: lime;">eyJ0eXAiOiJKV1QiLCJhbGciOiJTSEEyNTZ3aXRoUlNBIiwieDV0IjoiTm1KbU9HVXhNelpsWWpNMlpEUmhOVFpsWVRBMVl6ZGhaVFJpT1dFME5XSTJNMkptT1RjMVpBPT0ifQ==</span>.<span style="color: #990000;">eyJpc3MiOiJ3c28yLm9yZy9wcm9kdWN0cy9hbSIsImV4cCI6MTM3MjUyMjgwNTE3NywiaHR0cDovL3dzbzIub3JnL2NsYWltcy9zdWJzY3JpYmVyIjoibGFsYWppIiwiaHR0cDovL3dzbzIub3JnL2NsYWltcy9hcHBsaWNhdGlvbmlkIjoiMSIsImh0dHA6Ly93c28yLm9yZy9jbGFpbXMvYXBwbGljYXRpb25uYW1lIjoiRGVmYXVsdEFwcGxpY2F0aW9uIiwiaHR0cDovL3dzbzIub3JnL2NsYWltcy9hcHBsaWNhdGlvbnRpZXIiOiJVbmxpbWl0ZWQiLCJodHRwOi8vd3NvMi5vcmcvY2xhaW1zL2FwaWNvbnRleHQiOiIvYXBpMSIsImh0dHA6Ly93c28yLm9yZy9jbGFpbXMvdmVyc2lvbiI6IjEuMi4zIiwiaHR0cDovL3dzbzIub3JnL2NsYWltcy90aWVyIjoiVW5saW1pdGVkIiwiaHR0cDovL3dzbzIub3JnL2NsYWltcy9rZXl0eXBlIjoiUFJPRFVDVElPTiIsImh0dHA6Ly93c28yLm9yZy9jbGFpbXMvdXNlcnR5cGUiOiJBUFBMSUNBVElPTiIsImh0dHA6Ly93c28yLm9yZy9jbGFpbXMvZW5kdXNlciI6ImxhbGFqaSIsImh0dHA6Ly93c28yLm9yZy9jbGFpbXMvZW5kdXNlclRlbmFudElkIjoiLTEyMzQifQ==</span>.YtVaDtRYtfUkVDvwe9V8oqsXK8OkB4HUhsQS2z3ngWRNjAktSKWlH+Is9T5EQnsg8hrsJQ4nKDdwDWHAUIFxIsb7bX/Y1O+WSLMLZYQ11WVzFaw50BJuqPbL9ZOfux1iRnm4ZbxClVSan72g/w8a05UnCvsGyIh5oCP4RUsAhXo= {org.apache.synapse.transport.http.headers}</span></div>
</div>
</div>
<div style="text-align: justify;">
<div style="text-align: justify;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: left;"><br /></span></div>
<div style="text-align: justify;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: left;">To get the end user details,above base64 encoded string need to decode back.NOTE -Above encoded string contains three seperate encoded values.Those three are seperated from '.' [dot] sign. I have highlighted those three strings with different colors in above. You need to decode first two encoded strings to retrieve whole token structure.To decode,you can use www.base64decode.org link.</span></div>
<div style="text-align: justify;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: left;">Once you decode,above first encoded string [green colored] ,you'll get an output as;</span></div>
<div style="text-align: justify;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: left;"><br /></span></div>
<div style="text-align: justify;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: left;">{"typ":"JWT","alg":"SHA256withRSA","x5t":"NmJmOGUxMzZlYjM2ZDRhNTZlYTA1YzdhZTRiOWE0NWI2M2JmOTc1ZA=="}</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; text-align: left;">Above will output the token type as JWT and the algorithm used to encode the value as </span><span style="background-color: white; text-align: left;">SHA256withRSA.</span></span></div>
<div style="text-align: justify;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: left;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-DUVpCY2HVsk/Uc8O-wXSucI/AAAAAAAAAqA/kd7Ex-6GJFo/s558/Screenshot-11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Arial, Helvetica, sans-serif;"><img border="0" height="388" src="http://4.bp.blogspot.com/-DUVpCY2HVsk/Uc8O-wXSucI/AAAAAAAAAqA/kd7Ex-6GJFo/s400/Screenshot-11.png" width="400" /></span></a></div>
<div style="text-align: justify;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: left;"><br /></span></div>
<div style="text-align: justify;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: left;"><br /></span></div>
<div style="text-align: left;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif;">Then you can decode above second encoded string[red colored],you'll get end-user details as below.</span></div>
</div>
<div style="text-align: justify;">
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"><br /></span></span></div>
<div style="text-align: justify;">
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">{"iss":"wso2.org/products/am","exp":1372522805177,</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">"http://wso2.org/claims/subscriber":"lalaji",</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">"http://wso2.org/claims/applicationid":"1",</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"> "http://wso2.org/claims/applicationname":"DefaultApplication",</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"> "http://wso2.org/claims/applicationtier":"Unlimited",</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"> "http://wso2.org/claims/apicontext":"/api1",</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"> "http://wso2.org/claims/version":"1.2.3",</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">"http://wso2.org/claims/tier":"Unlimited",</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">"http://wso2.org/claims/keytype":"PRODUCTION",</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">"http://wso2.org/claims/usertype":"APPLICATION",</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"> "http://wso2.org/claims/enduser":"lalaji",</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">"http://wso2.org/claims/enduserTenantId":"-1234"}</span></span></div>
<div>
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"><br /></span></span></div>
<div>
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">Such that the overall Token Structure would be like below format;</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">{"typ":"JWT","alg":"SHA256withRSA","x5t":"NmJmOGUxMzZlYjM2ZDRhNTZlYTA1YzdhZTRiOWE0NWI2M2JmOTc1ZA=="}</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white;"></span><br />
</span><br />
<div>
<span style="background-color: white;"><span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">{"iss":"wso2.org/products/am","exp":1372522805177,</span></span></span><br />
<span style="background-color: white;"><span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">"http://wso2.org/claims/subscriber":"lalaji",</span></span></span><br />
<span style="background-color: white;"><span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">"http://wso2.org/claims/applicationid":"1",</span></span></span><br />
<span style="background-color: white;"><span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"> "http://wso2.org/claims/applicationname":"DefaultApplication",</span></span></span><br />
<span style="background-color: white;"><span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"> "http://wso2.org/claims/applicationtier":"Unlimited",</span></span></span><br />
<span style="background-color: white;"><span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"> "http://wso2.org/claims/apicontext":"/api1",</span></span></span><br />
<span style="background-color: white;"><span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"> "http://wso2.org/claims/version":"1.2.3",</span></span></span><br />
<span style="background-color: white;"><span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">"http://wso2.org/claims/tier":"Unlimited",</span></span></span><br />
<span style="background-color: white;"><span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">"http://wso2.org/claims/keytype":"PRODUCTION",</span></span></span><br />
<span style="background-color: white;"><span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">"http://wso2.org/claims/usertype":"APPLICATION",</span></span></span><br />
<span style="background-color: white;"><span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"> "http://wso2.org/claims/enduser":"lalaji",</span></span></span><br />
<span style="background-color: white;"><span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">"http://wso2.org/claims/enduserTenantId":"-1234"}</span></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white;"><span style="background-color: white;"><span style="text-align: left;"><br /></span></span></span>
</span><br />
<div style="text-align: left;">
<span style="background-color: white;"><span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;"><b>How to pass Access Token used to invoke API to backend</b></span></span></span></div>
</div>
<div>
</div>
</div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white;"><span style="text-align: left;"><br /></span></span>
</span><br />
<div style="text-align: justify;">
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">With above JWT token approach,it'll pass the end user details and the invoked API data.But it will not pass the access token to backend. In WSO2 APIManager default behaviour,once an API request comes with an access token include in the Authorization header,it'll first processed the API Key validation handler and drop that access token contained Authorization header from message,without passing it to back-end endpoint.</span></span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif; text-align: left;">If you want to pass an OAuth access token to back-end,m</span></span><span style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: left;">odify the below configuration in api-manager.xml.</span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white;"><span style="text-align: left;"><br /></span></span>
<span style="background-color: white;"><span style="text-align: left;"><b><RemoveOAuthHeadersFromOutMessage>false</RemoveOAuthHeadersFromOutMessage></b></span></span></span><br />
<span style="background-color: white;"><span style="font-family: Times, Times New Roman, serif;"><span style="text-align: left;"><br /></span></span></span>
</div>
</div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com7tag:blogger.com,1999:blog-5463821059371549738.post-33551231021833653682013-06-06T23:29:00.001-07:002013-06-30T05:11:58.597-07:00Message Format Transformation from SOAP to POX<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;">
<span style="font-size: small;">When WSO2 ESB used to process and forward some messages to a back-end endpoint,there will be chances,that back-end endpoint is expecting a XML message without a SOAP request.But at default,the messages which are pass through WSO2 ESB will be in SOAP format.</span></div>
<div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;">
<span style="font-size: small;">For example,say from WSO2 ESB ,we are passing messages to a queue/topic inside a JMS broker as ActiveMQ/JBoss. And the further processing on this queue by the backend will be expecting a XML message to be enqueue to the queue,instead a SOAP envelope.</span></div>
<div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;">
<span style="font-size: small;">Thus before send the message to JMS endpoint from WSO2 ESB,we need to convert the message format from SOAP to XML.</span></div>
<div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;">
<div style="text-align: justify;">
<span style="font-size: small;">This can be done through modifying the WSO2 ESB endpoint element.</span></div>
<div style="text-align: justify;">
<span style="font-size: small;">Add the attribute 'format=pox' to</span><span style="font-size: small;"> element of the <endpoint> configuration in the related WSO2 ESB proxy/sequence configuration as shown in below.</endpoint></span></div>
<br />
<br />
<b><span style="font-size: small;"><endpoint><endpoint name="jms-service-epr"></endpoint></span><span style="font-size: small;"><</span><span style="font-size: small;"><endpoint>address format="pox"<br />uri="jms:/SimpleStockQuoteService?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory& java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616" /</endpoint></span><span style="font-size: small;">></span></b></div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com0tag:blogger.com,1999:blog-5463821059371549738.post-25181866630545703192013-04-25T23:05:00.000-07:002013-06-30T05:16:58.616-07:00Concat two xml values with XSLT<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<span style="font-family: Times, Times New Roman, serif;"><br /></span></div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-voUtm3RMf4E/UXobdLdpo5I/AAAAAAAAAo4/ykwtwQALjvo/s1600/w3xslt.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-voUtm3RMf4E/UXobdLdpo5I/AAAAAAAAAo4/ykwtwQALjvo/s1600/w3xslt.gif" /></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">The <b>use-case</b> described in this blog-post,is there's an WSO2 ESB node setup to proxy an incoming message to a particular back-end endpoint. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Before delivering the message to the back-end endpoint,from the ESB node itself,this incoming message need to processed and change its inside xml payload format.</span><br />
<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/-p5QyJlOciKc/UXodeLh0BpI/AAAAAAAAApM/A_zqDwCAdeE/s1600/Untitled+drawing+(8).png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="254" src="http://3.bp.blogspot.com/-p5QyJlOciKc/UXodeLh0BpI/AAAAAAAAApM/A_zqDwCAdeE/s640/Untitled+drawing+(8).png" width="640" /></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">For eg: Below is the incoming message</span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><?xml version="1.0" encoding="UTF-8"?></span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><CinemaHall name="liberty"></span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><OwnerData></span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><Name>John Smith</Name></span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><openedDate>12/12/80</openedDate></span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><quality>good</quality></span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"></OwnerData></span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><CinemaHallData></span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><rows>100</rows></span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<b><span style="font-family: Arial, Helvetica, sans-serif;"><seats></span></b></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<b><span style="font-family: Arial, Helvetica, sans-serif;"><seat>50</seat></span></b></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<b><span style="font-family: Arial, Helvetica, sans-serif;"><seat>60</seat></span></b></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<b><span style="font-family: Arial, Helvetica, sans-serif;"></seats></span></b></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"></CinemaHallData></span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"></CinemaHall></span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">This message need to be changed as below;</span></div>
<div style="background-color: white; color: #222222; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; color: #222222; text-align: -webkit-auto;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><?xml version="1.0" encoding="UTF-8"?></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><CinemaHall name="liberty"></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><OwnerData></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><Name>John Smith</Name></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><openedDate>12/12/80</openedDate></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><quality>good</quality></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"></OwnerData></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><CinemaHallData></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><rows>100</rows></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><b><seats> </b><b>50,60 </b><b></seats></b></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"></CinemaHallData></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"></CinemaHall></span></div>
</div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Note I have highlighted which part of the payload need to be changed. So how to do that change. Simply you can use XSLT[<span style="background-color: white; line-height: 21px; text-align: -webkit-auto;">XSL Transformations</span>] support here.XSL means <span style="background-color: white; line-height: 21px; text-align: -webkit-auto;">XSL stands for EXtensible Stylesheet Language, and is a style sheet language for XML documents.Simply to do a XSLT transformation from ESB,you can use the support of in-built <a href="http://docs.wso2.org/wiki/display/ESB460/XSLT+Mediator" target="_blank">XSLT mediator</a> in it. Additionally you will a XSL stylesheet which contains the conversion source logic apart from incoming XML payload.</span></span></div>
<div style="text-align: justify;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 21px; text-align: -webkit-auto;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; line-height: 21px; text-align: -webkit-auto;">In the above example conversion,you'll see there are multiple XML elements called </span><span style="color: #222222;"><seat> in the XML input payload and thus,you need to iterate through each </span><span style="color: #222222;"><seat> element and get each value of it and concat those values with a ',' at each iteration.And specially appending of ',' need to avoid in last iterated </span><span style="color: #222222;"><seat></span><span style="color: #222222;"> </span><span style="color: #222222;"> value.</span></span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">Thus xsl sheet would contain,a for loop and if-else condition as the conversion source.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #222222;">In XSLT world for loop => </span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"><</span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"> </span><span style="background-color: white; color: #222222; text-align: -webkit-auto;">xsl:for-each</span><span style="background-color: white; color: #222222; text-align: -webkit-auto;">></span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"> </span><span style="background-color: white; color: #222222; text-align: -webkit-auto;">&lt/xsl:for-each</span><span style="background-color: white; color: #222222; text-align: -webkit-auto;">></span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"> </span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"> </span><span style="color: #222222;"> and if-else condition =></span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"><</span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"> </span><span style="background-color: white; color: #222222; text-align: -webkit-auto;">xsl:choose</span><span style="background-color: white; color: #222222; text-align: -webkit-auto;">></span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"> </span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"> </span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"><</span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"> </span><span style="background-color: white; color: #222222; text-align: -webkit-auto;">xsl:when</span><span style="background-color: white; color: #222222; text-align: -webkit-auto;">></span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"> </span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"><</span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"> </span><span style="background-color: white; color: #222222; text-align: -webkit-auto;">/xsl:when</span><span style="background-color: white; color: #222222; text-align: -webkit-auto;">></span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"> </span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"><xsl:choose></span><span style="background-color: white; color: #222222; text-align: -webkit-auto;"> </span></span></div>
<div style="text-align: justify;">
<span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; text-align: -webkit-auto;"><br /></span></div>
<div style="text-align: justify;">
<span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; text-align: -webkit-auto;">And the sample xsl sheet source for above conversion is as below;</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; color: #222222; text-align: -webkit-auto;"><br /></span>
</span><br />
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><?xml version="1.0" encoding="ISO-8859-1"?></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/></span></div>
<div style="text-align: -webkit-auto;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"> <xsl:template match="node()|@*"></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"> <xsl:copy></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"> <xsl:apply-templates select="node()|@*"/></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"> </xsl:copy></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"> </xsl:template></span></div>
<div style="text-align: -webkit-auto;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #222222;"> <xsl:template match="</span><span style="color: #222222;"><b>//</b></span><span style="background-color: white; color: #222222; text-align: justify;">CinemaHall</span><span style="color: #222222;"><b>/</b></span><span style="background-color: white; color: #222222; text-align: justify;">CinemaHallData</span><span style="color: #222222;">/seats"></span></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"> <seats></span></div>
<div style="text-align: -webkit-auto;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #222222;"> <b> <xsl:for-each select="//</b></span><b><span style="background-color: white; color: #222222; text-align: justify;">CinemaHall</span><span style="color: #222222;">/</span><span style="background-color: white; color: #222222; text-align: justify;">CinemaHallData</span><span style="color: #222222;">/seats/seat"></span></b></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><b> <xsl:variable name="i" select="position()" /> </b></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><b> <xsl:choose></b></span></div>
<div style="text-align: -webkit-auto;">
<b><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #222222;"> <xsl:when test="count(</span><span style="color: #222222;">//</span><span style="background-color: white; color: #222222; text-align: justify;">CinemaHall</span><span style="color: #222222;">/</span><span style="background-color: white; color: #222222; text-align: justify;">CinemaHallData</span><span style="color: #222222;">/seats/seat)-position() >=1"> </span></span></b></div>
<div style="text-align: -webkit-auto;">
<b><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #222222;"> <xsl:value-of select="concat(</span><span style="color: #222222;">//</span><span style="background-color: white; color: #222222; text-align: justify;">CinemaHall</span><span style="color: #222222;">/</span><span style="background-color: white; color: #222222; text-align: justify;">CinemaHallData</span><span style="color: #222222;">/seats/seat[$i] , ',')"/></span></span></b></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><b> </xsl:when></b></span></div>
<div style="text-align: -webkit-auto;">
<b><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #222222;"> <xsl:when test="count(</span><span style="color: #222222;">//</span><span style="background-color: white; color: #222222; text-align: justify;">CinemaHall</span><span style="color: #222222;">/</span><span style="background-color: white; color: #222222; text-align: justify;">CinemaHallData</span><span style="color: #222222;">/seats/seat)-position() =0"> </span></span></b></div>
<div style="text-align: -webkit-auto;">
<b><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #222222;"> <xsl:value-of select="</span><span style="color: #222222;">//</span><span style="background-color: white; color: #222222; text-align: justify;">CinemaHall</span><span style="color: #222222;">/</span><span style="background-color: white; color: #222222; text-align: justify;">CinemaHallData</span><span style="color: #222222;">/seats/seat[$i]"/></span></span></b></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><b> </xsl:when></b></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><b> </xsl:choose></b></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><b> </xsl:for-each> </b></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"> </seats> <span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"> </xsl:template></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"></xsl:stylesheet></span></div>
</div>
<div style="text-align: justify;">
<span style="background-color: white; text-align: -webkit-auto;"><span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"></span></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: -webkit-auto;">
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">Note to test,my XSL sheet correctness,I used online provided <a href="http://www.freeformatter.com/xsl-transformer.html" target="_blank">XSLT tool</a> support.</span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="color: #222222;"><span style="background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: 13px; text-align: -webkit-auto;"></span></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com3tag:blogger.com,1999:blog-5463821059371549738.post-41422064173885517292013-03-31T10:46:00.001-07:002013-03-31T11:01:30.126-07:00Consume WSO2 admin services via Javascript [Server-side]<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Each WSO2 product [eg: WSO2 ESB,GReg] provides specific and different functionalities which can be consume via product UI-admin console. But there are cases,where users want to use those functionalities,not from UI, but from their custom client implementations.That's where the importance of Carbon Admin Services come into the picture. </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">WSO2 Admin Services can be considered as SOAP web service endpoints which provide wso2 product specific functionalities.<span style="background-color: white; line-height: 20px; text-align: justify;">The admin services are not visible via the Carbon management console. </span></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; line-height: 20px; text-align: justify;">You can access the service description of the admin services[WSDL] if you know the admin service. </span></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; line-height: 20px; text-align: justify;">Before accessing the wsdl of a particular admin service,you need to enable the property <</span></span><span style="line-height: 20px; text-align: left;"><span style="font-family: Arial, Helvetica, sans-serif;">HideAdminServiceWSDLs</span></span><span style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 20px;">> of carbon.xml as 'false'.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; line-height: 20px; text-align: justify;">You can find the admin services expose by a WSO2 product,by following below two steps.</span></span></div>
<div style="text-align: justify;">
</div>
<ol>
<li><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 20px;">Run the server in OSGI mode ./wso2server.sh -DosgiConsole</span></span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 20px;">Once the server starts,type the command 'listAdminServices'</span></span></li>
</ol>
<br />
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; line-height: 20px; text-align: justify;">Once you change above carbon.xml property and found the required admin service name,then try accessing below URL assuming that the https port of running server is 9443.</span></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; line-height: 20px; text-align: justify;"><br /></span></span></div>
<div style="background-color: white; line-height: 20px; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">https://localhost:9443/services/AuthenticationAdmin?wsdl</span></div>
<div style="background-color: white; line-height: 20px; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; line-height: 20px; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">There are different ways of consuming above admin service.</span></div>
<div style="background-color: white; margin-bottom: 0cm; text-align: justify;">
<ol>
<li><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 20px;">Via a SOAP web service client tool like Soap-UI as described in <a href="http://nandikajayawardana.blogspot.com/2012/10/how-to-invoke-admin-services-with-soapui.html" target="_blank">here</a></span></span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 20px;">Via a java client program as described in <a href="http://pradeepfernando.blogspot.com/2010/12/how-to-consume-admin-services-in-wso2.html">here</a></span></span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Via a javascript program with <a href="http://jaggeryjs.org/" target="_blank">Jaggery</a> [New]</span></li>
</ol>
<span style="font-family: Arial, Helvetica, sans-serif;">From this blog-post,I'll explain how to invoke an admin service from Jaggery.There are two inbuilt mechanisms to achieve my objective from jaggery by using <a href="http://jaggeryjs.org/apidocs/ws.jag" target="_blank">WSRequest </a>or <a href="http://jaggeryjs.org/apidocs/wsstub.jag" target="_blank">WSStub </a>options.</span></div>
<div style="background-color: white; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Below example code shows how to consume an admin service from jaggery,by using WSRequest module.You can download the sample code from <a href="http://code.google.com/p/open-space-blog-samples/downloads/list" target="_blank">here</a>.You can try directly paste the jaggery-code to online <a href="http://jaggeryjs.org/tryitview.jag" target="_blank">try-it tool</a> provided by jaggery web site to try with.[NOTE:Please make sure,your WSO2 product is running while trying from jaggery online try-it]</span></div>
<div style="background-color: white; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">In this example ;</span></div>
<div style="background-color: white; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Admin Service Name- RemoteUserStoreManagerService</span></div>
<div style="background-color: white; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Invoked operation -isExistingUser();</span></div>
<div style="background-color: white; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Operation Payload- username [The related SOAP payload can be generated with the help of a SOAP client as Soap UI] </span></div>
<div style="background-color: white; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-tbtZ6Jn8Qx4/UVh1IBI3KvI/AAAAAAAAAoo/6svsUCXLcZQ/s1600/invoke-admin-service.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-tbtZ6Jn8Qx4/UVh1IBI3KvI/AAAAAAAAAoo/6svsUCXLcZQ/s1600/invoke-admin-service.png" /></a></div>
<div style="background-color: white; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; line-height: 20px; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; line-height: 20px; margin-bottom: 0cm; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com1tag:blogger.com,1999:blog-5463821059371549738.post-16765903755100975342013-03-31T10:06:00.003-07:002013-03-31T10:18:26.353-07:00Some useful OSGI commands to dig in to issues with deployed bundles deployed in WSO2 products<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: -webkit-auto;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 20px; text-align: justify;">WSO2 Products developed on top of the core WSO2 Carbon platform.WSO2 Carbon is a componentized Service Oriented Platform(SOA) which is built on OSGI framework,which defines a dynamic component system for Java.Bundle is the unit of modularization in OSGI. </span></div>
<div style="text-align: -webkit-auto;">
<div style="text-align: justify;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 20px;">If I described on how a WSO2 product is created ,first there are a set of components introduced and implemented as OSGI bundles.You can find such developed set of components from <a href="https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.1.0/components" target="_blank">here</a>.Then we group a set of components as a feature.And there are such pre-defined features which can be found from <a href="https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.1.0/features" target="_blank">here</a>.Then with selecting a relevant set of features,the product have been built.For example this <a href="https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.1.0/products/apimgt/1.4.0/modules/p2-profile/product/pom.xml">pom.xml</a> under the <a href="https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.1.0/products/apimgt/1.4.0/modules/">svn location </a>contains the features set used by the product WSO2 API Manager product.And most importantly,one more advantage of this approach is at later time,product can be customize by adding more features from wso2 <a href="http://wso2.org/projects/carbon/provisioning-wso2-carbon-with-equinox-p2">feature manager</a> at runtime.</span></div>
</div>
<div style="text-align: -webkit-auto;">
<div style="text-align: justify;">
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 20px;"><br /></span></div>
</div>
<div style="text-align: -webkit-auto;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 20px;">The main focus of this blog post is to guide on some OSGi level commands that would help to identify issues,when a user tries to deploy an OSGI bundle into a WSO2 product. Most common error the developers are facing,is CNF [Class Not Found] error-Though the OSGI bundle deployed to product,the classes exposing from that particular bundle is not available to OSGI runtime and thus CNF will be thrown.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 20px;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 20px;">For such instances,following steps will help you to identify the root-cause of the issue. </span></div>
<div style="text-align: justify;">
</div>
<ol>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 20px;">First start the server with enabling OSGI console available- ./wso2server.sh -DosgiConsole</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 20px;">Then list the available bundles of the server by trying the OSGI command - "ss package_name_of_bundle". For get list of commands try the command 'help'.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 20px;">You'll notice particular bundle will be in 'INSTALLED' state according to OSGI <a href="http://static.springsource.org/osgi/docs/current/reference/html/bnd-app-ctx.html">life-cycle</a>.[Not in 'ACTIVE' state]</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 20px;">Try diagnosing the particular bundle with the command "diag bundle_id" [Here bundle_id is the id retrieved for the bundle from above 2nd step]</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 20px;">Once you tried,above you'll see about the un-satisfied constraints on the specific bundle.In other word,that particular bundle has not become as an active bundle,due to an unsatisfied dependency which is referring from the bundle.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 20px;">Most of the time,the unsatisfied constraint is a dependency which is imported by the spefic bundle,but from no where else that dependency has export to OSGI runtime,thus unable to find that dependency available in runtime to import and use with the bundle.You can check this by the command 'p packageNameOfUnsatisfiedDependency'.This command will list the places where the dependency imported and exported.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 20px;">If the result of above 6,is like no entry about exported places,then we need to add that dependency to OSGI runtime by exporting it from same bundle or from a separate bundle. Or if the package name of that dependency is available as a public JDK package,then you can export it via System bundle by adding an entry for the package name of the dependency to launch.ini file [which can be found from {Product_Home}/repository/conf/etc]</span></li>
</ol>
</div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com0tag:blogger.com,1999:blog-5463821059371549738.post-66233028865191488692013-03-16T09:44:00.000-07:002013-03-30T08:10:48.233-07:00Differentiate generated Access Token & Consumer Key/Consumer Secret in WSO2 APIManager<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
This blog-post is mainly focus on API subscription process through API-Store as described in <a href="http://docs.wso2.org/wiki/display/AM130/Subscribing+to+an+API" target="_blank">here</a>.</div>
<div style="text-align: justify;">
Say there's a hosted WSO2 APIStore instance running in an organization.Once an app developer login to APIStore as an API Subscribe, browse for available APIs and when he decided to use a set of APIs from his developed external application[eg: mobile/web-based application],he will add an application to map with his developing app and then he'll subscribe each API to his created application in the APIStore.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
When the developer subscribe an API for an application,following three values will be generated on behalf of application.And importantly these three values are generated according to <a href="http://tools.ietf.org/html/rfc6749" target="_blank">OAuth2 </a>specification.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://docs.wso2.org/wiki/download/attachments/16844422/API-Manager-Keys.png?version=1&modificationDate=1357717762000" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="122" src="http://docs.wso2.org/wiki/download/attachments/16844422/API-Manager-Keys.png?version=1&modificationDate=1357717762000" width="320" /></a></div>
<div style="text-align: justify;">
<br /></div>
<ul style="text-align: left;">
<li style="text-align: justify;"><b>Access Token</b> - </li>
</ul>
<span style="text-align: justify;">The OAuth2 token which can be use to authenticate an API invocation.This token is only for the app developer [unless he shared the tokens with others(eg:3rd party users of his developed mobile app)] to use with API invocations from his developed application.[Note he can use above token only with subscribed APIs against the application through APIStore] </span><br />
<span style="text-align: justify;"><br /></span>
<ul style="text-align: left;">
</ul>
<ul style="text-align: left;">
<li style="text-align: justify;"><b>Consumer Key & Consumer Secret </b>- </li>
</ul>
<div style="text-align: justify;">
<span style="text-align: justify;">The generated consumer key and secret are to use from the client application [developer's app].The usage of these two values is,to authenticate app consumers against underlying consumed APIs from the developed application.For example an application consumer login to the developed mobile app.</span></div>
<span style="text-align: justify;">
</span>
<ul style="text-align: left;">
</ul>
<span style="text-align: justify;">Now to continue with app functions [which are exposed through subscribed APIs from the</span><span style="text-align: justify;"> app],the logged app user need to have an access token to use.At this point one option is,app </span><span style="text-align: justify;"> developer can share his generated application access token with all the app consumers.But this is </span><span style="text-align: justify;"> not the good approach as it contains some limitations as ,if access token expires,access to the app </span><span style="text-align: justify;"> will fail among all users,if there's a malicious user as an API consumer,cannot revoke the token </span><span style="text-align: justify;">only for that user,difficult to differentiate API invocation statistics among API users.Thus </span><b style="text-align: justify;">best </b><b style="text-align: justify;"> approach</b><span style="text-align: justify;"> is to keep separate access tokens for each app user.</span><br />
<div>
<span style="text-align: justify;"> </span></div>
<div>
<span style="text-align: justify;">Here the place consumer key and secret </span><span style="text-align: justify;">are required.These two values are to use with generating </span><span style="text-align: justify;">user tokens.App developer can hard-coded these two values in his developed app.Then from </span><span style="text-align: justify;">WSO2 </span><span style="text-align: justify;">APIManager,we have exposed an REST endpoint to generate such user-tokens with using </span><span style="text-align: justify;">consumer key/secret as described </span><a href="http://docs.wso2.org/wiki/display/AM130/User+Tokens" style="text-align: justify;" target="_blank">here</a><span style="text-align: justify;">. Thus,the app developer can invoke this endpoint from his </span><span style="text-align: justify;">developed app and pass consumer key/secret to the endpoint by adding the related </span><span style="text-align: justify;">implementation to the developed app.</span></div>
<div>
<span style="text-align: justify;"><br /></span></div>
<div>
<span style="text-align: justify;"> Hence in summary,only the above generated access token can be directly use to authenticate API invocations,while other consumer key & secret values are to generate such OAuth2 tokens.</span></div>
</div>
Lalaji Sureshikahttp://www.blogger.com/profile/06870342211757709775noreply@blogger.com0