Re: [Dev] Issue while using the special characters in url-template with legacy encoding.

2016-01-03 Thread Kathees Rajendram
Hi Malaka/Kevin,

The legacy and other encoding didn't support for special characters in HTTP
Endpoint. Temporarily I was able to resolve by replacing the special
character with encoded values.

@@ -246,6 +246,22 @@ public class HTTPEndpoint extends AbstractEndpoint {
 try {
 URI uri = new URI(template.expand());
 evaluatedUri = uri.toString();
+StringBuilder buf = null;
+if (evaluatedUri != null) {
+buf = new StringBuilder(evaluatedUri.length());
+char focus;
+for (int i = 0; i < evaluatedUri.length(); i++) {
+focus = evaluatedUri.charAt(i);
+if (focus == '#') {
+buf.append("%23");
+} else if (focus == '@') {
+buf.append("%40");
+} else {
+buf.append(focus);
+}
+}
+evaluatedUri = buf.toString();
+}

Thanks,
Kathees

On Sat, Dec 19, 2015 at 9:00 PM, Kevin Ratnasekera  wrote:

> Hi Kathees,
> Is there a specific reason to use the legacy-encoding prefix here in your
> case? Have you tried without the legacy-encoding prefix?
> Can you try the following with legacy prefix,
>
> 
> 
> 
> uri-template="legacy-encoding:{uri.var.apiUrl}/1.1/statuses/update.json?
> status={uri.var.status}"/>
> 
> 
>
> Regards
> Kevin
>
> On Fri, Dec 18, 2015 at 8:56 PM, Malaka Silva  wrote:
>
>> Hi Kathees,
>>
>> Can you try debugging [1] and try to figure out the issues?
>>
>> May be the issues it in  'String decodedString =
>> URLDecoder.decode(template.expand(), "UTF-8");'
>>
>> [1]
>> https://github.com/wso2/wso2-synapse/blob/master/modules/core/src/main/java/org/apache/synapse/endpoints/HTTPEndpoint.java
>>
>> On Fri, Dec 18, 2015 at 4:59 PM, Kathees Rajendram 
>> wrote:
>>
>>> Hi,
>>>
>>> I created uri.var.status property and used the property in url-template with
>>> legacy encoding. Remaining part of URL is removed with the special
>>> character.
>>>
>>> 
>>> 
>>> >>
>>> uri-template="legacy-encoding:{uri.var.apiUrl}/1.1/statuses/update.json?{uri.var.status}"/>
>>> 
>>> 
>>>
>>> *Request* - sample #test
>>>
>>> *Output*
>>>
>>> [2015-12-18 16:45:47,269] DEBUG - wire << "POST
>>> /1.1/statuses/update.json?status=sample%20 HTTP/1.1[\r][\n]"
>>> [2015-12-18 16:45:47,269] DEBUG - wire << "Accept-Language:
>>> en-US,en;q=0.8[\r][\n]"
>>>
>>> *Expected output*
>>>
>>> [2015-12-18 16:45:47,269] DEBUG - wire << "POST
>>> /1.1/statuses/update.json?status=sample%20%23test HTTP/1.1[\r][\n]"
>>> [2015-12-18 16:45:47,269] DEBUG - wire << "Accept-Language:
>>> en-US,en;q=0.8[\r][\n]"
>>>
>>> What could be the reason?
>>>
>>> Thanks,
>>> Kathees
>>>
>>> --
>>> Kathees
>>> Software Engineer,
>>> email: kath...@wso2.com
>>> mobile: +94772596173
>>>
>>
>>
>>
>> --
>>
>> Best Regards,
>>
>> Malaka Silva
>> Senior Tech Lead
>> M: +94 777 219 791
>> Tel : 94 11 214 5345
>> Fax :94 11 2145300
>> Skype : malaka.sampath.silva
>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>> Blog : http://mrmalakasilva.blogspot.com/
>>
>> WSO2, Inc.
>> lean . enterprise . middleware
>> http://www.wso2.com/
>> http://www.wso2.com/about/team/malaka-silva/
>> 
>> https://store.wso2.com/store/
>>
>> Save a tree -Conserve nature & Save the world for your future. Print this
>> email only if it is absolutely necessary.
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>


-- 
Kathees
Software Engineer,
email: kath...@wso2.com
mobile: +94772596173
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 Private PaaS 4.1.1 RC2

2016-01-03 Thread Gayan Gunarathne
Thank you for testing and verifying WSO2 Private PaaS 4.1.1 RC2.

We are closing this vote and this vote passes with
6(Thanuja,Akila,Raj,IsuruH,Pubudu,Imesh) +1 votes and 0 -1 votes.We will
proceed with the release of WSO2 Private PaaS 4.1.1.


On Thu, Dec 31, 2015 at 7:13 PM, Imesh Gunaratne  wrote:

> +1 for the release! Verified Private PaaS 4.1.1-RC2 with following:
>
> - Verified application deployment & un-deployment on Kubernetes 1.0.6
> - Verified scaling up with high CPU
> - Verified scaling down
> - Verified UI functionality
>
> Thanks
>
> On Mon, Dec 21, 2015 at 7:35 PM, Gayan Gunarathne  wrote:
>
>>  Hi All,
>>
>> This is the second release candidate of WSO2 Private PaaS 4.1.1.
>>
>> This release fixes the following issues:
>> *https://wso2.org/jira/browse/PAAS-305?filter=12582
>> *
>>
>> Please download, test and vote. The vote will be open for 72 hours or as
>> needed.
>>
>> *​Source and binary distribution files:*
>> https://svn.wso2.org/repos/wso2/scratch/PPAAS/wso2ppaas-4.1.1-rc2/
>>
>> *Maven staging repository:*
>>
>> http://maven.wso2.org/nexus/content/repositories/orgwso2ppaas-217/
>>
>> *The tag to be voted upon:*
>> https://github.com/wso2/product-private-paas/tree/v4.1.1-rc2
>>
>>
>> [ ] Broken - do not release (explain why)
>> [ ] Stable - go ahead and release
>>
>>
>> Thanks,
>> The WSO2 Private PaaS Team
>>
>> --
>>
>> Gayan Gunarathne
>> Technical Lead, WSO2 Inc. (http://wso2.com)
>> Committer & PMC Member, Apache Stratos
>> email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Imesh Gunaratne*
> Senior Technical Lead
> WSO2 Inc: http://wso2.com
> T: +94 11 214 5345 M: +94 77 374 2057
> W: http://imesh.gunaratne.org
> Lean . Enterprise . Middleware
>
>


-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DAS] Need help to update table

2016-01-03 Thread Nirmal Fernando
Hi All,

Is there any solution for this? Isn't it a valid use-case to publish data
from a front-end UI ?

On Mon, Dec 14, 2015 at 12:03 PM, Nethaji Chandrasiri 
wrote:

> @Inosh - Thanks
>
> I'm facing another issue [1] when I try to update DAS table from a
> different domain. Please correct me if I'm wrong, as far as I know there's
> a way to enable CORS for REST API but is there a proper way to do it when
> using HTTP event receiver ?
>
> [1] XMLHttpRequest cannot load
> http://10.100.4.112:9766/endpoints/EventReceiverMov. No
> 'Access-Control-Allow-Origin' header is present on the requested resource.
> Origin 'http://10.100.4.112:9763' is therefore not allowed access.
>
> Appreciate if someone can help me with this.
>
> Thanks
>
> On Fri, Dec 11, 2015 at 2:07 PM, Inosh Goonewardena 
> wrote:
>
>> Hi Nethaji,
>>
>> You can publish data through HTTP transport [1]. Also please keep in mind
>> that if you want to update the record you have to configure the primary
>> keys for the table.
>>
>> [1] https://docs.wso2.com/display/DAS300/HTTP+Event+Receiver
>>
>>
>> On Fri, Dec 11, 2015 at 11:15 AM, Nirmal Fernando 
>> wrote:
>>
>>>
>>> On Fri, Dec 11, 2015 at 11:07 AM, Nethaji Chandrasiri 
>>> wrote:
>>>
 Hi,

 I'm currently working on a website to demonstrate a recommender system
 using ML. As per chosen scenario when users rate movies I want to update
 DAS table (as a new record). Can someone please help me with this? (Data
 will be taken from UI).


 Thanks
 --
 *Nethaji Chandrasiri*
 *Software Engineering* *Intern; WSO2, Inc.; http://wso2.com
 *
 Mobile : +94 (0) 779171059 <%2B94%20%280%29%20778%20800570>
 Email  : neth...@wso2.com

>>>
>>>
>>>
>>> --
>>>
>>> Thanks & regards,
>>> Nirmal
>>>
>>> Team Lead - WSO2 Machine Learner
>>> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
>>> Mobile: +94715779733
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>>
>>>
>>
>>
>> --
>> Thanks & Regards,
>>
>> Inosh Goonewardena
>> Associate Technical Lead- WSO2 Inc.
>> Mobile: +94779966317
>>
>
>
>
> --
> *Nethaji Chandrasiri*
> *Software Engineering* *Intern; WSO2, Inc.; http://wso2.com
> *
> Mobile : +94 (0) 779171059 <%2B94%20%280%29%20778%20800570>
> Email  : neth...@wso2.com
>



-- 

Thanks & regards,
Nirmal

Team Lead - WSO2 Machine Learner
Associate Technical Lead - Data Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev