tag:blogger.com,1999:blog-65657397964144325762024-03-13T15:33:29.809+05:30Try it NowHasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.comBlogger53125tag:blogger.com,1999:blog-6565739796414432576.post-52818476228412299172019-09-25T22:53:00.001+05:302019-09-25T22:53:52.780+05:30Moving to GitHub Pages<div class="gmail_default" style="font-family: arial, helvetica, sans-serif; text-align: justify;">
It has been a long time since my last blog post, and unfortunately, this will be the last from on the Blogger. You may be asking why? Here the long answer in short. </div>
<div class="gmail_default" style="font-family: arial, helvetica, sans-serif; text-align: justify;">
<br /></div>
<div class="gmail_default" style="font-family: arial, helvetica, sans-serif; text-align: justify;">
Blogger is a great blogging tool. It’s a simple and straightforward platform that gives you what you need for blogging. But one of the main limitations with these CMS, you have less freedom when you want to do customization. That is the primary reason why I have moved to the Github Pages. </div>
<div class="gmail_default" style="font-family: arial, helvetica, sans-serif; text-align: justify;">
<br /></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://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyBGOIlS7omJWGARjCS08KCE-bmO7cqDP99m3YBrsZm70qJ8h8eTfKe7Ul_RNE5V90RTzBUTqUpNwhSgSRbXPpRZuhsC9JLYLznfbdMcoGGkk5zNeq3788uu4LiJesy-AL9UUQq8V3Cl8/s1600/GitHub_Logo.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Github" border="0" data-original-height="410" data-original-width="1000" height="131" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyBGOIlS7omJWGARjCS08KCE-bmO7cqDP99m3YBrsZm70qJ8h8eTfKe7Ul_RNE5V90RTzBUTqUpNwhSgSRbXPpRZuhsC9JLYLznfbdMcoGGkk5zNeq3788uu4LiJesy-AL9UUQq8V3Cl8/s320/GitHub_Logo.png" title="Source: https://github.com/logos" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Source: <a href="https://github.com/logos">https://github.com/logos</a></td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="gmail_default" style="font-family: arial, helvetica, sans-serif; text-align: justify;">
<br /></div>
<div class="gmail_default" style="font-family: arial, helvetica, sans-serif; text-align: justify;">
<br /></div>
<div class="gmail_default" style="font-family: arial, helvetica, sans-serif; text-align: justify;">
Everything comes with a price. Now I have to maintain the entire site. Github pages use Jekyll (<a href="https://jekyllrb.com/" style="font-family: Arial, Helvetica, sans-serif;">https://jekyllrb.com/</a>), and I stared hack it a few days ago and managed to up and running the site. Here is the new site. <a href="https://hasithaa.github.io/" style="font-family: Arial, Helvetica, sans-serif;">https://hasithaa.github.io</a><span style="font-family: Arial, Helvetica, sans-serif;"> Eventually, I am going to build up the blogging ecosystem around it. So don't expect a search bar soon. :D</span></div>
<div class="gmail_default" style="font-family: arial, helvetica, sans-serif; text-align: justify;">
<br /></div>
<div class="gmail_default" style="font-family: arial, helvetica, sans-serif; text-align: justify;">
Hope to see you on my GitHub Blog soon.</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial, helvetica, sans-serif; text-align: center;">
<a href="https://hasithaa.github.io/" style="font-family: Arial, Helvetica, sans-serif;">https://hasithaa.github.io</a> </div>
Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-77057926559883234192016-04-28T11:17:00.003+05:302016-04-28T11:17:59.333+05:30[Sample] Order Processing ProcessThis sample illustrates usage of WS-BPEL 2.0, WS-HumanTask 1.1 and Rule capabilities in WSO2 Business Process Server and WSO2 Business Rule Server.<div>
<br /></div>
<div>
<div>
<br /></div>
<div>
<u>Order Processing Flow</u><div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;">
<a href="https://raw.githubusercontent.com/hasithaa/BPM_Samples/master/OrderProcessingSample/FlowChart.png" style="box-sizing: border-box; clear: right; color: #4078c0; float: right; margin-bottom: 1em; margin-left: 1em; text-decoration: none;" target="_blank"><img alt="alt text" height="640" src="https://raw.githubusercontent.com/hasithaa/BPM_Samples/master/OrderProcessingSample/FlowChart.png" style="background-color: white; border-style: none; box-sizing: content-box; max-width: 100%;" title="Order Processing Flow Chart" width="288" /></a></div>
<ul>
<li>The client place an order by providing client ID, item IDs, quantity, shipping address and shipping city.</li>
<li>Then Process submits order information to invoicing web service, which generates order ID and calculate total order value.</li>
<li>If total order value is greater than USD 500, process requires a human interaction to proceed. When a order requires a human interaction process creates a Review HumanTask for regional clerks. If review task is rejected by one of regional clerk user, workflow terminates after notifying the client.</li>
<li>Once the regional clerk approve the review task, workflow invokes Warehouse Locater rule service to calculate nearest warehouse.</li>
<li>Once receiving nearest warehouse, process invokes Place Order web service to finalize the order.</li>
<li>Finally user will be notified with the estimated delivery date.</li>
</ul>
<br /><u>This sample contains</u><br /><ul>
<li>Workflow :<a href="https://github.com/hasithaa/BPM_Samples/tree/master/OrderProcessingSample/Order_Processing_Sample/Order_Processing_Process">Order_Processing_Process</a> is written using WS-BPEL 2.0.</li>
<li>Human task & notification : <a href="https://github.com/hasithaa/BPM_Samples/tree/master/OrderProcessingSample/Order_Processing_Sample/Order_Processing_Approval_HumanTask">Order_Processing_Approval_HumanTask</a> is defined using WS-HumanTask 1.1.</li>
<li>Rules service : <a href="https://github.com/hasithaa/BPM_Samples/tree/master/OrderProcessingSample/Order_Processing_Sample/Warehouse_Locator_Service">Warehouse_Locator_Service</a> is written using Drools.</li>
<li>Web Services : <a href="https://github.com/hasithaa/BPM_Samples/tree/master/OrderProcessingSample/Order_Processing_Sample/Invoicing_Service_Axis2">Invoicing_Service_Axis2</a> and <a href="https://github.com/hasithaa/BPM_Samples/tree/master/OrderProcessingSample/Order_Processing_Sample/Place_Order_Axis2">Place_Order_Axis2</a> are written using Axis2.</li>
</ul>
<div>
<br /></div>
Please checkout this sample from Github. </div>
<div>
<a href="https://github.com/hasithaa/BPM_Samples/tree/master/OrderProcessingSample">https://github.com/hasithaa/BPM_Samples/tree/master/OrderProcessingSample</a></div>
</div>
Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-42466500204728438162015-11-28T13:51:00.001+05:302015-11-28T13:51:17.879+05:30[WSO2BPS] Uploading a BPEL archive using admin services<br />
Some users want to automate BPEL deployment using external tools. This blog post discuss how you can use BPEL Uploader admin service for this purpose.<br />
<br />
Applies to WSO2 BPS 3.x. ( Tested on 3.2.0 )<br />
<br />
<h2>
Viewing wsdl of BPEL Uploader admin service</h2>
<div>
<ol>
<li>Change "HideAdminServiceWSDLs" to false in Carbon.xml.</li>
<li>(Re)Start WSO2 BPS server. </li>
<li>Now you can view BPEL uploader admin service WSDL from </li>
<ul>
<li>https://localhost:9443/services/BPELUploader?wsdl</li>
</ul>
</ol>
</div>
<h2>
Method 1 - Using SOAP UI. </h2>
<div>
<br /></div>
<div>
Create SOAP UI project using "https://localhost:9443/services/BPELUploader?wsdl"<br />
<div>
<br /></div>
<div>
<br /></div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9UKTH3tyHBZNMznwDIGPkerSPgcMmAJHlYUvf5dF6_UM_d4A50_h59LXWX_cuPZVKYNPRqgyLqvw8392jMOObcoePVyWzH0K8VGwLmKJNqw2PWSlt7IuxwhEUBUyOM3jTIA_aLTCu7n8/s1600/Screenshot-SoapUI+5.1.2+.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="366" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9UKTH3tyHBZNMznwDIGPkerSPgcMmAJHlYUvf5dF6_UM_d4A50_h59LXWX_cuPZVKYNPRqgyLqvw8392jMOObcoePVyWzH0K8VGwLmKJNqw2PWSlt7IuxwhEUBUyOM3jTIA_aLTCu7n8/s640/Screenshot-SoapUI+5.1.2+.png" width="640" /></a></div>
<div>
<br /></div>
<ol>
<li>Open upload service request and add an attachment using Attachment tab.</li>
<li>Select your BPEL file from file system. ( eg: Async-Client.zip )</li>
<li>Give File Name in SOAP request ( Async-Client.zip )</li>
<li>Type "cid:Myzip-File" in dataHandler.</li>
<li>Select Myzip-File in Part column in attachment tab. </li>
<li>In Auth tab. Configure Basic authentication ( Usernname/passowrd admin/admin - Authenticate Pre-Emptively)</li>
</ol>
<div>
Now you will able to upload BPEL file using SOAP UI. </div>
<div>
<br /></div>
<div>
Note: When you send above request, SOAP UI automatically replace dataHandler content with base64 encoded content of zip file. </div>
<div>
<br /></div>
<div>
<br /></div>
<h2>
Method 2 - Using Curl Command line tool.</h2>
<div>
<ol>
<li>First Convert zip file content into base64 format. For that use base64 command line tool as follows,</li>
<div>
<br />
<div style="text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;">$ base64 Async-Client.zip > base64.txt</span></div>
</div>
<br />
<li>Create<span style="font-family: inherit;"><b> <span style="text-align: center;">request.xml</span></b></span> file with following content. Replace dataHandler text with content of base64.txt</li>
<br /><script src="https://gist.github.com/hasithaa/0b58d55f9cab791b4a2f.js"></script><br />
<li>Use following curl command to upload your BPEL file. </li>
</ol>
<div>
<br /></div>
</div>
<div>
<div style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;">curl --user admin:admin -k -s -v --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction: urn:uploadService" --data @request.xml https://localhost:9443/services/BPELUploader </span></div>
<div style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;">-- End --</span></div>
</div>
<div>
<br /></div>
</div>
Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-22885840746259507452015-06-17T08:53:00.000+05:302015-06-17T19:54:59.078+05:30Setting Up Mutual SSL in WSO2 ESB - Enable only for selected proxy servicesThis Blog post is an updated version of <a href="http://xacmlinfo.org/2012/08/08/enable-mutual-ssl-for-proxy-services-in-wso2esb-ii/" target="_blank">Asela's Blog </a><br />
<br />
I am using same environment described in my previous blog for this tutorial <br />
<br />
<h2>
Configure WSO2 ESB Server </h2>
<br />
1) Edit https transportReceiver in axis2.xml, which is located in <esb_home>/repository/conf/axis2/ folder and Add <b>SSLVerifyClient</b> to <b>optional </b>as follows.</esb_home><br />
<div>
<script src="https://gist.github.com/hasithaa/64e19caff9f4795cbd44.js"></script>
2) Restart ESB Server.<br />
<br />
Note: This will make Mutual SSL optional for proxy services exposed on https transport.<br />
<br />
Now you will able to Invoke Test Proxy without SSL KeyStore property in SOAP UI. To verify this remove value of SSL KeyStore and Invoke Request 1 Again.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtmf7lZBVsfHpdp5D7NXelyF1VoDvAN-t3DGzk-GbGUWPLbDQ38GuZeIBixoaDfROl2bgg6QwOg0AmGoVCW7bZmIM5NQKOKymZJPrieAgNnZfkW5h6Vh1SOEjDcPl6AtaAPG5J28Av9z8/s1600/Screenshot-6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="286" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtmf7lZBVsfHpdp5D7NXelyF1VoDvAN-t3DGzk-GbGUWPLbDQ38GuZeIBixoaDfROl2bgg6QwOg0AmGoVCW7bZmIM5NQKOKymZJPrieAgNnZfkW5h6Vh1SOEjDcPl6AtaAPG5J28Av9z8/s640/Screenshot-6.png" width="640" /></a></div>
<br /></div>
<div>
<br />
<h2>
<b>Enable Mutual SSL for Test Proxy</b></h2>
<div>
<b><br /></b></div>
<b>1) Create a ESB XML local entry called <span class="file-name js-selectable-text" style="box-sizing: border-box;">MutualSSLPolicy.xml </span><span class="file-name js-selectable-text" style="box-sizing: border-box;">with following content.</span></b><br />
<br />
<br />
<script src="https://gist.github.com/hasithaa/a3a664a6febbc9094fa9.js"></script>
</div>
<br />
<br />
<b>2) Add following parameters to Test Proxy. </b><br />
<br />
<br />
<script src="https://gist.github.com/hasithaa/41dc3a92ba48c671873b.js"></script>
( Add these parameters to proxy services you want to enable mutual authentication. )'<br />
<br />
<b>3) Final Test proxy will look like this</b><br />
<br />
<br />
<script src="https://gist.github.com/hasithaa/7c566f188261854099d9.js"></script>
<br />
<h2>
<b>Testing With SOAP UI </b></h2>
1) Try Request 1 without SSL KeyStore parameter. Request Fails with SOAP Fault<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj46HEaw3oyuoM4wU883yadm0Vm3tYo5VEgDp_tymftMuYsaqTdHWGZRfGrsmGmef9_ltXZTtLb1PNSAAO9zQ0186p7NDqZeUGV27U_6lPgMt8H7Nrak2b9zLXXYqTZGcM1Gbt04kDjPdI/s1600/Screenshot-7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj46HEaw3oyuoM4wU883yadm0Vm3tYo5VEgDp_tymftMuYsaqTdHWGZRfGrsmGmef9_ltXZTtLb1PNSAAO9zQ0186p7NDqZeUGV27U_6lPgMt8H7Nrak2b9zLXXYqTZGcM1Gbt04kDjPdI/s640/Screenshot-7.png" width="640" /></a></div>
<br />
<br />
2) Now try with SSL KeyStore Parameter, Now you will able to invoke Test Proxy Service.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwus5A7PFwYvf6e4MrgHQAHjO010td_HOrYC3-MuGHz8fxr0mtJASFZDzAhk7luR7a5JmOtts_7vZtYcy5InaXTEuR_dFHmjy7Pbe_EZJO2RzfA5F1aZW7lYr16Ea8CjqnDFvOX0X7pTQ/s1600/Screenshot-8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwus5A7PFwYvf6e4MrgHQAHjO010td_HOrYC3-MuGHz8fxr0mtJASFZDzAhk7luR7a5JmOtts_7vZtYcy5InaXTEuR_dFHmjy7Pbe_EZJO2RzfA5F1aZW7lYr16Ea8CjqnDFvOX0X7pTQ/s640/Screenshot-8.png" width="640" /></a></div>
<br />
<br />
<br />Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-22865140934399026042015-06-17T07:51:00.000+05:302015-06-17T19:55:02.526+05:30Setting Up Mutual SSL in WSO2 ESB and Testing Using SOAP UIThis Blog post is an updated version of <a href="http://xacmlinfo.org/2012/08/08/enable-mutual-ssl-for-proxy-services-in-wso2esb-i/" target="_blank">Asela's Blog </a><br />
<br />
<br />
<h2>
Exchanging Certificates with Client and Server. </h2>
<div>
<br /></div>
First step is to create Client Key Store and Client Trust Store. Here I am using Java Keytool, which can be found in JDK bin directory. <br />
<br />
<u>1) Create Client ( let's call wso2client ) Key Store (wso2clientkeystore.jks)</u><br />
<br />
keytool -genkey -keyalg RSA -keystore wso2clientkeystore.jks -alias wso2client -dname "CN=wso2client" -validity 3650 -keysize 2048<br />
<br />
Provide Store password and Key password.<br />
<br />
<u>2) Create Client Certificates. </u><br />
<br />
keytool -export -keyalg RSA -keystore wso2clientkeystore.jks -alias wso2client -file wso2client.cert<br />
<br />
<u>3) Create Client Trust Store (wso2clientTrustStore.jks)</u><br />
<br />
keytool -import -file wso2client.cert -alias wso2client -keystore wso2clientTrustStore.jks<br />
<br />
Provide Trust store password.<br />
<br />
<u>4) Export ESB Server Certificate</u><br />
<br />
keytool -export -keyalg RSA -keystore <wso2esb-4 .8.1_home="">/repository/resources/security/wso2carbon.jks -alias wso2carbon -file wso2carbon.cert</wso2esb-4><br />
<br />
Provide wso2carbon store password "wso2carbon"<br />
<br />
<u>5) Import Client Certificate wso2client.cert to WSO2 ESB client-trustStore.jks</u><br />
<u><br /></u>
keytool -import -file wso2client.cert -alias wso2client -keystore <wso2esb-4 .8.1_home="">/repository/resources/security/client-truststore.jks</wso2esb-4><br />
<br />
Provide wso2carbon store password "wso2carbon"<br />
<br />
<u>6) Import ESB Server Certificate wso2carbon.cert to client-trust store </u><br />
<br />
keytool -import -file wso2carbon.cert -alias wso2carbon -keystore wso2clientTrustStore.jks<br />
<br />
<br />
<h2>
Configure WSO2 ESB Server </h2>
<br />
1) Edit https transportReceiver in axis2.xml, which is located in <esb_home>/repository/conf/axis2/ folder and Add <b>SSLVerifyClient</b> to <b>require</b> as follows.<br />
<br />
<br />
<script src="https://gist.github.com/hasithaa/5f5256b6272e34c74e1a.js"></script>
</esb_home><br />
<div>
<br />
2) Restart ESB Server.<br />
<br />
Note: This will Enable Mutual SSL for Proxies on https transport in ESB.<br />
<br />
<h2>
Create Test Proxy</h2>
Create a test proxy with Following Content<br />
<br />
<br />
<script src="https://gist.github.com/hasithaa/d2680178b9826cfd3732.js"></script>
<br />
<br />
<h2>
Testing Test Proxy Using SOAP UI</h2>
1) Open SOAP UI and create a SOAP UI project using Test Proxy WSDL. ( https://localhost:9443/services/Test?wsdl )<br />
<br />
2) Try to Invoke Test Proxy with default configuration.<br />
<br />
As shown bellow, it will fail with javax.net.SSLHandshakeException. This is because Soap UI doesn't have wso2client key store and trust store.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-TvYxu-Sg2Y2bwBP-UFGy35SgYy_tHTxhIhnsDHNs9qSTBVKsiiHvT4RgkW07E9KEd-t4-4050BFnAbbmQyADF2Qhyphenhyphenav0brToi2lldo5elWl1GMT8BRmbWYGnpbMSFeEFm2i9szCZJDY/s1600/Screenshot-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="275" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-TvYxu-Sg2Y2bwBP-UFGy35SgYy_tHTxhIhnsDHNs9qSTBVKsiiHvT4RgkW07E9KEd-t4-4050BFnAbbmQyADF2Qhyphenhyphenav0brToi2lldo5elWl1GMT8BRmbWYGnpbMSFeEFm2i9szCZJDY/s640/Screenshot-2.png" width="640" /></a></div>
<br />
<br />
3) Let's Add Key store and Trust Store to Project. Open Test Project Properties. -> WS-Security Configuration -> Key Store -> Add Key Store as shown in following picture. -> Select wso2clientkeystore.jks<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisA49f5m0y3IYnSq3rFIuxRYF00sBCiWuE7SAGFFHnEpBN_YoWHdIDiRZ9cRbWET6u4bC34o2c1ycqqFATNzLcIUASxXgcTPhofcPXaPQEThBthrUiuaQFW67KnzuTWZpYVmp6fMnHvd8/s1600/Screenshot-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisA49f5m0y3IYnSq3rFIuxRYF00sBCiWuE7SAGFFHnEpBN_YoWHdIDiRZ9cRbWET6u4bC34o2c1ycqqFATNzLcIUASxXgcTPhofcPXaPQEThBthrUiuaQFW67KnzuTWZpYVmp6fMnHvd8/s640/Screenshot-3.png" width="640" /></a></div>
<br />
<br />
4) Enter store password for wso2clientkeystore.jks<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8Zyp1bFl7T7aJP-okE9Cru6r9apoUQsFl9HJbKm7xzrL65hzDx8sSBXVMxYODl3rJWWs0qHC0H6QoIn0Zbsge5IUUuMEQ9DPiPAu70HosMmXLd9QPHCLzDI95RztWGzuwsv3n9ioKN-Y/s1600/Screenshot-Add+Key+Material.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8Zyp1bFl7T7aJP-okE9Cru6r9apoUQsFl9HJbKm7xzrL65hzDx8sSBXVMxYODl3rJWWs0qHC0H6QoIn0Zbsge5IUUuMEQ9DPiPAu70HosMmXLd9QPHCLzDI95RztWGzuwsv3n9ioKN-Y/s1600/Screenshot-Add+Key+Material.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2tSYoMQFOxhZU1jvLjlNMiEClZpdVUObeOGGBnL3THu-ghBJ9PZ-SmqiOrv5lL19l_lUmME4nnysMcyERZJmS8-8W5SU5C47YPWS6t28oGSmhXbDgQMTlLqTrAu1pbfnI8BQrnOA_2TQ/s1600/Screenshot-SoapUI+5.1.2+-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2tSYoMQFOxhZU1jvLjlNMiEClZpdVUObeOGGBnL3THu-ghBJ9PZ-SmqiOrv5lL19l_lUmME4nnysMcyERZJmS8-8W5SU5C47YPWS6t28oGSmhXbDgQMTlLqTrAu1pbfnI8BQrnOA_2TQ/s400/Screenshot-SoapUI+5.1.2+-1.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
5) Similarly add Client Trust store to SOAP UI ( An optional step for this tutorial )<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFKa4arL7c1yWf3kctdsxNEv4zQZ5j1DWzJAockqzdkyb6DI0L10lFJYda_ezaey5vBNH1M8otbijXMcKSdeC789RqcD-mgc0CDogobauHey1naf41oTkEzA19Gj8ESvgsnVUhNmSSX2o/s1600/Screenshot-SoapUI+5.1.2+-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFKa4arL7c1yWf3kctdsxNEv4zQZ5j1DWzJAockqzdkyb6DI0L10lFJYda_ezaey5vBNH1M8otbijXMcKSdeC789RqcD-mgc0CDogobauHey1naf41oTkEzA19Gj8ESvgsnVUhNmSSX2o/s400/Screenshot-SoapUI+5.1.2+-2.png" width="397" /></a></div>
<br />
6) Select SSL Keystore to wso2clientkeystore.jks.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibL96hpnLdFWG1ktPQ_Q0S8_Lqbv8aNMUq4aBBbidE-smC3L-Ke7PKuGGKkeilP0Lqk_8QcCBFGtgGgd5fp0ofUQYcZXY6o7V-sekaGm-x5R-aYGj3-gLykOW7p0yrCq0lfKLDqMRiIw0/s1600/Screenshot-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="363" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibL96hpnLdFWG1ktPQ_Q0S8_Lqbv8aNMUq4aBBbidE-smC3L-Ke7PKuGGKkeilP0Lqk_8QcCBFGtgGgd5fp0ofUQYcZXY6o7V-sekaGm-x5R-aYGj3-gLykOW7p0yrCq0lfKLDqMRiIw0/s640/Screenshot-4.png" width="640" /></a></div>
<br />
<br />
7) Invoke Request 1 again with SSL configuration.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqzsFN7EGwMKL7dWkhgKO_d3KdtY-RLxufJo0U5IfhmBIaSgVuFSEGfSttrf0e7rs09do4dcwOUYK7L63sGp0UxCeRak1f6bBu488USUeroJQEuXA1bPesCEixmrWVKQOBnL8e3Mm5YXI/s1600/Screenshot-5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="269" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqzsFN7EGwMKL7dWkhgKO_d3KdtY-RLxufJo0U5IfhmBIaSgVuFSEGfSttrf0e7rs09do4dcwOUYK7L63sGp0UxCeRak1f6bBu488USUeroJQEuXA1bPesCEixmrWVKQOBnL8e3Mm5YXI/s640/Screenshot-5.png" width="640" /></a></div>
<br />
<br />
Now you will be able to invoke Test proxy service with Mutual SSL enabled.<br />
<br />
In Next blog, I will discuss how to Enable Mutual SSL only for One proxy.<br />
<br /></div>
Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-72630768187798262282015-05-11T19:00:00.000+05:302015-05-11T19:00:02.887+05:30[SOAPUI] Generating an unique property per test case and referring it in multiple requests. <div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
1) Create a SoapUI project and create a test case. </div>
<div class="separator" style="clear: both; text-align: left;">
2) Crete a Script test step and enter following code snippet. This should be the first test step of the test case. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Node : this will create a property called <b>id </b> in test case scope. So it won't get altered in multithreaded test.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<u>Groovy Script</u></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<code>
def key = java.util.UUID.randomUUID().toString()<br />
context.getTestCase().getProperty( "id" ).setValue(key);
</code>
<br />
<code><br /></code>
<br />3) You can access property id in using following inline script. <div>
<br /></div>
<div>
${=context.getTestCase().getPropertyValue( "id" )}<br /><br />Example : <div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpbuKEzHkcBYgmX4K5hhVx15eL9TUVGQdVEceT5sbjwDJGCjOA_xZDrObG74gaC_1_tdAliklc0p1IP7csIwMasF9ByO_8NGJr_UOCjApM_u9nKNlJFxhobbAVCAygVHgaw8lmPp9bXlM/s1600/Screenshot-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="472" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpbuKEzHkcBYgmX4K5hhVx15eL9TUVGQdVEceT5sbjwDJGCjOA_xZDrObG74gaC_1_tdAliklc0p1IP7csIwMasF9ByO_8NGJr_UOCjApM_u9nKNlJFxhobbAVCAygVHgaw8lmPp9bXlM/s1600/Screenshot-2.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br /></div>
Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-56565004395492295972015-01-20T22:18:00.002+05:302015-01-20T22:19:47.641+05:30[Oracle] How to get raw counts of all tables at once<div>
<br /></div>
<div>
SQL Query : </div>
<div>
<br /></div>
<div>
select</div>
<div>
table_name,</div>
<div>
to_number(</div>
<div>
extractvalue(</div>
<div>
xmltype(dbms_xmlgen.getxml('select count(*) c from '||table_name))</div>
<div>
,'/ROWSET/ROW/C')</div>
<div>
)</div>
<div>
count</div>
<div>
from user_tables </div>
<div>
/</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-31377451338286369832014-11-08T17:46:00.001+05:302014-12-27T21:39:17.298+05:30[WSO2 ESB] [4.8.1] How to Convert XML to JSON Array Following API Demonstrate this functionality.<br />
<br />
<script src="https://gist.github.com/hasithaa/d5e33b1005d9698e6ff0.js"></script>
Try above api with a rest client with following sample requests.<br />
<br />
<b>1)Multiple Stocks.</b>
<br />
XML request:
<script src="https://gist.github.com/hasithaa/444c473f1a67184057cc.js"></script>
JSON response :
<script src="https://gist.github.com/hasithaa/632439f30cfb675c1f53.js"></script>
<b>2) Single Stock</b>
<br />
XML request:
<script src="https://gist.github.com/hasithaa/1de6c22d83e9045a7110.js"></script>
JSON response (As an array):
<script src="https://gist.github.com/hasithaa/edb59ca3128cb46f2db8.js"></script>
This is with following message formatter and builder
<br />
<code>
<messageformatter class="org.apache.synapse.commons.json.JsonStreamFormatter" contenttype="application/json" /><br /><br /> <messageformatter class="org.apache.synapse.commons.json.JsonStreamFormatter" contenttype="application/json" /></code>Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-80160997595432035752014-11-05T04:04:00.001+05:302014-11-05T04:04:49.090+05:30[Active-MQ] PortOffset1) Changing transport ports. Edit <activemq_home>/conf/activemq.xml</activemq_home><br /> and change ports numbers in following configuration.
<br />
<script src="https://gist.github.com/hasithaa/a3efc9744ebf761f7c13.js"></script>
<br />
2) Changing web console port. Edit <activemq_home>/conf/jetty.xml</activemq_home><br /> and change following port in following config.
<br />
<script src="https://gist.github.com/hasithaa/2e0b07b03352ecadea9d.js"></script>
<br/>
Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-16119333019177068762014-11-05T03:54:00.001+05:302014-11-05T03:54:53.679+05:30[Active-MQ] Setting up AMQ with MySQL database. <br />
<br />
1) Create MySQL database.<br />
<br />
<script src="https://gist.github.com/hasithaa/20c628942032b729ebf4.js"></script>
2) Download <a href="http://activemq.apache.org/download.html" target="_blank">activeMQ</a> and extract it.<br />
3) Edit <amq_home>/conf/activemq.xml</amq_home><br />
4) Add following configuration.<br />
<br />
<script src="https://gist.github.com/hasithaa/a53f35a2b238db2617a6.js"></script>
5) Copy mysql jdbc driver (mysql-connector-java-5.1.25-bin.jar) in the directory "activemq_home/lib/optional"<br />
<br />
6) Start ActiveMQ server using $ ./activemq start ( To stop the server use ./activemq stop )<br />
<br />
7) Log in to activeMQ management console using http://localhost:8161/ with admin:admin credentials.<br />
<br />
8) Create a queue and send a message to the queue with persistence enabled. <br />
<br />
9) You can see the message in database.<br />
<br />
<script src="https://gist.github.com/hasithaa/29f6ef7601bda107e745.js"></script>
<br />
<br />Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-91553145116792592722014-11-01T16:10:00.003+05:302014-11-01T16:10:54.370+05:30Packt offers its library subscription with an additional $150 worth of free content Packt provides full online access to over 2000 books and videos to
give users the knowledge they need, when they need it. From
innovative new solutions and effective learning services to cutting
edge guides on emerging technologies, Packt’s extensive library has
got it covered. <br />
<br />
For a limited time only, Packt is offering 5 free eBook or Video
downloads in the first month of a new annual subscription – up to
$150 worth of extra content. That’s in addition to one free download
a month for the rest of the year. <br />
<br />
This special PacktLib Plus deal expires on <span class="aBn" data-term="goog_307770394" tabindex="0"><span class="aQJ">4th November, 2014</span></span>. <br />
<br />
Check out the deal here <a href="http://bit.ly/1wN0Rq0" target="_blank">http://bit.ly/1wN0Rq0</a><span class="im"><br />
</span>Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-90144916617014142212014-10-20T15:25:00.001+05:302014-10-20T15:29:40.434+05:30Book Review : WS-BPEL 2.0 Beginners Guide<div style="text-align: justify;">
<a href="http://bit.ly/1srYlyc" target="_blank">WS-BPEL 2.0 Beginners Guide:</a> As name suggest, This is a good reading for who wants to learn BPEL concepts from beginning. Authors start book with a very simple BPEL sample. They give details instructions from setting up IDE, creating schema and wsdl, etc. They finish their first sample giving instructions to how you can test your first BPEL process using a BPEL engine. That is why I recommend this book as a true beginner guide.<br />
<br />
BPEL specifications is so long and even BPEL 2.0 primer is very hard to understand without prior knowledge on BPEL. But authors have structured book chapters from simple to complex BPEL concepts, so that beginners can easily understand. It contains chapters for fault handling, compensation, parallel processing asynchronous invocation etc. Best part is authors have given samples for each section including guidance how you can do it in IDE.<br />
<br />
This book contains special chapter for Humantask with samples. That adds a true value to this book.<br />
<br />
Even BPEL 2.0 is published in 2007, (Nearly 7 years ago) it is usage is increasing in enterprise world. It is an widely used industrial standard for Business process management (BPM). I think knowing BPEL is an added advantage for a programmer, architect and students; and this is the best book to start with.</div>
<div style="text-align: justify;">
<br />
Have a look on this book by clicking <a href="http://www.amazon.com/gp/product/1849688966/ref=cm_cr_rev_prod_title#reader_1849688966" target="_blank">this link. </a></div>
<div style="text-align: justify;">
<br /></div>
Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-25179749214151008282014-09-21T17:51:00.002+05:302014-09-21T17:51:35.107+05:30ESB: Invoking secured backend - Part 3 - Username Token with BasicAuthThis post shows, how to invoke an UsernameToken secured backend ( Hosted in WSO2 AS ), using basic auth. For this we use <span style="white-space: pre-wrap;"><a href="https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/security/org.wso2.carbon.security.mgt/4.2.0/src/main/java/org/wso2/carbon/security/pox/POXSecurityHandler.java" target="_blank">POXSecurityHandler</a>, (Which comes default with WSO2 Products) </span>to convert the HTTP basic auth information into wsse:UsernameToken.<br />
<br />
<b><u>Setting up environment : </u></b><br />
<br />
Setup both WSO2 AS and WSO2 ESB as mentioned in <a href="http://tryitnw.blogspot.com.au/2014/09/esb-invoking-secured-backend-username.html" target="_blank">previous post.</a><br />
<br />
<br />
<b><u>ESB Proxy</u></b><br />
<ul style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<li>Create a proxy called <i><u>EchoUTBasicProxy</u></i> with following content. </li>
</ul>
<div>
<script src="https://gist.github.com/hasithaa/db00d16542dd74ddfbaa.js"></script>
</div>
<div>
<b><u><br /></u></b>
<div>
<b><u>Testing Scenario</u></b></div>
<div>
<ul>
<li>Enable Soap tracer on WSO2 AS.</li>
<li>Enable wire log in WSO2 ESB.</li>
<li>Invoke <u style="font-style: italic;"><i><u>EchoUTBasicProxy</u></i> </u> using SOAP UI. </li>
</ul>
<div>
You can see, there is no username token in incoming message to backend. Instead you see basic auth header in outgoing message to backend from ESB.</div>
</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-76942753969912188772014-09-21T12:15:00.000+05:302014-09-21T17:52:06.956+05:30ESB: Invoking secured backend - Part 2 - Username Token - Dynamic usernameMy previous post shows how to invoke an username token secured backend using an ESB proxy. But we used static value for the username ( tom ), which is hard coded in the policy file. So each request authenticated as tom at the backend service.<br />
<br />
But some may wants to access backend service as different users. This post discusses how you can extend it to support dynamic user name in policy file.<br />
<br />
<br />
<b><u>Setting up environment : </u></b><br />
<br />
Setup both WSO2 AS and WSO2 ESB as mentioned in <a href="http://tryitnw.blogspot.com.au/2014/09/esb-invoking-secured-backend-username.html" target="_blank">previous post. </a><br />
<br />
<br />
<b><u>ClassMediator (ESB)</u></b><br />
<ul>
<li>In this scenario, we set username as a property in the ESB proxy. </li>
<li>To pass username into RampartConfiguration, we use custom class mediator called, SetUserMediator.</li>
<li>This custom mediator, adds username into rampartConfigCallbackProperties map and set the map into Axis2MessageContext. So later we can access these properties from Rampart ConfigCallbackHandlers. </li>
<li>We have to use customMediator, since we can't set a Map using standard ESB mediators. </li>
<li>( Maven Project is located <a href="https://svn.wso2.org/repos/wso2/people/hasitha/samples/org.example.rampart/" target="_blank">here</a>. )</li>
</ul>
<div>
<script src="https://gist.github.com/hasithaa/9b215bf9c7f0833565b0.js"></script>
</div>
<br />
<br />
<b><u>Rampart ConfigCallbackHandler (ESB)</u></b><br />
<ul>
<li>Similar to PasswordCallback handler, Rampart provides Configuration Callback handler to dynamically load Rampart configuaraion to runtime. We use this to set username dynamically. </li>
<li>( Maven Project is located <a href="https://svn.wso2.org/repos/wso2/people/hasitha/samples/org.example.rampart/" target="_blank">here</a>. )</li>
</ul>
<br />
<script src="https://gist.github.com/hasithaa/cbd445519cf953b56b27.js"></script>
<b><u><br /></u></b>
<b><u>Policy for UsernameToken ( ESB )</u></b><br />
<ul>
<li>Create an ESB in-line xml local entry called "UTOverTransportDynamic.xml" with following content. </li>
</ul>
<br />
<script src="https://gist.github.com/hasithaa/2ecd053b222d567389a2.js"></script>
<br />
<b><u>Proxy Service (ESB)</u></b><br />
<br />
<ul>
<li>Create a proxy called <i><u>EchoUTDynamicProxy</u></i> with following content. </li>
</ul>
<div>
<script src="https://gist.github.com/hasithaa/8d24dd955048f53f2523.js"></script>
</div>
<div>
<div>
<b><u><br /></u></b>
<b><u>Testing Scenario</u></b></div>
<div>
<br />
<ul>
<li>Enable Soap tracer on WSO2 AS.</li>
<li>Invoke <u style="font-style: italic;"><i><u>EchoUTDynamicProxy</u></i> </u> using SOAP UI. </li>
</ul>
<div>
You can see Username token in request message as follows.<br />
<br />
<br /></div>
<script src="https://gist.github.com/hasithaa/f6cf3f4f64c9e64f53e6.js"></script>
</div>
</div>
Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-90918482516726838672014-09-21T10:03:00.000+05:302014-09-21T17:52:29.224+05:30ESB: Invoking secured backend - Part 1 - Username Token<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPXFNaNqpD4so9dmNQsN9OIZTmC-H_LAzYnWaihKYDrL7fnK4HUBZY5gha-Z0LIlk-E44YgQB_NJqJv5V8gZ9YA3LUULRsaRxr1bK37zZrSXkAbLnIvNe3i89zLHgwP4gxBu87RKgW07M/s1600/Untitled+drawing+(2).png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPXFNaNqpD4so9dmNQsN9OIZTmC-H_LAzYnWaihKYDrL7fnK4HUBZY5gha-Z0LIlk-E44YgQB_NJqJv5V8gZ9YA3LUULRsaRxr1bK37zZrSXkAbLnIvNe3i89zLHgwP4gxBu87RKgW07M/s1600/Untitled+drawing+(2).png" height="254" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<b><u>Scenario </u></b><br />
<ol>
<li>Backend service is secured using Username token. </li>
<li>Client invokes ESB proxy using http. ( no security between client and ESB) </li>
<li>At the ESB, proxy adds username token to outgoing message and invokes secured backend.</li>
<li>ESB sends back echo service's response back to client. </li>
</ol>
<div>
<br /></div>
<b><u>Setting up environment </u></b><br />
<br />
<b>Backend ( WSO2 Application server 5.2.1) </b><br />
<ol>
<li>Start WSO2 AS 5.2.1 using ( Unix: sh wso2server.sh / Windows: wso2server.bat ) </li>
<li>Log in to management console. ( https://localhost:9443/carbon/ ) </li>
<li>Create two user called tom and bom</li>
<ul>
<li>Goto Configure -> Users and Roles -> Users</li>
<li>Create an user called tom with password "tompass". </li>
<li>Create another user called bob with password "bobpass"</li>
<li>Assign both users to "admin" role.</li>
</ul>
<li>Secure Echo service with Username token. </li>
<ul>
<li>Goto Main -> Services -> List </li>
<li>Click on "echo" service. This will open up "Service Dashboard (echo)" page.</li>
<li>Under "Quality of Service Configuration", Select "security".</li>
<li>In "Security for the service" page, Select Enable security.</li>
<li>Under Security scenarios, select "Username token" ( First security policy) and click next. </li>
<li>In next page, select "admin" under user group. </li>
<li>Click Finish. </li>
</ul>
</ol>
<b>ESB ( WSO2 ESB 4.8.1 ) </b><br />
<ol>
<li>Start WSO2 ESB with port offset =1 ( Unix: sh wso2server.sh -DportOffset=1 / Windows: wso2server.bat --DportOffset=1) </li>
</ol>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b><u>Rampart configuration for UsernameToken ( ESB )</u></b></div>
<div>
<ul>
<li>Create an ESB in-line xml local entry called "UTOverTransport.xml" with following content. </li>
</ul>
<div>
<script src="https://gist.github.com/hasithaa/c8531cb8797d64a61717.js"></script>
</div>
<div>
<br /></div>
<b><u>Password callback Implementation</u></b><br />
<br />
<ul>
<li>Create a jar with following class, and drop it to <wso2esb_home>/repository/components/lib/</wso2esb_home></li>
<li>Then restart ESB server. </li>
<li>( Maven Project is located <a href="https://svn.wso2.org/repos/wso2/people/hasitha/samples/org.example.rampart/" target="_blank">here</a>. )</li>
</ul>
<script src="https://gist.github.com/hasithaa/ad4daa18fe0993bbfc0c.js"></script>
</div>
<div>
Some useful References on Rampart password callback handler: </div>
<div>
<ol>
<li>http://wso2.com/library/3733/</li>
<li>http://wso2.com/library/240/</li>
</ol>
<div>
<br />
<div>
<b><u>ESB Proxy</u></b></div>
</div>
<br />
<ul>
<li>Create a proxy called <i><u>EchoUTProxy</u></i> with following content. </li>
</ul>
<script src="https://gist.github.com/hasithaa/1cd037313ed28bae4863.js"></script>
<br />
<div>
<br /></div>
<div>
<b><u>Testing Scenario</u></b></div>
</div>
<div>
<br />
<ul>
<li>Enable Soap tracer on WSO2 AS.</li>
<li>Invoke <u style="font-style: italic;">EchoUTProxy </u> using SOAP UI. </li>
</ul>
<div>
You can see Username token in request message as follows. </div>
<div>
<script src="https://gist.github.com/hasithaa/d44207bc54bdc763158b.js"></script>
<br />
<div>
<br /></div>
<div>
<br /></div>
</div>
</div>
Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-23309935728593837022014-05-17T23:12:00.001+05:302014-05-17T23:14:39.129+05:30Java4BPEL - Java Class extension activity for WSO2 BPS<br />
<h2 style="text-align: center;">
<b>java4bpel</b></h2>
<div style="text-align: center;">
</div>
java4bpel is an extension for Apache ODE and WSO2 BPS. java4bpel introduces new BPEL extension activity called
invokeClass, which can be used to invoke a JAVA class.<br />
<br />
<div style="text-align: center;">
<b>Project home page</b></div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
<b> </b><a href="http://hasithaa.github.io/java4bpel/">http://hasithaa.github.io/java4bpel/</a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<b>Project git location</b></div>
<div style="text-align: center;">
<b></b></div>
<div style="text-align: center;">
<a href="https://github.com/hasithaa/java4bpel">https://github.com/hasithaa/java4bpel</a><br />
<br />
<div>
<b>User Guide </b></div>
<div>
<a href="https://github.com/hasithaa/java4bpel/wiki">https://github.com/hasithaa/java4bpel/wiki</a><br />
<b> </b></div>
</div>
<div style="text-align: center;">
<b>Clone project from</b> </div>
<div style="text-align: center;">
https://github.com/hasithaa/java4bpel.git</div>
<div style="text-align: center;">
<br /></div>
Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-71444019615965451052014-05-17T13:59:00.000+05:302014-05-17T21:54:04.789+05:30Tip: Find and Replace a string in multiple files at onces by avoiding LTS (Leaning toothpick syndrome)Linux Command: <br />
<br />
<div style="text-align: center;">
<b>$ grep -lR "oldString" -r | xargs sed -i 's/oldString/newString/g'</b></div>
<br />
<br />
<u>How to avoid LST.</u><br />
<br />
If your oldString or newString contains character "/" (the delimiter), then Delimiter collision occurs, which cause to <a href="http://en.wikipedia.org/wiki/Leaning_toothpick_syndrome" target="_blank">LST</a>. To avoid that, select another delimiter such as # or ? in sed command.<br />
<br />
examples:<br />
<br />
<b>sed -i 's#oldString#newString#g'</b><br />
<b><b>sed -i 's?oldString?newString?g'</b></b><br />
<br />
<br />
<br />
<br />Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-6504212076228672082014-05-17T01:43:00.000+05:302014-05-17T13:42:01.450+05:30WSO2 BPS 3.2.0 - Performance Tuning - Know When, Why and How <br />
<ul>
<li>Following instructions are only applied to <a href="https://docs.wso2.org/display/BPS320/WSO2+Business+Process+Server+Documentation" target="_blank">WSO2 BPS 3.2.0</a> . </li>
<li>All configuration files are located under $WSO2BPS-3.2.0_HOME/repository/conf/ directory</li>
</ul>
<br />
<h2>
<u>JDBC connections.</u></h2>
<h4>
When ?</h4>
<ul>
<li>When your application requires high throughput </li>
</ul>
<h4>
Why ?</h4>
<ul style="text-align: justify;">
<li>BPS server has two engines; Apache ODE BPEL processor and HumanTask engine. These two engines are tightly coupled with database layer. They persist every instance data into database. Thus to function BPS properly, you need to allocate enough database connections for BPS datasource. </li>
<li> Both these engine share same BPS datasource and db connections. Thus generally we are recommending to allocate db connections 50-50 manner for a BPEL + HumanTask application.</li>
<li>For example if you have total 100 db connections, for a BPEL <complete id="goog_59441831">+ </complete>HumanTask application, you can use upto 50 db connections for ODE engine and leave the rest of the db connections for HumanTask operations.</li>
<li>If you have only BPEL usecase, you can allocate many db connections ( see next topic) for ODE engine. </li>
<li>Also note that, even you have allocated higher number of db connections for BPS datasource, performance may not increase as excepted. One reason would be, there are no enough db sessions from database side. If that is the case, you need to increase number of db session from database side. </li>
</ul>
<h4>
How ?</h4>
<ul>
<li>Configure BPS data source using datasources.properties file. </li>
<li>eg: see highlighted section. </li>
</ul>
<code> ...</code><br />
<code> synapse.datasources.bpsds.validationQuery=SELECT 1 FROM DUAL</code><br />
<code> synapse.datasources.bpsds.dsName=bpsds</code><br />
<b><code> synapse.datasources.bpsds.maxActive=100</code></b><br />
<code> synapse.datasources.bpsds.maxIdle=20</code><br />
<code> synapse.datasources.bpsds.maxWait=10000
</code>
<br />
<h2>
</h2>
<h2>
<u>ODE Scheduler threads </u></h2>
<h4>
When ?</h4>
<ul>
<li> When your application requires high throughput </li>
</ul>
<h4>
Why ?</h4>
<ul>
<li style="text-align: justify;">In ODE engine, every scheduler thread is associated with a db connection. So the rule of thumb is, number of ODE scheduler threads should be less than or equal to number of db connections allocated for ODE engine. Otherwise some threads may not work properly, because they can't acquire a db connections to work. </li>
<li style="text-align: justify;">For example In BPEL + HumanTask scenario, if you have total 100 db connections, your can allocate 50 threads for ODE scheduler. This will grantee that at a given time, only 50 db connections are acquired by ODE engine. </li>
</ul>
<h4>
How ? </h4>
<ul>
<li>Configure this via bps.xml.</li>
<li>eg: </li>
</ul>
<code>
<tns:odeschedulerthreadpoolsize>50</tns:odeschedulerthreadpoolsize> </code><br />
<br />
<h2>
</h2>
<h2>
<u>
HTTP connections</u></h2>
<h4>
When ?</h4>
<ul>
<li>When your have lot of service invocations.(external or internal) </li>
</ul>
<h4>
Why ?</h4>
<ul>
<li>When your BPEL processes do service invocations, they use http connections. By default this http connections are limited. Because of this, thread have to waits for http connections. </li>
<li>To avoid this, you can increase this value using Multithreaded Http Connection Manager Configuration. </li>
<li>If your processes do lot of service invocation to localhost ( or particular host), then it is required to increase maxConnectionsPerHost configuration as well. </li>
</ul>
<h4>
How ?</h4>
<ul>
<li> enable this configuration using bps.xml</li>
</ul>
<br />
<code> </code> <code><tns:MultithreadedHttpConnectionManagerConfig><br />
<tns:maxconnectionsperhost value="350"><br /> <tns:maxtotalconnections value="400"><br /> </tns:maxtotalconnections></code>
<br />
<h2>
</h2>
<h2>
<u>TimeOuts </u></h2>
<h2>
</h2>
<h4>
When ?</h4>
<ul>
<li> When partner services take more time (slow) to response. </li>
</ul>
<h4>
Why ? </h4>
<ul>
<li style="text-align: justify;">When partner services are slow or take more time to response, callee BPEL process's invoke activity fails due to message exchange timeout. By increasing time will avoid these kind of failures. </li>
<li style="text-align: justify;">Also note that, slow partner services will slow entire BPEL process. This will cause to timeout the client application. ( callee of the BPEL process.). Thus it is required increase timeout interval for client application. </li>
</ul>
<h4>
How ?</h4>
<ul>
<li>Via bps.xml and axis2.xml </li>
</ul>
Read for more information.<br />
<a href="http://nandikajayawardana.blogspot.com/2012/10/how-to-increase-external-invocation.html">http://nandikajayawardana.blogspot.com/2012/10/how-to-increase-external-invocation.html</a><br />
<h4>
</h4>
<h2>
</h2>
<h2>
<u>HumanTask Caching </u></h2>
<h4>
When ?</h4>
<ul>
<li>When you have to deal with large user store. </li>
</ul>
<h4>
Why ?</h4>
<ul style="text-align: justify;">
<li>HumanTasks are tightly coupled with users and user roles/groups. Because of this, BPS does lot of user store lookups for HumanTask operations. These user store calls can take considerable amount of time, if user store is large or located remotely. This causes to degrade performance of the entire HumanTask engine. Caching user and role lookup data at BPS side will reduce those remote user store calls and improve overall HumanTask engine's performance. </li>
</ul>
<h4>
How ? </h4>
<ul>
<li>Enable HumanTask caching in humantask.xml</li>
<li>eg: </li>
</ul>
<code>
<cacheconfiguration><br /> <enablecaching>true</enablecaching><br /> </cacheconfiguration><enablecaching></enablecaching>
</code>
<br />
<h2>
</h2>
<h2>
<u>Number of HumanTask Scheduler threads.</u></h2>
<h4>
When ?</h4>
<ul>
<li>When you are not using humantask deadline/escalation.</li>
</ul>
<h4>
Why ?</h4>
<ul>
<li>HumanTask deadline and escalation are scheduled tasks, which are executed by HumanTask scheduler. By default 50 threads are allocated for HumanTask scheduler. If you are not using deadline/escalations, you can configure this value to lower value such as 5. This will utilize idle threads in BPS server. </li>
<li>Note that, you can't set this to 0, because humantask engine has several internal scheduled tasks to run.</li>
</ul>
<h4>
How ?</h4>
<ul>
<li>Configure this value in humantask.xml, </li>
<li>eg:</li>
</ul>
<code>
<schedulerconfig><br /> <maxthreadpoolsize>5</maxthreadpoolsize><br /> </schedulerconfig> </code>Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-27591858109519057892014-05-04T16:15:00.000+05:302014-05-04T16:15:40.227+05:30An Async BPEL Process and A Human task ?In Async process ( in other words a long running process
), after the invocation of a partner process or service, the BPEL
process continues to carry on with its execution process while that
partner service completes performing its operation. This partner service
may take couple of seconds, minutes, hours or even days to complete.
The Async BPEL process then receives the result of the partner service
via a callback service, when the partner service is completed. <br />
<br />HumanTask (Web service) is one type of such a long running
partner service which returns the task result when user completes the
task. In this case, BPEL use B4P extension, which stops the BPEL execution flow which contains the B4P extension activity and waits till HumanTask output to come. Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-66359028257181029952014-04-02T23:39:00.000+05:302014-05-10T10:10:57.635+05:30Change maven local repo in one command - Ubuntu/Linux<br />
This will be useful for the developers who works with multiple maven local repositories.<br />
<br />
<b>Requirement: </b>set M2_HOME environment variable, before you start. <br />
<br />
<b>Configuration</b>: <br />
Add following bash function to .bashrc in your home directory. Change M2_LOCATION if you need. <br />
<br />
<br />
<br />
<script src="https://gist.github.com/hasithaa/9939119.js"></script>
Then reload the .bashrc using command,<br />
<div style="text-align: center;">
$ source ~/.bashrc</div>
<div style="text-align: center;">
<br /></div>
<br />
<b>How to use: </b><br />
<br />
Type changeM2 in the terminal and give the name of the m2 repo (folder) you wish to change.<br />
<br />Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-25330396133062403712014-03-28T19:13:00.000+05:302014-05-10T10:11:52.968+05:30Recovering BPEL Activity Failures - WSO2 BPS<br />
Read more about ODE activity failure and recovery from.<br />
<br />
<div style="text-align: center;">
<a href="http://ode.apache.org/extensions/activity-failure-and-recovery.html" target="_blank">http://ode.apache.org/extensions/activity-failure-and-recovery.html</a></div>
<h3>
</h3>
<h2>
Method 1: Via WSO2 BPS Management Console </h2>
<br />
In WSO2 BPS, BPEL failed activity recovery can be done using WSO2 BPS Management console.<br />
<br />
To do this, it is <b>required</b> to enable ODE <i>activityLifecycle</i> events for a BPEL process. To do that modify process-event
configuration in deploy.xml as follow.
<br />
<script src="https://gist.github.com/hasithaa/56487684f55232bba7cf.js"></script>
(refer <a href="http://ode.apache.org/ode-execution-events.html" target="_blank">http://ode.apache.org/ode-execution-events.html</a> for to see how you can enable ODE events for a BPEL process.)<br />
<br />
Users can view activity failures for a BPEL process instance in the instance view page. <br />
<br />
1) Goto Instances -> click on of the instance ID to open the instance view for that instance.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8A4hcUIE6IE6MYu7h576pc2_V4P6Xis4jqoQukbaQJaRKc3yIZazTYEMx8_xkGEfYPTwpnbsQmXiRdb0MXGLUWAJ99xgLMSiu16L68_-isJNOVTgwYoljbXPDVcrn0BvYqgs601B5xk8/s1600/Screenshot+from+2014-03-27+19:38:22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8A4hcUIE6IE6MYu7h576pc2_V4P6Xis4jqoQukbaQJaRKc3yIZazTYEMx8_xkGEfYPTwpnbsQmXiRdb0MXGLUWAJ99xgLMSiu16L68_-isJNOVTgwYoljbXPDVcrn0BvYqgs601B5xk8/s1600/Screenshot+from+2014-03-27+19:38:22.png" height="400" width="380" /></a></div>
<br />
2) In the instance view, you can find failed activity/activities under activity informations. (See image). Also you can retry/cancel (ignore a failed activity) a failed activity using two buttons listed under Action column. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMnWEuv45mmeMAmZ7MpIbxHyu2KLvKsd15f5CXqBPHLbexHC3JYINChFsEfbRGAgUtK1dUwtYSCw_fkDxA7iKMS9ksyjtkfi_StPRvIbP4B3qwXyqMtjq50OYQHaU5LVSMyy4dR6VoT-U/s1600/Screenshot+from+2014-03-27+20:12:14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMnWEuv45mmeMAmZ7MpIbxHyu2KLvKsd15f5CXqBPHLbexHC3JYINChFsEfbRGAgUtK1dUwtYSCw_fkDxA7iKMS9ksyjtkfi_StPRvIbP4B3qwXyqMtjq50OYQHaU5LVSMyy4dR6VoT-U/s1600/Screenshot+from+2014-03-27+20:12:14.png" height="307" width="640" /></a></div>
<br />
<br />
<br />
<br />
<h2>
Method 2 - Via InstanceManagementService admin API</h2>
<br />
<br />
Also users can recover failed activities by using BPS InstanceManagementService. Unfortunately there is no UI functionality for this when ode events are disabled. (BPS 3.2.0 & older)<br />
<br />
<br />
These are the steps, to retry activities using InstanceManagementService admin service.<br />
<br />
1) Execute following SQL query on BPS database.<br />
<br />
<script src="https://gist.github.com/hasithaa/1fda3aa4a15a0edc0ece.js"></script>
This will return the failed activities with corresponding BPEL process instance id. You will require following information to retry a failed activity.<br />
<ul>
<li>INSTANCE_ID</li>
<li>ACTIVITY_ID</li>
</ul>
<br />
2) Set HideAdminServiceWSDLs configuration to false in <bps_home>/repository/conf/carbon.xml file.<br /><br />
eg:<script src="https://gist.github.com/hasithaa/1d3cbb5a055775a39867.js"></script>
<br /><br />
3) Then start the BPS server.</bps_home><br />
<bps_home><br />
4) Now create a SOAP-UI project using https://localhost:9443/services/InstanceManagementService?wsdl</bps_home><br />
<bps_home><br />
5) Create a new request under recoverActivity operation. A sample request will be like this.<br /><br />
<script src="https://gist.github.com/hasithaa/4086f5f493277e362a0b.js"></script>
<br />
6) Then Authenticate soap-ui request by configuring authentication and security related settings.<br />For Basic Auth select Authorization type as preemptive, and give admin user name and password.<br /><br />
7) Then for each failed activity (results in step 1), send a recoverActivity request. Use "retry" action to retry activity, and use "cancel" action to cancel the activity retry and continue instance execution.</bps_home><br />
<br />
<br />Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-32506436218133617692014-03-18T01:00:00.000+05:302014-05-10T10:12:31.301+05:30Running HumanTask Cleanup Job - WSO2 BPSHumanTask engine allows you to configure periodic cleanup tasks from the
WSO2 BPS persistence storage based on task status. To enable Task clean
up task, uncomment TaskCleanupConfig element in HumanTask.xml<br />
<br />
<script src="https://gist.github.com/hasithaa/fc276086f22c6d13096d.js"></script>
<br />
HumanTask engine uses quartz-scheduler for cron jobs. Refer [1] to
declare cron expressions format. In above example, Cron scheduler will
trigger TaskCleanup task every Four Hours, to remove COMPLETED,
OBSOLETE, EXITED from the database.<br />
<br />
[1] -<a href="http://www.quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontrigger">http://www.quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontrigger</a>
<br />
<br />
<br />Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-32828375532062947972014-03-11T12:12:00.002+05:302014-06-20T12:14:39.241+05:30Generating a random unique number in a SOAP UI request<br />
In the request use, <br />
<br />
<span dir="ltr" id=":4so">${=System.curre<wbr></wbr>ntTimeMillis() + ((int)(Math.ran<wbr></wbr>dom()*10000))}</span><br />
<br />
<span dir="ltr" id=":4so">example : </span><br />
<br />
<script src="https://gist.github.com/hasithaa/eefb4f97a3e9ea5a15d9.js"></script>
<span dir="ltr" id=":4so">Note : Here I am generating this number by adding currant milliseconds as a prefix. So this will generate almost unique number.</span><br />
<br />
<br />
<u><b><span dir="ltr" id=":4so">Update: 20th June 2014. </span></b></u><br />
<br />
<span dir="ltr" id=":4so">Another simple way to do this. </span><br />
<br />
<div style="text-align: center;">
<span dir="ltr" id=":4so">${=java.util.UUID.randomUUID()<wbr></wbr>} </span></div>
Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-24698487375130210152013-08-25T19:43:00.002+05:302014-05-10T10:13:56.095+05:30Maven jax-ws plugin usageThis post shows an example of jax-ws maven plug-in usage. This maven plug-in can be found in two repositories<br />
<ol>
<li>org.codehaus.mojo</li>
<li>org.jvnet.jax-ws-commons</li>
</ol>
First repository contains old versions of this plug-in. ( available upto versions 1.12 ). Second one has the Latest version (2.3) and it can be found in <a href="http://jax-ws-commons.java.net/jaxws-maven-plugin/" target="_blank">http://jax-ws-commons.java.net/jaxws-maven-plugin/</a>. To use latest version, replace groupID and version fields with following .<br />
<br />
<blockquote class="tr_bq">
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<pre><code> <groupid>org.jvnet.jax-ws-commons</groupid></code></pre>
<pre><code> <artifactid>jaxws-maven-plugin</artifactid></code></pre>
<pre><code> <version>2.3</version></code></pre>
</div>
</blockquote>
<br />
<br />
<script src="https://gist.github.com/hasithaa/6331948.js"></script>Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0tag:blogger.com,1999:blog-6565739796414432576.post-64899214686469298772013-08-20T00:04:00.001+05:302014-05-10T10:14:57.580+05:30Working with SOAP Headers in BPEL - WSO2 BPS / Apache ODE<br />
Most of the web services use soap headers to pass various kinds of information and it is required to manipulate those headers within a BPEL process when we are creating a complex business logic. Sometimes we have to deal with soap headers which aren't declared in the WSDL abstract message. These kind of headers are called <b>Dynamic headers </b>and both Apache ODE and WSO2 BPS can handle these type of soap headers.<br />
<br />
For more information about header handling in Apache ODE, follow <a href="http://ode.apache.org/extensions/headers-handling.html" target="_blank">this article</a>.<br />
<br />
This post will show you how to handle soap headers, covering following scenarios, <br />
<br />
<ol>
<li>Reading a soap header in request message.</li>
<li>Create a new soap header in a variable and assign a value to it.</li>
<li>Copying soap header from one variable to another. </li>
</ol>
<br />
<ol>
</ol>
<b>Sample BPEL Process</b><br />
<br />
To demonstrate above scenarios let's consider <a href="https://gist.github.com/hasithaa/6271445" target="_blank">this simple BPEL process</a>. These are process's default request and response messages.<br />
<script src="https://gist.github.com/hasithaa/b66118c9bf9e0162d596.js"></script>
<br />
<br />
<u><b>1. Reading SOAP Header in Request Message. </b></u><br />
<br />
Let's read <i>"echo"</i> header from the input message and set its value into the process output message (to result element). To do this, add another copy into the Assign activity like this. Note that we are using "<i><b>header" </b>attribute to refer a soap header.</i> (Resultant process's response is shown in response.xml)<br />
<br />
<script src="https://gist.github.com/hasithaa/6271668.js"></script>
<br />
<u><b>2. Create a new soap Header in a variable and assign a value to it</b></u><br />
<br />
Let's add new soap header called "echo2" in the output variable and assign request message text (input) value as new header value. First copy will create the echo2 header and second copy will do the value assigning. (Resultant response is shown in response.xml)<br />
<script src="https://gist.github.com/hasithaa/6272328.js"></script>
<b><br /></b>
<b>3. Copying soap header from one variable to another. </b><br />
<br />
Let's copy request message's echo header to output message. In the Assign activity define a copy as follow. (Resultant response is shown in response.xml)<br />
<br />
<script src="https://gist.github.com/hasithaa/6272476.js"></script>
<b></b> Hasitha Aravindahttp://www.blogger.com/profile/02288977769842927599noreply@blogger.com0