Hi Ishara, I was able to get it working as follows.
<?xml version="1.0" encoding="UTF-8"?> <sequence xmlns="http://ws.apache.org/ns/synapse" name="admin--WB:v1--In"> <log level="full"> <property name="IN_MESSAGE" value="IN_MESSAGE"/> <property name="IN_MESSAGE_CID** " expression="$url:clientId"/> </log> </sequence> On Thu, Feb 16, 2017 at 5:42 PM, Abimaran Kugathasan <abima...@wso2.com> wrote: > Hi Ishara, > > Have you tried using get-property('query.param.clientId')? > > You need to define Endpoint like > > https://localhost:9444//wb/1/countries/us?clientId={query.param.clientId} > > On Thu, Feb 16, 2017 at 5:19 PM, Ishara Cooray <isha...@wso2.com> wrote: > >> In APIM 2.1.0 i am trying to read a request query parameter . >> >> i have this request "GET /wb/1/countries/us?clientId=isharac >> >> in an In sequence i read query parameter as below. >> <property name="cid" expression="get-property('uri.var.clientId')"/> >> >> But when i log it 'cid' is null >> am i doing anything wrong here? >> how can i read the query param in a seq? >> >> This is the sequence i used. >> >> <?xml version="1.0" encoding="UTF-8"?> >> <sequence xmlns="http://ws.apache.org/ns/synapse" >> name="admin--WB:v1--In"> >> <log level="full"> >> <property name="IN_MESSAGE" value="IN_MESSAGE"/> >> <property name="IN_MESSAGE_CID" expression="get-property('uri.var. >> clientId')"/> >> </log> >> </sequence> >> >> >> I also tried, get-property('$uri:clientId') and get-property('$url') and >> they are also null. >> >> When i debug, i couldn't find these properties in message context. >> >> Alternatively, >> following property is there in the message context. So what is the best >> way to get clientId from this property? If so is it a good approach? >> >> REST_FULL_REQUEST_PATH=/ta/1/menu?clientId=isharaccc >> >> >> Thanks & Regards, >> Ishara Cooray >> Senior Software Engineer >> Mobile : +9477 262 9512 <+94%2077%20262%209512> >> WSO2, Inc. | http://wso2.com/ >> Lean . Enterprise . Middleware >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Thanks > Abimaran Kugathasan > Senior Software Engineer - API Technologies > > Email : abima...@wso2.com > Mobile : +94 773922820 <+94%2077%20392%202820> > > <http://stackoverflow.com/users/515034> > <http://lk.linkedin.com/in/abimaran> > <http://www.lkabimaran.blogspot.com/> <https://github.com/abimarank> > <https://twitter.com/abimaran> > > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Thanks and Regards *,Shani Ranasinghe* Senior Software Engineer WSO2 Inc.; http://wso2.com lean.enterprise.middleware mobile: +94 77 2273555 Blog: http://waysandmeans.blogspot.com/ linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev