Hi Malaka,

There is a template with a parameter as registry resource for backend
endpoint. So inside the template we need to call backend endpoint using the
parameter pass into template. Hope you understand my requirement.


Thanks
Godwin


On Thu, Jun 9, 2016 at 12:37 AM, Malaka Silva <[email protected]> wrote:

> Hi Godwin,
>
> For using the key-expression feature, shall we get the exact use case that
> you are trying to implement?
>
> On Wed, Jun 8, 2016 at 7:55 PM, Godwin Shrimal <[email protected]> wrote:
>
>> Hi Kathees,
>>
>> My requirement is to use key-expression in blocking mode.
>>
>> @Isuru : Do we have any workaround/alternatives to achieve this ?
>>
>> Thanks
>> Godwin
>>
>>
>> On Tue, Jun 7, 2016 at 11:22 PM, Kathees Rajendram <[email protected]>
>> wrote:
>>
>>> Hi Godwin,
>>>
>>> Call mediator blocking mode supportes indirect URL with key as you
>>> mensioned above. Can you define the key expression in the endpoint.
>>>
>>> <call blocking="true">
>>>     <endpoint key="gov:/testEndpoint"/>
>>> </call>
>>>
>>> @Isuru
>>> Yes, call mediator with the combination of blocking=true and
>>> key-expression in endpoint is not supported directly. We can use above
>>> approach.
>>>
>>> Thanks,
>>> Kathees
>>>
>>> On Wed, Jun 8, 2016 at 6:27 AM, Isuru Udana <[email protected]> wrote:
>>>
>>>> Hi Godwin,
>>>>
>>>> I think key-expressions are not supported in blocking mode.
>>>> @Kathees,
>>>> Can you please confirm ?
>>>>
>>>> Thanks.
>>>>
>>>> On Wed, Jun 8, 2016 at 3:08 AM, Godwin Shrimal <[email protected]> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> When I use call mediator in my sequence as below it gives error [1].
>>>>>
>>>>> <call blocking="true">
>>>>>
>>>>>     <endpoint *key-expression*="$ctx:SAMPLE_ENDPOINT"/>
>>>>>
>>>>> </call>
>>>>> If I change the code as any of below, its works fine.
>>>>>
>>>>> <call>
>>>>>
>>>>>     <endpoint *key-expression*="$ctx:SAMPLE_ENDPOINT"/>
>>>>>
>>>>> </call>
>>>>>
>>>>> <call blocking="true">
>>>>>
>>>>>     <endpoint *key="*gov:/testEndpoint*"*/>
>>>>>
>>>>> </call>
>>>>>
>>>>> Do we have a problem in Call mediator with the combination of 
>>>>> *blocking=true
>>>>> *and *key-expression *in endpoint ?
>>>>>
>>>>>
>>>>> [1] org.apache.synapse.SynapseException: Error while performing the
>>>>> call operation
>>>>> at
>>>>> org.apache.synapse.mediators.builtin.CallMediator.handleFault(CallMediator.java:306)
>>>>> at
>>>>> org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:119)
>>>>> at
>>>>> org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:85)
>>>>> at
>>>>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
>>>>> at
>>>>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
>>>>> at
>>>>> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:149)
>>>>> at
>>>>> org.apache.synapse.message.processor.impl.sampler.SamplingService$1.run(SamplingService.java:211)
>>>>> at
>>>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>>>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>>>> at
>>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>>>> at
>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>>>> at java.lang.Thread.run(Thread.java:745)
>>>>> Caused by: java.lang.NullPointerException
>>>>> at
>>>>> org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:114)
>>>>> at
>>>>> org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:113)
>>>>>
>>>>>
>>>>> Thanks
>>>>> Godwin
>>>>>
>>>>> --
>>>>> *Godwin Amila Shrimal*
>>>>> Senior Software Engineer
>>>>> WSO2 Inc.; http://wso2.com
>>>>> lean.enterprise.middleware
>>>>>
>>>>> mobile: *+94772264165*
>>>>> linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>*
>>>>> twitter: https://twitter.com/godwinamila
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> *Isuru Udana*
>>>> Technical Lead
>>>> WSO2 Inc.; http://wso2.com
>>>> email: [email protected] cell: +94 77 3791887
>>>> blog: http://mytecheye.blogspot.com/
>>>>
>>>
>>>
>>>
>>> --
>>> Kathees
>>> Software Engineer,
>>> email: [email protected]
>>> mobile: +94772596173
>>>
>>
>>
>>
>> --
>> *Godwin Amila Shrimal*
>> Senior Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: *+94772264165*
>> linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>*
>> twitter: https://twitter.com/godwinamila
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> Best Regards,
>
> Malaka Silva
> Senior Technical 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.
>



-- 
*Godwin Amila Shrimal*
Senior Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94772264165*
linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>*
twitter: https://twitter.com/godwinamila
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to