On Wed, Mar 19, 2014 at 2:56 PM, Pushpalanka Jayawardhana <la...@wso2.com>wrote:

> Thanks,
>
> Pushpalanka.
> --
> Pushpalanka Jayawardhana, B.Sc.(Hons).
> Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
> Mobile: +94779716248
> Blog: pushpalankajaya.blogspot.com/ | LinkedIn:
> lk.linkedin.com/in/pushpalanka/ | Twitter: @pushpalanka
>
>
>
> On Wed, Mar 19, 2014 at 1:44 AM, Sanjeewa Malalgoda <sanje...@wso2.com>wrote:
>
>> First for this type of definitions you need to use uri-template instead
>> of url-mapping. With uri-templates only you will be able to define resource
>> variables as you mentioned. See following examples.
>>
>>         URITemplate /sanjeewa/{name,id}/*
>>         matches /sanjeewa/user,190/test
>>         matches /sanjeewa/user,190/test?year=2012
>>
>
> Thanks for the reply.
> So as I understood we will be able to get name and id values as '
> get-property('uri.var.name')'. But is there way to read in 'test' as a
> value as well.
>
AFAIK we cannot get it. Workaround would be get To property and  do some
string manipulation to extract it.

>
> eg: /sanjeewa/user,190/test?year=2012
>      /sanjeewa/user,190/prod?year=2012
>      /sanjeewa/user,190/pre-prod?year=2012     so we need to read the
> path whether it's test/prod pr pre-prod as well.
>
> I have tried with URITemplate /sanjeewa/{name,id}/{environment}?* . But
> this did not work and is expecting URL to be /sanjeewa/user,190/test?*.
>
I didn't get your question. Can you point me uri template created and
request sent. Did you see any error like resource not matching or something
similar.

Thanks,
sanjeewa.

> Please let me know if I am missing anything.
>
>
>
>>         URITemplate /sanjeewa/~{test}?*
>>         matches /sanjeewa/~tester?test
>>
>> Thanks,
>> sanjeewa.
>>
>>
>> On Wed, Mar 19, 2014 at 1:56 PM, Pushpalanka Jayawardhana <la...@wso2.com
>> > wrote:
>>
>>> Hi,
>>>
>>> We need to read in some parameters from the URL path as well as some
>>> optional query parameters. (in ESB 4.6.0)
>>>
>>> Have tried few combinations of URL-mapping and URI- templates.
>>> Is it possible to use something similar to
>>>
>>> <resource methods="GET" url-mapping="/case/{grade}/{studentId}?*">
>>>
>>> This did not work for me.
>>> Is it possible to achieve this functionality without modifying the URL
>>> to get everything as query parameters?
>>>
>>> Thanks,
>>>  Pushpalanka.
>>> --
>>> Pushpalanka Jayawardhana, B.Sc.(Hons).
>>> Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
>>> Mobile: +94779716248
>>> Blog: pushpalankajaya.blogspot.com/ | LinkedIn:
>>> lk.linkedin.com/in/pushpalanka/ | Twitter: @pushpalanka
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> *Sanjeewa Malalgoda*
>> Senior Software Engineer
>> WSO2 Inc.
>> Mobile : +94713068779
>>
>>  <http://sanjeewamalalgoda.blogspot.com/>blog
>> :http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/>
>>
>>
>>
>


-- 

*Sanjeewa Malalgoda*
Senior Software Engineer
WSO2 Inc.
Mobile : +94713068779

 <http://sanjeewamalalgoda.blogspot.com/>blog
:http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to