Hi Shakila, Thanks for the reply. But looks like my question wasn't much clear. Those are actually 2 separate questions.
@Sriashalya: That solves my 2nd issue. I tried using *get-property(), *but it didn't work. But yours works. Thanks. @All: Any suggestions on 1st question? Is there a way to create my final query without using *fn:concat()*? Thanks, Bhathiya On Fri, Aug 21, 2015 at 12:20 AM, Sriashalya Srivathsan <[email protected]> wrote: > Hi > You can try this by following > > <property expression=“//qu:user/qu:query/text()" name="queryString"/> > > <salesforce.query> > <batchSize>1</batchSize> > <queryString>$ctx: queryString}</queryString> > </salesforce.query> > > > Thanks. > > > On Fri, Aug 21, 2015 at 9:45 AM, Shakila Sivagnanarajah <[email protected]> > wrote: > >> Hi Bhathiya, >> >> From my knowledge, creating my query with a dynamic value using property >> is the best way rather setting the value for queryString directly. If we >> do like this, that value will be set to message context. >> >> Thank you >> >> On Fri, Aug 21, 2015 at 9:42 AM, Shakila Sivagnanarajah <[email protected] >> > wrote: >> >>> Hi Bhathiya, >>> >>> From my knowledge, creating my query with a dynamic value is the best >>> way. If we do like this, that value will be set to message context. >>> >>> Thank you >>> >>> >>> On Fri, Aug 21, 2015 at 5:26 AM, Bhathiya Jayasekara <[email protected]> >>> wrote: >>> >>>> Hi all, >>>> >>>> I want to execute $subject. I could achieved it like below, but I >>>> believe there must be a better way. >>>> >>>> <property name="UserQuery" value="Select a.name, a.age From Users a where >>>> name='"/> >>>> <property name="Username" value="newuser"/> >>>> <property name="Apostrophe" value="'"/> >>>> <property name="CompleteUserQuery" >>>> expression="fn:concat(get-property('UserQuery'), get-property('Username'), >>>> get-property('Apostrophe'))"/> >>>> >>>> >>>> <payloadFactory media-type="xml"> >>>> <format> >>>> <qu:user xmlns:qu="user.com"> >>>> <qu:query>$1</qu:query> >>>> </qu:user> >>>> </format> >>>> <args> >>>> <arg evaluator="xml" >>>> expression="get-property('CompleteActivityQuery')"/> >>>> </args> >>>> </payloadFactory> >>>> >>>> >>>> <salesforce.query> >>>> <batchSize>1</batchSize> >>>> <queryString >>>> xmlns:qu="user.com">{//qu:user/qu:query/text()}</queryString> >>>> </salesforce.query> >>>> >>>> >>>> I'd like to know 2 things. what is the best way, >>>> >>>> 1) to create my query with a dynamic value (i.e. property)? >>>> 2) to set a property value to queryString? >>>> >>>> Thanks, >>>> >>>> -- >>>> *Bhathiya Jayasekara* >>>> *Senior Software Engineer,* >>>> *WSO2 inc., http://wso2.com <http://wso2.com>* >>>> >>>> *Phone: +94715478185 <%2B94715478185>* >>>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj >>>> <http://www.linkedin.com/in/bhathiyaj>* >>>> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>* >>>> *Blog: http://movingaheadblog.blogspot.com >>>> <http://movingaheadblog.blogspot.com/>* >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> Shakila Sivagnanarajah >>> Associate Software Engineer >>> Mobile :+94 (0) 770 760240 >>> [email protected] >>> >> >> >> >> -- >> Shakila Sivagnanarajah >> Associate Software Engineer >> Mobile :+94 (0) 770 760240 >> [email protected] >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Regards > S.Sriashalya, > WSO2 *Inc*. > lean . enterprise . middleware > -- *Bhathiya Jayasekara* *Senior Software Engineer,* *WSO2 inc., http://wso2.com <http://wso2.com>* *Phone: +94715478185* *LinkedIn: http://www.linkedin.com/in/bhathiyaj <http://www.linkedin.com/in/bhathiyaj>* *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>* *Blog: http://movingaheadblog.blogspot.com <http://movingaheadblog.blogspot.com/>*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
