The following works fine. Please check again.

GET http://192.168.2.1:8280/test?type=crust

<api xmlns="http://ws.apache.org/ns/synapse"; name="Test" context="/test">
   <resource methods="GET">
      <inSequence>
         <property name="FOO" expression="$ctx:query.param.type"
type="STRING"></property>
         <log level="custom">
            <property name="FOO"
expression="get-property('FOO')"></property>
         </log>
      </inSequence>
   </resource>
</api>



On Fri, Feb 14, 2014 at 6:46 PM, Susinda Perera <[email protected]> wrote:

> I tried to access query parameters using property mediators in
> both query.param and uri.var ways, but only uri.var gives me an output.
>
> What i thought was syntax like
>  <resource uri-template="/view/{symbol}" methods="GET"> use uri.var
> and syntax like
> <resource uri-template="/view?Symbol={symbol}" methods="GET"> uses
> query.param but i was not able to use query.param in second syntax
>
> Neither
> <property name="Val" expression="$ctx:query.param.val"></property> nor
>  <property name="Val" expression="get-property('query.param.val')"></
> property>
>
> syntax gave me an output. Where i might have gone wrong or is this a bug?
>
>
>
> --
> *Susinda Perera*
> Software Engineer
> Mobile:(+94)716049075
>
> WSO2 Inc. http://wso2.com/
> Tel : 94 11 214 5345 Fax :94 11 2145300
>
>


-- 
Kasun Indrasiri
Software Architect
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

cell: +94 77 556 5206
Blog : http://kasunpanorama.blogspot.com/
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to