[PET] Getting error when calling the endpoint template within call mediator blocking true

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[PET] Getting error when calling the endpoint template within call mediator blocking true

kalyani
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

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [PET] Getting error when calling the endpoint template within call mediator blocking true

kathees@wso2.com
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 <[hidden email]> 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

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Kathees
Software Engineer,
mobile: +94772596173

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [PET] Getting error when calling the endpoint template within call mediator blocking true

malakasilva
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 <[hidden email]> 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 <[hidden email]> 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: <a href="tel:0776390284" value="+94776390284" target="_blank">0776390284

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Kathees
Software Engineer,
mobile: <a href="tel:%2B94772596173" value="+94772596173" target="_blank">+94772596173



--

Best Regards,

Malaka Silva
Senior Technical Lead
M: +94 777 219 791
Fax :94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
http://www.wso2.com/

Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [PET] Getting error when calling the endpoint template within call mediator blocking true

kathees@wso2.com
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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: <a href="tel:0776390284" value="+94776390284" target="_blank">0776390284

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Kathees
Software Engineer,
mobile: <a href="tel:%2B94772596173" value="+94772596173" target="_blank">+94772596173



--

Best Regards,

Malaka Silva
Senior Technical Lead
M: <a href="tel:%2B94%20777%20219%20791" value="+94777219791" target="_blank">+94 777 219 791
Fax :94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
http://www.wso2.com/

Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.



--
Kathees
Software Engineer,
mobile: +94772596173

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [PET] Getting error when calling the endpoint template within call mediator blocking true

kalyani
Hi Kathees,

I will test it and update soon.

On Sun, Jun 19, 2016 at 3:33 PM, Kathees Rajendram <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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: <a href="tel:0776390284" value="+94776390284" target="_blank">0776390284

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Kathees
Software Engineer,
mobile: <a href="tel:%2B94772596173" value="+94772596173" target="_blank">+94772596173



--

Best Regards,

Malaka Silva
Senior Technical Lead
M: <a href="tel:%2B94%20777%20219%20791" value="+94777219791" target="_blank">+94 777 219 791
Fax :94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
http://www.wso2.com/

Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.



--
Kathees
Software Engineer,
mobile: <a href="tel:%2B94772596173" value="+94772596173" target="_blank">+94772596173



--
Best Regards,

Kalyani Yogeswaranathan
Associate software engineer
WSO2 Inc.

Mobile: 0776390284

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [PET] Getting error when calling the endpoint template within call mediator blocking true

malakasilva
In reply to this post by kathees@wso2.com
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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: <a href="tel:0776390284" value="+94776390284" target="_blank">0776390284

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Kathees
Software Engineer,
mobile: <a href="tel:%2B94772596173" value="+94772596173" target="_blank">+94772596173



--

Best Regards,

Malaka Silva
Senior Technical Lead
M: <a href="tel:%2B94%20777%20219%20791" value="+94777219791" target="_blank">+94 777 219 791
Fax :<a href="tel:94%2011%C2%A02145300" value="+94112145300" target="_blank">94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
http://www.wso2.com/

Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.



--
Kathees
Software Engineer,
mobile: <a href="tel:%2B94772596173" value="+94772596173" target="_blank">+94772596173



--

Best Regards,

Malaka Silva
Senior Technical Lead
M: +94 777 219 791
Fax :94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
http://www.wso2.com/

Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [PET] Getting error when calling the endpoint template within call mediator blocking true

kalyani
Hi Kathees,

I have tested salesforce connector with the provided patch. Its working fine for calling the endpoint template within call mediator blocking true.

Thanks

On Mon, Jun 20, 2016 at 8:41 AM, Malaka Silva <[hidden email]> wrote:
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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: <a href="tel:0776390284" value="+94776390284" target="_blank">0776390284

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Kathees
Software Engineer,
mobile: <a href="tel:%2B94772596173" value="+94772596173" target="_blank">+94772596173



--

Best Regards,

Malaka Silva
Senior Technical Lead
M: <a href="tel:%2B94%20777%20219%20791" value="+94777219791" target="_blank">+94 777 219 791
Fax :<a href="tel:94%2011%C2%A02145300" value="+94112145300" target="_blank">94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
http://www.wso2.com/

Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.



--
Kathees
Software Engineer,
mobile: <a href="tel:%2B94772596173" value="+94772596173" target="_blank">+94772596173



--

Best Regards,

Malaka Silva
Senior Technical Lead
M: <a href="tel:%2B94%20777%20219%20791" value="+94777219791" target="_blank">+94 777 219 791
Fax :94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
http://www.wso2.com/

Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.



--
Best Regards,

Kalyani Yogeswaranathan
Associate software engineer
WSO2 Inc.

Mobile: 0776390284

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [PET] Getting error when calling the endpoint template within call mediator blocking true

kathees@wso2.com
Hi Malaka,

The TemplatEndpoint fix should be with isLeafEndpoint checking. Since this was blocker, I gave quick fix. Will arrange the code review with IsuruU tomorrow.

Thanks,
Kathees

On Mon, Jun 20, 2016 at 10:58 AM, Kalyani Yogeswaranathan <[hidden email]> wrote:
Hi Kathees,

I have tested salesforce connector with the provided patch. Its working fine for calling the endpoint template within call mediator blocking true.

Thanks

On Mon, Jun 20, 2016 at 8:41 AM, Malaka Silva <[hidden email]> wrote:
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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: <a href="tel:0776390284" value="+94776390284" target="_blank">0776390284

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Kathees
Software Engineer,
mobile: <a href="tel:%2B94772596173" value="+94772596173" target="_blank">+94772596173



--

Best Regards,

Malaka Silva
Senior Technical Lead
M: <a href="tel:%2B94%20777%20219%20791" value="+94777219791" target="_blank">+94 777 219 791
Fax :<a href="tel:94%2011%C2%A02145300" value="+94112145300" target="_blank">94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
http://www.wso2.com/

Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.



--
Kathees
Software Engineer,
mobile: <a href="tel:%2B94772596173" value="+94772596173" target="_blank">+94772596173



--

Best Regards,

Malaka Silva
Senior Technical Lead
M: <a href="tel:%2B94%20777%20219%20791" value="+94777219791" target="_blank">+94 777 219 791
Fax :94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
http://www.wso2.com/

Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.



--
Best Regards,

Kalyani Yogeswaranathan
Associate software engineer
WSO2 Inc.

Mobile: 0776390284



--
Kathees
Software Engineer,
mobile: +94772596173

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [PET] Getting error when calling the endpoint template within call mediator blocking true

malakasilva
+1

On Mon, Jun 20, 2016 at 11:13 AM, Kathees Rajendram <[hidden email]> wrote:
Hi Malaka,

The TemplatEndpoint fix should be with isLeafEndpoint checking. Since this was blocker, I gave quick fix. Will arrange the code review with IsuruU tomorrow.

Thanks,
Kathees

On Mon, Jun 20, 2016 at 10:58 AM, Kalyani Yogeswaranathan <[hidden email]> wrote:
Hi Kathees,

I have tested salesforce connector with the provided patch. Its working fine for calling the endpoint template within call mediator blocking true.

Thanks

On Mon, Jun 20, 2016 at 8:41 AM, Malaka Silva <[hidden email]> wrote:
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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: <a href="tel:0776390284" value="+94776390284" target="_blank">0776390284

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Kathees
Software Engineer,
mobile: <a href="tel:%2B94772596173" value="+94772596173" target="_blank">+94772596173



--

Best Regards,

Malaka Silva
Senior Technical Lead
M: <a href="tel:%2B94%20777%20219%20791" value="+94777219791" target="_blank">+94 777 219 791
Fax :<a href="tel:94%2011%C2%A02145300" value="+94112145300" target="_blank">94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
http://www.wso2.com/

Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.



--
Kathees
Software Engineer,
mobile: <a href="tel:%2B94772596173" value="+94772596173" target="_blank">+94772596173



--

Best Regards,

Malaka Silva
Senior Technical Lead
M: <a href="tel:%2B94%20777%20219%20791" value="+94777219791" target="_blank">+94 777 219 791
Fax :<a href="tel:94%2011%C2%A02145300" value="+94112145300" target="_blank">94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
http://www.wso2.com/

Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.



--
Best Regards,

Kalyani Yogeswaranathan
Associate software engineer
WSO2 Inc.

Mobile: <a href="tel:0776390284" value="+94776390284" target="_blank">0776390284



--
Kathees
Software Engineer,
mobile: <a href="tel:%2B94772596173" value="+94772596173" target="_blank">+94772596173



--

Best Regards,

Malaka Silva
Senior Technical Lead
M: +94 777 219 791
Fax :94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
http://www.wso2.com/

Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev