Hi Malaka/Chinthaka,

Can you elaborate more on the requirement? If you could give us an example
scenario, we could think about a possible solution. As Isuru mentioned
above, setting template parameters from an xpath expression (dynamically)
is not supported at the moment. You can use the progression factor with
initial and max duration values to achieve dynamic timeout duration. What I
am not clear is why do we need to extract the timeout from the request?


Thanks,
Chanaka


On Sat, Feb 22, 2014 at 8:16 PM, Malaka Silva <[email protected]> wrote:

> This is a requirement for connector implementations.
>
>
> On Fri, Feb 21, 2014 at 2:36 PM, Isuru Udana <[email protected]> wrote:
>
>> Hi,
>>
>> Setting the endpoint timeout values dynamically is not supported.
>> What is the actual requirement to make it dynamic ? In typical
>> integration scenarios, endpoint timeout value is a pre-configured static
>> value.
>>
>> Thanks.
>>
>>
>> On Fri, Feb 21, 2014 at 2:13 PM, Krishantha Dinesh 
>> <[email protected]>wrote:
>>
>>> try this
>>>
>>> <xsl:value-of select="number($valueinText)
>>>
>>>
>>>
>>> On Fri, Feb 21, 2014 at 1:27 PM, wchinthakaps <
>>> [email protected]> wrote:
>>>
>>>> I have to set endpoint call timeout dynamically, from user input SOAP
>>>> request
>>>> value.
>>>>
>>>> Timeout synapse template:
>>>> <template name="timeout" xmlns="http://ws.apache.org/ns/synapse";>
>>>>         <parameter name="timout_duration" />
>>>>         <parameter name="initial_duration" />
>>>>         <parameter name="progressafactor" />
>>>>         <parameter name="maximumDuration" />
>>>>
>>>>         <endpoint name="annonymous">
>>>>                 <default format="soap11">
>>>>                         <timeout>
>>>>                                 <duration>$timout_duration</duration>
>>>>                                 <responseAction>fault</responseAction>
>>>>                         </timeout>
>>>>                         <suspendOnFailure>
>>>>
>>>> <initialDuration>$initial_duration</initialDuration>
>>>>
>>>> <progressionFactor>$progressafactor</progressionFactor>
>>>>
>>>> <maximumDuration>$maximumDuration</maximumDuration>
>>>>                         </suspendOnFailure>
>>>>                 </default>
>>>>         </endpoint>
>>>> </template>
>>>>
>>>> Call the endpoint:
>>>> <call>
>>>>                         <endpoint name="templ_ep_timeout"
>>>> template="[timeout template path]">
>>>>                                 <parameter name="timout_duration"
>>>> value="6000" />
>>>>                                 <parameter name="initial_duration"
>>>> value="2000" />
>>>>                                 <parameter name="progressafactor"
>>>> value="2.0" />
>>>>                                 <parameter name="maximumDuration"
>>>> value="3000" />
>>>>                         </endpoint>
>>>>                 </call>
>>>>
>>>> Questions:
>>>>
>>>> 1. <parameter name="timout_duration" value="6000" />. How to set
>>>> "timout_duration" parameter value dynamically? ex: taken from SOAP
>>>> request
>>>> and set value through expression="get-property('timeoutDuration')"
>>>>
>>>> 2. Anyway I tried, without timeout template, inside my synapse template
>>>> with: <parameter name="timeoutDuration" description="timout_duration" />
>>>> call:
>>>> <call>
>>>>                         <endpoint>
>>>>                                 <default format="soap11">
>>>>                         <timeout>
>>>>                                 <duration>$timeoutDuration</duration>
>>>>                                 <responseAction>fault</responseAction>
>>>>                         </timeout>
>>>>                         <suspendOnFailure>
>>>>                                 <initialDuration>2000</initialDuration>
>>>>
>>>> <progressionFactor>1.5</progressionFactor>
>>>>                                 <maximumDuration>3000</maximumDuration>
>>>>                         </suspendOnFailure>
>>>>                 </default>
>>>>                         </endpoint>
>>>>                 </call>
>>>>
>>>> when template deployed:
>>>> "Caused by: org.apache.synapse.SynapseException: Endpoint timeout
>>>> duration
>>>> expected as a number but was not a number", comes.
>>>> if this way is poible, how to make $timeoutDuration as number?
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://wso2-oxygen-tank.10903.n7.nabble.com/ESB-Issue-with-setting-timeout-values-dynamically-tp92461.html
>>>> Sent from the WSO2 Development mailing list archive at Nabble.com.
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Isuru Udana*
>>  Senior
>> * Software Engineer*
>> WSO2 Inc.; http://wso2.com
>> email: [email protected] cell: +94 77 3791887
>> blog: http://mytecheye.blogspot.com/
>> twitter: http://twitter.com/isudana
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> Best Regards,
>
> Malaka Silva
> Senior Tech 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/>
>
> Save a tree -Conserve nature & Save the world for your future. Print this
> email only if it is absolutely necessary.
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
--
Chanaka Fernando
Technical Lead
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 773337238
Blog : http://soatutorials.blogspot.com
LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
Twitter:https://twitter.com/chanakaudaya
Wordpress:http://chanakaudaya.wordpress.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to