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,
<call>
<endpoint>
<http method="post"
uri-template="legacy-encoding:{uri.var.apiUrl}/1.1/statuses/update.json?
status={uri.var.status}"/>
</endpoint>
</call>
Regards
Kevin
On Fri, Dec 18, 2015 at 8:56 PM, Malaka Silva <[email protected]> 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 <[email protected]>
> 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.
>>
>> <call>
>> <endpoint>
>> <http method="post"
>>
>> uri-template="legacy-encoding:{uri.var.apiUrl}/1.1/statuses/update.json?{uri.var.status}"/>
>> </endpoint>
>> </call>
>>
>> *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: [email protected]
>> 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/
> <http://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
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev