Hi Kathees,

Thank you for taking the initiative of checking this :)

However removing the isLeafEndpoint check can cause some other issues.

Best we review the fix with ESB team.

Can you arrange a code review this week and invite IsuruU please.

On Sun, Jun 19, 2016 at 3:33 PM, Kathees Rajendram <[email protected]> wrote:

> Hi,
>
> I have added the improvement[1] to support templateEndpoint in
> callMediator blocking mode in ESB 5.0.0.
>
> @Kalyani
> You can continue the connector implementation with the patch [2]. The
> improvement will be included in ESB 5.0.0.
>
> [1] - https://wso2.org/jira/browse/ESBJAVA-4687
> [2] -
> https://drive.google.com/file/d/0B-oWbuBPpKK9WGRYNlY3ZFBhZEk/view?usp=sharing
>
> Thanks,
> Kathees
>
> On Thu, Jun 16, 2016 at 7:19 PM, Malaka Silva <[email protected]> wrote:
>
>> AFAIK we cannot use templates with call mediator in blocking mode.
>>
>> @ESB Team please confirm if this is still the case with ESB 5.0.0
>>
>>
>> On Thu, Jun 16, 2016 at 2:16 PM, Kathees Rajendram <[email protected]>
>> wrote:
>>
>>> Hi Kalyani,
>>>
>>> You can get the parameter value from init method (
>>> {$ctx:salesforce.timeout}) in the template. Instead of adding endpoints
>>> in different template, you can add the endpoint in the template for
>>> blocking calls. The endpoint timeout can be different between API methods
>>> and we need to adjust the timeout value for some api methods. So we can
>>> include the endpoint configuration inside the template rather than adding
>>> in common template.
>>>
>>> <template name="salesforceEndPoint" xmlns="
>>> http://ws.apache.org/ns/synapse";>
>>>     <parameter name="initialDuration" description="Initial timeout
>>> duration of the API request."/>
>>>     <parameter name="progressionFactor"
>>>                description="Progress factor for timeout of the API
>>> request."/>
>>>     <parameter name="maximumDuration"
>>>                description="Maximum duration for timeout of the API
>>> request."/>
>>>     <parameter name="timeout" description="Timeout duration of the API
>>> request."/>
>>>     <parameter name="responseAction"
>>>                description="It is used to specify the action to perform
>>> once an endpoint has timed out."/>
>>>     <parameter name="errorCodes" description="It is used to specify one
>>> or more error codes."/>
>>>
>>>  <call blocking="true">
>>>     <endpoint>
>>>         <default format="soap11">
>>>             <markForSuspension>
>>>                 <errorCodes>-1</errorCodes>
>>>             </markForSuspension>
>>>             <suspendOnFailure>
>>>                 <errorCodes>-1</errorCodes>
>>>                 <initialDuration>2000</initialDuration>
>>>                 <progressionFactor>1.0</progressionFactor>
>>>                 <maximumDuration>3000</maximumDuration>
>>>             </suspendOnFailure>
>>>             <timeout>
>>>                 <duration>{$ctx:salesforce.timeout}</duration>
>>>                 <responseAction>fault</responseAction>
>>>             </timeout>
>>>         </default>
>>>   </endpoint>
>>>  </call>
>>> </template>
>>>
>>> Thanks,
>>> Kathees
>>>
>>> On Thu, Jun 16, 2016 at 1:58 PM, Kalyani Yogeswaranathan <
>>> [email protected]> wrote:
>>>
>>>> Hi Al,
>>>>
>>>> I am working on salesforce connector to add dynamic endpoint. For that
>>>> I've wrote a separate template as [1] and calling this template within call
>>>> mediator,
>>>>
>>>> It's working fine for blocking false when i call endpoint template, but
>>>> it's not working for blocking true[2].
>>>>
>>>> [2]
>>>>
>>>> <call blocking="true">
>>>>     <endpoint name="EP"
>>>>               
>>>> template="org.wso2.carbon.connector.salesforce.salesforceEndPoint">
>>>>         <parameter name="timeout" value="ctx:salesforce.timeout"/>
>>>>     </endpoint>
>>>> </call>
>>>>
>>>> but if I add the whole endpoint[3], rather than calling endpoint template 
>>>> it's working fine.
>>>>
>>>> [3]
>>>> <call blocking="true">
>>>>     <endpoint>
>>>>         <default format="soap11">
>>>>             <markForSuspension>
>>>>                 <errorCodes>-1</errorCodes>
>>>>             </markForSuspension>
>>>>             <suspendOnFailure>
>>>>                 <errorCodes>-1</errorCodes>
>>>>                 <initialDuration>2000</initialDuration>
>>>>                 <progressionFactor>1.0</progressionFactor>
>>>>                 <maximumDuration>3000</maximumDuration>
>>>>             </suspendOnFailure>
>>>>             <timeout>
>>>>                 <duration>{$ctx:salesforce.timeout}</duration>
>>>>                 <responseAction>fault</responseAction>
>>>>             </timeout>
>>>>         </default>
>>>> </endpoint>
>>>> </call>
>>>>
>>>> Is there any other way to call endpoint template within call mediator
>>>> with blocking true?
>>>>
>>>>
>>>> [1]
>>>>
>>>> <template name="salesforceEndPoint" 
>>>> xmlns="http://ws.apache.org/ns/synapse";>
>>>>     <parameter name="initialDuration" description="Initial timeout 
>>>> duration of the API request."/>
>>>>     <parameter name="progressionFactor"
>>>>                description="Progress factor for timeout of the API 
>>>> request."/>
>>>>     <parameter name="maximumDuration"
>>>>                description="Maximum duration for timeout of the API 
>>>> request."/>
>>>>     <parameter name="timeout" description="Timeout duration of the API 
>>>> request."/>
>>>>     <parameter name="responseAction"
>>>>                description="It is used to specify the action to perform 
>>>> once an endpoint has timed out."/>
>>>>     <parameter name="errorCodes" description="It is used to specify one or 
>>>> more error codes."/>
>>>>     <endpoint name="salesforce_endpoint">
>>>>         <default format="soap11">
>>>>             <markForSuspension>
>>>>                 <errorCodes>-1</errorCodes>
>>>>             </markForSuspension>
>>>>             <suspendOnFailure>
>>>>                 <errorCodes>-1</errorCodes>
>>>>                 <initialDuration>2000</initialDuration>
>>>>                 <progressionFactor>1.0</progressionFactor>
>>>>                 <maximumDuration>3000</maximumDuration>
>>>>             </suspendOnFailure>
>>>>             <timeout>
>>>>                 <duration>{$ctx:salesforce.timeout}</duration>
>>>>                 <responseAction>fault</responseAction>
>>>>             </timeout>
>>>>         </default>
>>>>     </endpoint>
>>>> </template>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>>
>>>>
>>>> *Kalyani Yogeswaranathan*
>>>>
>>>> *Associate software engineer*
>>>> *WSO2 Inc.*
>>>>
>>>> *Mobile: 0776390284 <0776390284>*
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> Kathees
>>> Software Engineer,
>>> email: [email protected]
>>> mobile: +94772596173
>>>
>>
>>
>>
>> --
>>
>> 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.
>>
>
>
>
> --
> Kathees
> Software Engineer,
> email: [email protected]
> mobile: +94772596173
>



-- 

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.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to