Manage ESB Endpoint configs dynamically

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

Manage ESB Endpoint configs dynamically

malakasilva
Hi All,

Currently we are using mainly call mediator in connectors. However currently endpoint settings are static and hardcoded with the connector.

Only way to change this is manually update the zip file. This is not the best solution.

We need to find a way to set this values from esb connector configuration. (In INIT method)

eg:
<salesforce.init>
    <username>[hidden email]</username>
    <password>xxxxx</password>

<!-- Optional Params -->
    <blocking>false</blocking>
<timeout>60000</timeout>
.....
</salesforce.init>

Suggestions are welcome to find the best way to do this?

(https://store.wso2.com/store/assets/esbconnector)

<endpoint name="Sample_First" statistics="enable" >
    <address uri="http://localhost/myendpoint" statistics="enable" trace="disable">
        <timeout>
            <duration>60000</duration>
        </timeout>
 
        <markForSuspension>
            <errorCodes>101504, 101505</errorCodes>
            <retriesBeforeSuspension>3</retriesBeforeSuspension>
            <retryDelay>1</retryDelay>
        </markForSuspension>
 
        <suspendOnFailure>
            <errorCodes>101500, 101501, 101506, 101507, 101508</errorCodes>
            <initialDuration>1000</initialDuration>
            <progressionFactor>2</progressionFactor>
            <maximumDuration>60000</maximumDuration>
        </suspendOnFailure>
 
    </address>
</endpoint>


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: Manage ESB Endpoint configs dynamically

Chanaka Fernando
Hi Malaka,

We can define endpoint templates within the connector definition and pass the parameters when calling those connector operations from within the synapse configuration as you have pointed out.

On Wed, Jan 27, 2016 at 9:57 AM, Malaka Silva <[hidden email]> wrote:
Hi All,

Currently we are using mainly call mediator in connectors. However currently endpoint settings are static and hardcoded with the connector.

Only way to change this is manually update the zip file. This is not the best solution.

We need to find a way to set this values from esb connector configuration. (In INIT method)

eg:
<salesforce.init>
    <username>[hidden email]</username>
    <password>xxxxx</password>

<!-- Optional Params -->
    <blocking>false</blocking>
<timeout>60000</timeout>
.....
</salesforce.init>

Suggestions are welcome to find the best way to do this?

(https://store.wso2.com/store/assets/esbconnector)

<endpoint name="Sample_First" statistics="enable" >
    <address uri="http://localhost/myendpoint" statistics="enable" trace="disable">
        <timeout>
            <duration>60000</duration>
        </timeout>
 
        <markForSuspension>
            <errorCodes>101504, 101505</errorCodes>
            <retriesBeforeSuspension>3</retriesBeforeSuspension>
            <retryDelay>1</retryDelay>
        </markForSuspension>
 
        <suspendOnFailure>
            <errorCodes>101500, 101501, 101506, 101507, 101508</errorCodes>
            <initialDuration>1000</initialDuration>
            <progressionFactor>2</progressionFactor>
            <maximumDuration>60000</maximumDuration>
        </suspendOnFailure>
 
    </address>
</endpoint>




--
Thank you and Best Regards,
Chanaka Fernando
Senior 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





_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: Manage ESB Endpoint configs dynamically

malakasilva
Hi Chanaka,

Yes I guess that is the best way and make those as optional parameters.

Maybe we can start to implement this with Salesforce connector.

@Kanapriya - Can you please follow this.

eg:- 
    <endpoint name="Salesforce_call1" template="salesforce endpoint_template">
	<parameter name="timeout" value="{ctx.salesforce.timeout}"/>
    </endpoint>
    <template name="salesforce_endpoint_template">
	    <parameter name="suspend_duration"/>
	    <endpoint name="SALESFORCE">
		<address uri="$uri">
		    <timeout>
                        <duration>$timeout</duration>
                    <timeout>
		</address>
	    </endpoint>
    </template>

On Wed, Jan 27, 2016 at 10:05 AM, Chanaka Fernando <[hidden email]> wrote:
Hi Malaka,

We can define endpoint templates within the connector definition and pass the parameters when calling those connector operations from within the synapse configuration as you have pointed out.

On Wed, Jan 27, 2016 at 9:57 AM, Malaka Silva <[hidden email]> wrote:
Hi All,

Currently we are using mainly call mediator in connectors. However currently endpoint settings are static and hardcoded with the connector.

Only way to change this is manually update the zip file. This is not the best solution.

We need to find a way to set this values from esb connector configuration. (In INIT method)

eg:
<salesforce.init>
    <username>[hidden email]</username>
    <password>xxxxx</password>

<!-- Optional Params -->
    <blocking>false</blocking>
<timeout>60000</timeout>
.....
</salesforce.init>

Suggestions are welcome to find the best way to do this?

(https://store.wso2.com/store/assets/esbconnector)

<endpoint name="Sample_First" statistics="enable" >
    <address uri="http://localhost/myendpoint" statistics="enable" trace="disable">
        <timeout>
            <duration>60000</duration>
        </timeout>
 
        <markForSuspension>
            <errorCodes>101504, 101505</errorCodes>
            <retriesBeforeSuspension>3</retriesBeforeSuspension>
            <retryDelay>1</retryDelay>
        </markForSuspension>
 
        <suspendOnFailure>
            <errorCodes>101500, 101501, 101506, 101507, 101508</errorCodes>
            <initialDuration>1000</initialDuration>
            <progressionFactor>2</progressionFactor>
            <maximumDuration>60000</maximumDuration>
        </suspendOnFailure>
 
    </address>
</endpoint>




--
Thank you and Best Regards,
Chanaka Fernando
Senior Technical Lead
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

mobile: <a href="tel:%2B94%20773337238" value="+94773337238" target="_blank">+94 773337238
Blog : http://soatutorials.blogspot.com
LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
Twitter:https://twitter.com/chanakaudaya







--

Best Regards,

Malaka Silva
Senior Tech 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.

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: Manage ESB Endpoint configs dynamically

Kanapriya
Noted Malaka

Kanapriya Kuleswararajan
Associate Software Engineer
Mobile : - 0774894438
Mail : - [hidden email]

On Wed, Jan 27, 2016 at 10:30 AM, Malaka Silva <[hidden email]> wrote:
Hi Chanaka,

Yes I guess that is the best way and make those as optional parameters.

Maybe we can start to implement this with Salesforce connector.

@Kanapriya - Can you please follow this.

eg:- 
    <endpoint name="Salesforce_call1" template="salesforce endpoint_template">
	<parameter name="timeout" value="{ctx.salesforce.timeout}"/>
    </endpoint>
    <template name="salesforce_endpoint_template">
	    <parameter name="suspend_duration"/>
	    <endpoint name="SALESFORCE">
		<address uri="$uri">
		    <timeout>
                        <duration>$timeout</duration>
                    <timeout>
		</address>
	    </endpoint>
    </template>

On Wed, Jan 27, 2016 at 10:05 AM, Chanaka Fernando <[hidden email]> wrote:
Hi Malaka,

We can define endpoint templates within the connector definition and pass the parameters when calling those connector operations from within the synapse configuration as you have pointed out.

On Wed, Jan 27, 2016 at 9:57 AM, Malaka Silva <[hidden email]> wrote:
Hi All,

Currently we are using mainly call mediator in connectors. However currently endpoint settings are static and hardcoded with the connector.

Only way to change this is manually update the zip file. This is not the best solution.

We need to find a way to set this values from esb connector configuration. (In INIT method)

eg:
<salesforce.init>
    <username>[hidden email]</username>
    <password>xxxxx</password>

<!-- Optional Params -->
    <blocking>false</blocking>
<timeout>60000</timeout>
.....
</salesforce.init>

Suggestions are welcome to find the best way to do this?

(https://store.wso2.com/store/assets/esbconnector)

<endpoint name="Sample_First" statistics="enable" >
    <address uri="http://localhost/myendpoint" statistics="enable" trace="disable">
        <timeout>
            <duration>60000</duration>
        </timeout>
 
        <markForSuspension>
            <errorCodes>101504, 101505</errorCodes>
            <retriesBeforeSuspension>3</retriesBeforeSuspension>
            <retryDelay>1</retryDelay>
        </markForSuspension>
 
        <suspendOnFailure>
            <errorCodes>101500, 101501, 101506, 101507, 101508</errorCodes>
            <initialDuration>1000</initialDuration>
            <progressionFactor>2</progressionFactor>
            <maximumDuration>60000</maximumDuration>
        </suspendOnFailure>
 
    </address>
</endpoint>




--
Thank you and Best Regards,
Chanaka Fernando
Senior Technical Lead
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

mobile: <a href="tel:%2B94%20773337238" value="+94773337238" target="_blank">+94 773337238
Blog : http://soatutorials.blogspot.com
LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
Twitter:https://twitter.com/chanakaudaya







--

Best Regards,

Malaka Silva
Senior Tech 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.


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: Manage ESB Endpoint configs dynamically

vivekananthan
Hi ,

I created the endpoint template as follow.

<?xml version="1.0" encoding="UTF-8"?>
<template name="salesforceEndPoint" xmlns="http://ws.apache.org/ns/synapse">
    <parameter name="initialDuration"/>
<parameter name="progressionFactor"/>
<parameter name="maximumDuration"/>
<parameter name="duration"/>
<parameter name="responseAction"/>
<endpoint name="$name">
<address uri="http://wso.com" format="soap11">
<suspendOnFailure>
<initialDuration>$initialDuration</initialDuration>
<progressionFactor>$progressionFactor</progressionFactor>
<maximumDuration>$maximumDuration</maximumDuration>
</suspendOnFailure>
<timeout>
<duration>$duration</duration>
<responseAction>$responseAction</responseAction>
</timeout>
</address>
</endpoint>
</template>
And I called the template in INIT method.
<call>
<endpoint name="ep1" template="salesforceEndPoint">
<parameter name="initialDuration" value="{ctx:salesforce.initialDuration}" />
<parameter name="progressionFactor" value="{ctx:salesforce.progressionFactor}" />
<parameter name="maximumDuration" value="{ctx:salesforce.maximumDuration}" />
<parameter name="duration" value="{ctx:salesforce.duration}" />
<parameter name="responseAction" value="{ctx:salesforce.responseAction}" />
</endpoint>
</call>
It shows the following Error.

WARN - TemplateEndpoint Template salesforceEndPoint cannot be found for the endpoint ep1
[2016-02-05 17:12:44,432]  INFO - LogMediator Connection = Login to Salesforce .....
[2016-02-05 17:12:44,434]  WARN - TemplateEndpoint Couldn't retrieve the endpoint template with the key:salesforceEndPoint
[2016-02-05 17:12:44,435]  INFO - LogMediator To: https://login.salesforce.com/services/Soap/u/27.0, WSAction: urn:partner.soap.sforce.com/Soap/loginRequest, SOAPAction: urn:partner.soap.sforce.com/Soap/loginRequest, MessageID: urn:uuid:d8efb9e0-7b89-4421-b95a-425458b19310, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 305100, ERROR_MESSAGE = Couldn't find the endpoint with the name ep1 & template : salesforceEndPoint, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com"><soapenv:Body><urn:login><urn:username>[hidden email]</urn:username><urn:password>vive@wso2RtKuSKM9w1ra8ahIuloG7FHBP</urn:password></urn:login></soapenv:Body></soapenv:Envelope>
[2016-02-05 17:12:44,436] DEBUG - wire << "HTTP/1.1 202 Accepted[\r][\n]"
I followed doc[1] and malaka's suggestion.


Can you help me to solve this issue?


Thank you
Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
M:+94752786138

On Wed, Jan 27, 2016 at 11:20 AM, Kanapriya Kuleswararajan <[hidden email]> wrote:
Noted Malaka

Kanapriya Kuleswararajan
Associate Software Engineer
Mobile : - 0774894438
Mail : - [hidden email]

On Wed, Jan 27, 2016 at 10:30 AM, Malaka Silva <[hidden email]> wrote:
Hi Chanaka,

Yes I guess that is the best way and make those as optional parameters.

Maybe we can start to implement this with Salesforce connector.

@Kanapriya - Can you please follow this.

eg:- 
    <endpoint name="Salesforce_call1" template="salesforce endpoint_template">
	<parameter name="timeout" value="{ctx.salesforce.timeout}"/>
    </endpoint>
    <template name="salesforce_endpoint_template">
	    <parameter name="suspend_duration"/>
	    <endpoint name="SALESFORCE">
		<address uri="$uri">
		    <timeout>
                        <duration>$timeout</duration>
                    <timeout>
		</address>
	    </endpoint>
    </template>

On Wed, Jan 27, 2016 at 10:05 AM, Chanaka Fernando <[hidden email]> wrote:
Hi Malaka,

We can define endpoint templates within the connector definition and pass the parameters when calling those connector operations from within the synapse configuration as you have pointed out.

On Wed, Jan 27, 2016 at 9:57 AM, Malaka Silva <[hidden email]> wrote:
Hi All,

Currently we are using mainly call mediator in connectors. However currently endpoint settings are static and hardcoded with the connector.

Only way to change this is manually update the zip file. This is not the best solution.

We need to find a way to set this values from esb connector configuration. (In INIT method)

eg:
<salesforce.init>
    <username>[hidden email]</username>
    <password>xxxxx</password>

<!-- Optional Params -->
    <blocking>false</blocking>
<timeout>60000</timeout>
.....
</salesforce.init>

Suggestions are welcome to find the best way to do this?

(https://store.wso2.com/store/assets/esbconnector)

<endpoint name="Sample_First" statistics="enable" >
    <address uri="http://localhost/myendpoint" statistics="enable" trace="disable">
        <timeout>
            <duration>60000</duration>
        </timeout>
 
        <markForSuspension>
            <errorCodes>101504, 101505</errorCodes>
            <retriesBeforeSuspension>3</retriesBeforeSuspension>
            <retryDelay>1</retryDelay>
        </markForSuspension>
 
        <suspendOnFailure>
            <errorCodes>101500, 101501, 101506, 101507, 101508</errorCodes>
            <initialDuration>1000</initialDuration>
            <progressionFactor>2</progressionFactor>
            <maximumDuration>60000</maximumDuration>
        </suspendOnFailure>
 
    </address>
</endpoint>




--
Thank you and Best Regards,
Chanaka Fernando
Senior Technical Lead
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

mobile: <a href="tel:%2B94%20773337238" value="+94773337238" target="_blank">+94 773337238
Blog : http://soatutorials.blogspot.com
LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
Twitter:https://twitter.com/chanakaudaya







--

Best Regards,

Malaka Silva
Senior Tech 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.


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture



_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: Manage ESB Endpoint configs dynamically

vivekananthan
Hi ,

I have created end point template manually and called it in connector, It is working fine. The problem occurred when I was creating the end point template within connector. 


Thank you
Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
M:+94752786138

On Fri, Feb 5, 2016 at 5:22 PM, Vivekananthan Sivanayagam <[hidden email]> wrote:
Hi ,

I created the endpoint template as follow.

<?xml version="1.0" encoding="UTF-8"?>
<template name="salesforceEndPoint" xmlns="http://ws.apache.org/ns/synapse">
    <parameter name="initialDuration"/>
<parameter name="progressionFactor"/>
<parameter name="maximumDuration"/>
<parameter name="duration"/>
<parameter name="responseAction"/>
<endpoint name="$name">
<address uri="http://wso.com" format="soap11">
<suspendOnFailure>
<initialDuration>$initialDuration</initialDuration>
<progressionFactor>$progressionFactor</progressionFactor>
<maximumDuration>$maximumDuration</maximumDuration>
</suspendOnFailure>
<timeout>
<duration>$duration</duration>
<responseAction>$responseAction</responseAction>
</timeout>
</address>
</endpoint>
</template>
And I called the template in INIT method.
<call>
<endpoint name="ep1" template="salesforceEndPoint">
<parameter name="initialDuration" value="{ctx:salesforce.initialDuration}" />
<parameter name="progressionFactor" value="{ctx:salesforce.progressionFactor}" />
<parameter name="maximumDuration" value="{ctx:salesforce.maximumDuration}" />
<parameter name="duration" value="{ctx:salesforce.duration}" />
<parameter name="responseAction" value="{ctx:salesforce.responseAction}" />
</endpoint>
</call>
It shows the following Error.

WARN - TemplateEndpoint Template salesforceEndPoint cannot be found for the endpoint ep1
[2016-02-05 17:12:44,432]  INFO - LogMediator Connection = Login to Salesforce .....
[2016-02-05 17:12:44,434]  WARN - TemplateEndpoint Couldn't retrieve the endpoint template with the key:salesforceEndPoint
[2016-02-05 17:12:44,435]  INFO - LogMediator To: https://login.salesforce.com/services/Soap/u/27.0, WSAction: urn:partner.soap.sforce.com/Soap/loginRequest, SOAPAction: urn:partner.soap.sforce.com/Soap/loginRequest, MessageID: urn:uuid:d8efb9e0-7b89-4421-b95a-425458b19310, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 305100, ERROR_MESSAGE = Couldn't find the endpoint with the name ep1 & template : salesforceEndPoint, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com"><soapenv:Body><urn:login><urn:username>[hidden email]</urn:username><urn:password>vive@wso2RtKuSKM9w1ra8ahIuloG7FHBP</urn:password></urn:login></soapenv:Body></soapenv:Envelope>
[2016-02-05 17:12:44,436] DEBUG - wire << "HTTP/1.1 202 Accepted[\r][\n]"
I followed doc[1] and malaka's suggestion.


Can you help me to solve this issue?


Thank you
Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
M:<a href="tel:%2B94752786138" value="+94752786138" target="_blank">+94752786138

On Wed, Jan 27, 2016 at 11:20 AM, Kanapriya Kuleswararajan <[hidden email]> wrote:
Noted Malaka

Kanapriya Kuleswararajan
Associate Software Engineer
Mobile : - 0774894438
Mail : - [hidden email]

On Wed, Jan 27, 2016 at 10:30 AM, Malaka Silva <[hidden email]> wrote:
Hi Chanaka,

Yes I guess that is the best way and make those as optional parameters.

Maybe we can start to implement this with Salesforce connector.

@Kanapriya - Can you please follow this.

eg:- 
    <endpoint name="Salesforce_call1" template="salesforce endpoint_template">
	<parameter name="timeout" value="{ctx.salesforce.timeout}"/>
    </endpoint>
    <template name="salesforce_endpoint_template">
	    <parameter name="suspend_duration"/>
	    <endpoint name="SALESFORCE">
		<address uri="$uri">
		    <timeout>
                        <duration>$timeout</duration>
                    <timeout>
		</address>
	    </endpoint>
    </template>

On Wed, Jan 27, 2016 at 10:05 AM, Chanaka Fernando <[hidden email]> wrote:
Hi Malaka,

We can define endpoint templates within the connector definition and pass the parameters when calling those connector operations from within the synapse configuration as you have pointed out.

On Wed, Jan 27, 2016 at 9:57 AM, Malaka Silva <[hidden email]> wrote:
Hi All,

Currently we are using mainly call mediator in connectors. However currently endpoint settings are static and hardcoded with the connector.

Only way to change this is manually update the zip file. This is not the best solution.

We need to find a way to set this values from esb connector configuration. (In INIT method)

eg:
<salesforce.init>
    <username>[hidden email]</username>
    <password>xxxxx</password>

<!-- Optional Params -->
    <blocking>false</blocking>
<timeout>60000</timeout>
.....
</salesforce.init>

Suggestions are welcome to find the best way to do this?

(https://store.wso2.com/store/assets/esbconnector)

<endpoint name="Sample_First" statistics="enable" >
    <address uri="http://localhost/myendpoint" statistics="enable" trace="disable">
        <timeout>
            <duration>60000</duration>
        </timeout>
 
        <markForSuspension>
            <errorCodes>101504, 101505</errorCodes>
            <retriesBeforeSuspension>3</retriesBeforeSuspension>
            <retryDelay>1</retryDelay>
        </markForSuspension>
 
        <suspendOnFailure>
            <errorCodes>101500, 101501, 101506, 101507, 101508</errorCodes>
            <initialDuration>1000</initialDuration>
            <progressionFactor>2</progressionFactor>
            <maximumDuration>60000</maximumDuration>
        </suspendOnFailure>
 
    </address>
</endpoint>




--
Thank you and Best Regards,
Chanaka Fernando
Senior Technical Lead
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

mobile: <a href="tel:%2B94%20773337238" value="+94773337238" target="_blank">+94 773337238
Blog : http://soatutorials.blogspot.com
LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
Twitter:https://twitter.com/chanakaudaya







--

Best Regards,

Malaka Silva
Senior Tech 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.


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: Manage ESB Endpoint configs dynamically

Gayan Gunarathne
Did we update the ESB Salesforce connector new version with this endpoint configs? Is that available in cartridge store?

Thanks,
Gayan

On Fri, Feb 5, 2016 at 5:48 PM, Vivekananthan Sivanayagam <[hidden email]> wrote:
Hi ,

I have created end point template manually and called it in connector, It is working fine. The problem occurred when I was creating the end point template within connector. 


Thank you
Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
M:<a href="tel:%2B94752786138" value="+94752786138" target="_blank">+94752786138

On Fri, Feb 5, 2016 at 5:22 PM, Vivekananthan Sivanayagam <[hidden email]> wrote:
Hi ,

I created the endpoint template as follow.

<?xml version="1.0" encoding="UTF-8"?>
<template name="salesforceEndPoint" xmlns="http://ws.apache.org/ns/synapse">
    <parameter name="initialDuration"/>
<parameter name="progressionFactor"/>
<parameter name="maximumDuration"/>
<parameter name="duration"/>
<parameter name="responseAction"/>
<endpoint name="$name">
<address uri="http://wso.com" format="soap11">
<suspendOnFailure>
<initialDuration>$initialDuration</initialDuration>
<progressionFactor>$progressionFactor</progressionFactor>
<maximumDuration>$maximumDuration</maximumDuration>
</suspendOnFailure>
<timeout>
<duration>$duration</duration>
<responseAction>$responseAction</responseAction>
</timeout>
</address>
</endpoint>
</template>
And I called the template in INIT method.
<call>
<endpoint name="ep1" template="salesforceEndPoint">
<parameter name="initialDuration" value="{ctx:salesforce.initialDuration}" />
<parameter name="progressionFactor" value="{ctx:salesforce.progressionFactor}" />
<parameter name="maximumDuration" value="{ctx:salesforce.maximumDuration}" />
<parameter name="duration" value="{ctx:salesforce.duration}" />
<parameter name="responseAction" value="{ctx:salesforce.responseAction}" />
</endpoint>
</call>
It shows the following Error.

WARN - TemplateEndpoint Template salesforceEndPoint cannot be found for the endpoint ep1
[2016-02-05 17:12:44,432]  INFO - LogMediator Connection = Login to Salesforce .....
[2016-02-05 17:12:44,434]  WARN - TemplateEndpoint Couldn't retrieve the endpoint template with the key:salesforceEndPoint
[2016-02-05 17:12:44,435]  INFO - LogMediator To: https://login.salesforce.com/services/Soap/u/27.0, WSAction: urn:partner.soap.sforce.com/Soap/loginRequest, SOAPAction: urn:partner.soap.sforce.com/Soap/loginRequest, MessageID: urn:uuid:d8efb9e0-7b89-4421-b95a-425458b19310, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 305100, ERROR_MESSAGE = Couldn't find the endpoint with the name ep1 & template : salesforceEndPoint, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com"><soapenv:Body><urn:login><urn:username>[hidden email]</urn:username><urn:password>vive@wso2RtKuSKM9w1ra8ahIuloG7FHBP</urn:password></urn:login></soapenv:Body></soapenv:Envelope>
[2016-02-05 17:12:44,436] DEBUG - wire << "HTTP/1.1 202 Accepted[\r][\n]"
I followed doc[1] and malaka's suggestion.


Can you help me to solve this issue?


Thank you
Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
M:<a href="tel:%2B94752786138" value="+94752786138" target="_blank">+94752786138

On Wed, Jan 27, 2016 at 11:20 AM, Kanapriya Kuleswararajan <[hidden email]> wrote:
Noted Malaka

Kanapriya Kuleswararajan
Associate Software Engineer
Mobile : - 0774894438
Mail : - [hidden email]

On Wed, Jan 27, 2016 at 10:30 AM, Malaka Silva <[hidden email]> wrote:
Hi Chanaka,

Yes I guess that is the best way and make those as optional parameters.

Maybe we can start to implement this with Salesforce connector.

@Kanapriya - Can you please follow this.

eg:- 
    <endpoint name="Salesforce_call1" template="salesforce endpoint_template">
	<parameter name="timeout" value="{ctx.salesforce.timeout}"/>
    </endpoint>
    <template name="salesforce_endpoint_template">
	    <parameter name="suspend_duration"/>
	    <endpoint name="SALESFORCE">
		<address uri="$uri">
		    <timeout>
                        <duration>$timeout</duration>
                    <timeout>
		</address>
	    </endpoint>
    </template>

On Wed, Jan 27, 2016 at 10:05 AM, Chanaka Fernando <[hidden email]> wrote:
Hi Malaka,

We can define endpoint templates within the connector definition and pass the parameters when calling those connector operations from within the synapse configuration as you have pointed out.

On Wed, Jan 27, 2016 at 9:57 AM, Malaka Silva <[hidden email]> wrote:
Hi All,

Currently we are using mainly call mediator in connectors. However currently endpoint settings are static and hardcoded with the connector.

Only way to change this is manually update the zip file. This is not the best solution.

We need to find a way to set this values from esb connector configuration. (In INIT method)

eg:
<salesforce.init>
    <username>[hidden email]</username>
    <password>xxxxx</password>

<!-- Optional Params -->
    <blocking>false</blocking>
<timeout>60000</timeout>
.....
</salesforce.init>

Suggestions are welcome to find the best way to do this?

(https://store.wso2.com/store/assets/esbconnector)

<endpoint name="Sample_First" statistics="enable" >
    <address uri="http://localhost/myendpoint" statistics="enable" trace="disable">
        <timeout>
            <duration>60000</duration>
        </timeout>
 
        <markForSuspension>
            <errorCodes>101504, 101505</errorCodes>
            <retriesBeforeSuspension>3</retriesBeforeSuspension>
            <retryDelay>1</retryDelay>
        </markForSuspension>
 
        <suspendOnFailure>
            <errorCodes>101500, 101501, 101506, 101507, 101508</errorCodes>
            <initialDuration>1000</initialDuration>
            <progressionFactor>2</progressionFactor>
            <maximumDuration>60000</maximumDuration>
        </suspendOnFailure>
 
    </address>
</endpoint>




--
Thank you and Best Regards,
Chanaka Fernando
Senior Technical Lead
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

mobile: <a href="tel:%2B94%20773337238" value="+94773337238" target="_blank">+94 773337238
Blog : http://soatutorials.blogspot.com
LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
Twitter:https://twitter.com/chanakaudaya







--

Best Regards,

Malaka Silva
Senior Tech 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.


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




--

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : [hidden email]  | mobile : <a href="tel:%2B94%20766819985" value="+94766819985" target="_blank">+94 775030545
 
 

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: Manage ESB Endpoint configs dynamically

malakasilva
Hi Gayan,

There are currently limitation from esb side to support this from connectors. So firstly this improvement needs to go to next esb version and will implement this afterwards.

Currently only option is to manually update the connector.

[1] [Dev] [PET] Couldn't retrieve the endpoint template

On Thu, Feb 25, 2016 at 2:21 PM, Gayan Gunarathne <[hidden email]> wrote:
Did we update the ESB Salesforce connector new version with this endpoint configs? Is that available in cartridge store?

Thanks,
Gayan

On Fri, Feb 5, 2016 at 5:48 PM, Vivekananthan Sivanayagam <[hidden email]> wrote:
Hi ,

I have created end point template manually and called it in connector, It is working fine. The problem occurred when I was creating the end point template within connector. 


Thank you
Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
M:<a href="tel:%2B94752786138" value="+94752786138" target="_blank">+94752786138

On Fri, Feb 5, 2016 at 5:22 PM, Vivekananthan Sivanayagam <[hidden email]> wrote:
Hi ,

I created the endpoint template as follow.

<?xml version="1.0" encoding="UTF-8"?>
<template name="salesforceEndPoint" xmlns="http://ws.apache.org/ns/synapse">
    <parameter name="initialDuration"/>
<parameter name="progressionFactor"/>
<parameter name="maximumDuration"/>
<parameter name="duration"/>
<parameter name="responseAction"/>
<endpoint name="$name">
<address uri="http://wso.com" format="soap11">
<suspendOnFailure>
<initialDuration>$initialDuration</initialDuration>
<progressionFactor>$progressionFactor</progressionFactor>
<maximumDuration>$maximumDuration</maximumDuration>
</suspendOnFailure>
<timeout>
<duration>$duration</duration>
<responseAction>$responseAction</responseAction>
</timeout>
</address>
</endpoint>
</template>
And I called the template in INIT method.
<call>
<endpoint name="ep1" template="salesforceEndPoint">
<parameter name="initialDuration" value="{ctx:salesforce.initialDuration}" />
<parameter name="progressionFactor" value="{ctx:salesforce.progressionFactor}" />
<parameter name="maximumDuration" value="{ctx:salesforce.maximumDuration}" />
<parameter name="duration" value="{ctx:salesforce.duration}" />
<parameter name="responseAction" value="{ctx:salesforce.responseAction}" />
</endpoint>
</call>
It shows the following Error.

WARN - TemplateEndpoint Template salesforceEndPoint cannot be found for the endpoint ep1
[2016-02-05 17:12:44,432]  INFO - LogMediator Connection = Login to Salesforce .....
[2016-02-05 17:12:44,434]  WARN - TemplateEndpoint Couldn't retrieve the endpoint template with the key:salesforceEndPoint
[2016-02-05 17:12:44,435]  INFO - LogMediator To: https://login.salesforce.com/services/Soap/u/27.0, WSAction: urn:partner.soap.sforce.com/Soap/loginRequest, SOAPAction: urn:partner.soap.sforce.com/Soap/loginRequest, MessageID: urn:uuid:d8efb9e0-7b89-4421-b95a-425458b19310, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 305100, ERROR_MESSAGE = Couldn't find the endpoint with the name ep1 & template : salesforceEndPoint, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com"><soapenv:Body><urn:login><urn:username>[hidden email]</urn:username><urn:password>vive@wso2RtKuSKM9w1ra8ahIuloG7FHBP</urn:password></urn:login></soapenv:Body></soapenv:Envelope>
[2016-02-05 17:12:44,436] DEBUG - wire << "HTTP/1.1 202 Accepted[\r][\n]"
I followed doc[1] and malaka's suggestion.


Can you help me to solve this issue?


Thank you
Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
M:<a href="tel:%2B94752786138" value="+94752786138" target="_blank">+94752786138

On Wed, Jan 27, 2016 at 11:20 AM, Kanapriya Kuleswararajan <[hidden email]> wrote:
Noted Malaka

Kanapriya Kuleswararajan
Associate Software Engineer
Mobile : - <a href="tel:0774894438" value="+94774894438" target="_blank">0774894438
Mail : - [hidden email]

On Wed, Jan 27, 2016 at 10:30 AM, Malaka Silva <[hidden email]> wrote:
Hi Chanaka,

Yes I guess that is the best way and make those as optional parameters.

Maybe we can start to implement this with Salesforce connector.

@Kanapriya - Can you please follow this.

eg:- 
    <endpoint name="Salesforce_call1" template="salesforce endpoint_template">
	<parameter name="timeout" value="{ctx.salesforce.timeout}"/>
    </endpoint>
    <template name="salesforce_endpoint_template">
	    <parameter name="suspend_duration"/>
	    <endpoint name="SALESFORCE">
		<address uri="$uri">
		    <timeout>
                        <duration>$timeout</duration>
                    <timeout>
		</address>
	    </endpoint>
    </template>

On Wed, Jan 27, 2016 at 10:05 AM, Chanaka Fernando <[hidden email]> wrote:
Hi Malaka,

We can define endpoint templates within the connector definition and pass the parameters when calling those connector operations from within the synapse configuration as you have pointed out.

On Wed, Jan 27, 2016 at 9:57 AM, Malaka Silva <[hidden email]> wrote:
Hi All,

Currently we are using mainly call mediator in connectors. However currently endpoint settings are static and hardcoded with the connector.

Only way to change this is manually update the zip file. This is not the best solution.

We need to find a way to set this values from esb connector configuration. (In INIT method)

eg:
<salesforce.init>
    <username>[hidden email]</username>
    <password>xxxxx</password>

<!-- Optional Params -->
    <blocking>false</blocking>
<timeout>60000</timeout>
.....
</salesforce.init>

Suggestions are welcome to find the best way to do this?

(https://store.wso2.com/store/assets/esbconnector)

<endpoint name="Sample_First" statistics="enable" >
    <address uri="http://localhost/myendpoint" statistics="enable" trace="disable">
        <timeout>
            <duration>60000</duration>
        </timeout>
 
        <markForSuspension>
            <errorCodes>101504, 101505</errorCodes>
            <retriesBeforeSuspension>3</retriesBeforeSuspension>
            <retryDelay>1</retryDelay>
        </markForSuspension>
 
        <suspendOnFailure>
            <errorCodes>101500, 101501, 101506, 101507, 101508</errorCodes>
            <initialDuration>1000</initialDuration>
            <progressionFactor>2</progressionFactor>
            <maximumDuration>60000</maximumDuration>
        </suspendOnFailure>
 
    </address>
</endpoint>




--
Thank you and Best Regards,
Chanaka Fernando
Senior Technical Lead
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

mobile: <a href="tel:%2B94%20773337238" value="+94773337238" target="_blank">+94 773337238
Blog : http://soatutorials.blogspot.com
LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
Twitter:https://twitter.com/chanakaudaya







--

Best Regards,

Malaka Silva
Senior Tech 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.


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




--

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : [hidden email]  | mobile : <a href="tel:%2B94%20766819985" value="+94766819985" target="_blank">+94 775030545
 
 

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




--

Best Regards,

Malaka Silva
Senior Tech 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.

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Fwd: Manage ESB Endpoint configs dynamically

malakasilva
Hi Kalyani,

Can we check this with ESB 5.0.0 beta. 

Ravi has already fixed this and we should be able to incorporate this to connectors.

We can  start with Salesforce connector. (Soap Connector)

---------- Forwarded message ----------
From: Malaka Silva <[hidden email]>
Date: Thu, Feb 25, 2016 at 8:27 PM
Subject: Re: [Architecture] Manage ESB Endpoint configs dynamically
To: architecture <[hidden email]>


Hi Gayan,

There are currently limitation from esb side to support this from connectors. So firstly this improvement needs to go to next esb version and will implement this afterwards.

Currently only option is to manually update the connector.

[1] [Dev] [PET] Couldn't retrieve the endpoint template

On Thu, Feb 25, 2016 at 2:21 PM, Gayan Gunarathne <[hidden email]> wrote:
Did we update the ESB Salesforce connector new version with this endpoint configs? Is that available in cartridge store?

Thanks,
Gayan

On Fri, Feb 5, 2016 at 5:48 PM, Vivekananthan Sivanayagam <[hidden email]> wrote:
Hi ,

I have created end point template manually and called it in connector, It is working fine. The problem occurred when I was creating the end point template within connector. 


Thank you
Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
M:<a href="tel:%2B94752786138" value="+94752786138" target="_blank">+94752786138

On Fri, Feb 5, 2016 at 5:22 PM, Vivekananthan Sivanayagam <[hidden email]> wrote:
Hi ,

I created the endpoint template as follow.

<?xml version="1.0" encoding="UTF-8"?>
<template name="salesforceEndPoint" xmlns="http://ws.apache.org/ns/synapse">
    <parameter name="initialDuration"/>
<parameter name="progressionFactor"/>
<parameter name="maximumDuration"/>
<parameter name="duration"/>
<parameter name="responseAction"/>
<endpoint name="$name">
<address uri="http://wso.com" format="soap11">
<suspendOnFailure>
<initialDuration>$initialDuration</initialDuration>
<progressionFactor>$progressionFactor</progressionFactor>
<maximumDuration>$maximumDuration</maximumDuration>
</suspendOnFailure>
<timeout>
<duration>$duration</duration>
<responseAction>$responseAction</responseAction>
</timeout>
</address>
</endpoint>
</template>
And I called the template in INIT method.
<call>
<endpoint name="ep1" template="salesforceEndPoint">
<parameter name="initialDuration" value="{ctx:salesforce.initialDuration}" />
<parameter name="progressionFactor" value="{ctx:salesforce.progressionFactor}" />
<parameter name="maximumDuration" value="{ctx:salesforce.maximumDuration}" />
<parameter name="duration" value="{ctx:salesforce.duration}" />
<parameter name="responseAction" value="{ctx:salesforce.responseAction}" />
</endpoint>
</call>
It shows the following Error.

WARN - TemplateEndpoint Template salesforceEndPoint cannot be found for the endpoint ep1
[2016-02-05 17:12:44,432]  INFO - LogMediator Connection = Login to Salesforce .....
[2016-02-05 17:12:44,434]  WARN - TemplateEndpoint Couldn't retrieve the endpoint template with the key:salesforceEndPoint
[2016-02-05 17:12:44,435]  INFO - LogMediator To: https://login.salesforce.com/services/Soap/u/27.0, WSAction: urn:partner.soap.sforce.com/Soap/loginRequest, SOAPAction: urn:partner.soap.sforce.com/Soap/loginRequest, MessageID: urn:uuid:d8efb9e0-7b89-4421-b95a-425458b19310, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 305100, ERROR_MESSAGE = Couldn't find the endpoint with the name ep1 & template : salesforceEndPoint, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com"><soapenv:Body><urn:login><urn:username>[hidden email]</urn:username><urn:password>vive@wso2RtKuSKM9w1ra8ahIuloG7FHBP</urn:password></urn:login></soapenv:Body></soapenv:Envelope>
[2016-02-05 17:12:44,436] DEBUG - wire << "HTTP/1.1 202 Accepted[\r][\n]"
I followed doc[1] and malaka's suggestion.


Can you help me to solve this issue?


Thank you
Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
M:<a href="tel:%2B94752786138" value="+94752786138" target="_blank">+94752786138

On Wed, Jan 27, 2016 at 11:20 AM, Kanapriya Kuleswararajan <[hidden email]> wrote:
Noted Malaka

Kanapriya Kuleswararajan
Associate Software Engineer
Mobile : - <a href="tel:0774894438" value="+94774894438" target="_blank">0774894438
Mail : - [hidden email]

On Wed, Jan 27, 2016 at 10:30 AM, Malaka Silva <[hidden email]> wrote:
Hi Chanaka,

Yes I guess that is the best way and make those as optional parameters.

Maybe we can start to implement this with Salesforce connector.

@Kanapriya - Can you please follow this.

eg:- 
    <endpoint name="Salesforce_call1" template="salesforce endpoint_template">
	<parameter name="timeout" value="{ctx.salesforce.timeout}"/>
    </endpoint>
    <template name="salesforce_endpoint_template">
	    <parameter name="suspend_duration"/>
	    <endpoint name="SALESFORCE">
		<address uri="$uri">
		    <timeout>
                        <duration>$timeout</duration>
                    <timeout>
		</address>
	    </endpoint>
    </template>

On Wed, Jan 27, 2016 at 10:05 AM, Chanaka Fernando <[hidden email]> wrote:
Hi Malaka,

We can define endpoint templates within the connector definition and pass the parameters when calling those connector operations from within the synapse configuration as you have pointed out.

On Wed, Jan 27, 2016 at 9:57 AM, Malaka Silva <[hidden email]> wrote:
Hi All,

Currently we are using mainly call mediator in connectors. However currently endpoint settings are static and hardcoded with the connector.

Only way to change this is manually update the zip file. This is not the best solution.

We need to find a way to set this values from esb connector configuration. (In INIT method)

eg:
<salesforce.init>
    <username>[hidden email]</username>
    <password>xxxxx</password>

<!-- Optional Params -->
    <blocking>false</blocking>
<timeout>60000</timeout>
.....
</salesforce.init>

Suggestions are welcome to find the best way to do this?

(https://store.wso2.com/store/assets/esbconnector)

<endpoint name="Sample_First" statistics="enable" >
    <address uri="http://localhost/myendpoint" statistics="enable" trace="disable">
        <timeout>
            <duration>60000</duration>
        </timeout>
 
        <markForSuspension>
            <errorCodes>101504, 101505</errorCodes>
            <retriesBeforeSuspension>3</retriesBeforeSuspension>
            <retryDelay>1</retryDelay>
        </markForSuspension>
 
        <suspendOnFailure>
            <errorCodes>101500, 101501, 101506, 101507, 101508</errorCodes>
            <initialDuration>1000</initialDuration>
            <progressionFactor>2</progressionFactor>
            <maximumDuration>60000</maximumDuration>
        </suspendOnFailure>
 
    </address>
</endpoint>




--
Thank you and Best Regards,
Chanaka Fernando
Senior Technical Lead
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

mobile: <a href="tel:%2B94%20773337238" value="+94773337238" target="_blank">+94 773337238
Blog : http://soatutorials.blogspot.com
LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
Twitter:https://twitter.com/chanakaudaya







--

Best Regards,

Malaka Silva
Senior Tech 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.


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




--

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : [hidden email]  | mobile : <a href="tel:%2B94%20766819985" value="+94766819985" target="_blank">+94 775030545
 
 

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




--

Best Regards,

Malaka Silva
Senior Tech 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,

Malaka Silva
Senior Tech 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.

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: Manage ESB Endpoint configs dynamically

kalyani
Noted Malaka. I'll start work on this.

On Tue, May 31, 2016 at 10:08 AM, Malaka Silva <[hidden email]> wrote:
Hi Kalyani,

Can we check this with ESB 5.0.0 beta. 

Ravi has already fixed this and we should be able to incorporate this to connectors.

We can  start with Salesforce connector. (Soap Connector)

---------- Forwarded message ----------
From: Malaka Silva <[hidden email]>
Date: Thu, Feb 25, 2016 at 8:27 PM
Subject: Re: [Architecture] Manage ESB Endpoint configs dynamically
To: architecture <[hidden email]>


Hi Gayan,

There are currently limitation from esb side to support this from connectors. So firstly this improvement needs to go to next esb version and will implement this afterwards.

Currently only option is to manually update the connector.

[1] [Dev] [PET] Couldn't retrieve the endpoint template

On Thu, Feb 25, 2016 at 2:21 PM, Gayan Gunarathne <[hidden email]> wrote:
Did we update the ESB Salesforce connector new version with this endpoint configs? Is that available in cartridge store?

Thanks,
Gayan

On Fri, Feb 5, 2016 at 5:48 PM, Vivekananthan Sivanayagam <[hidden email]> wrote:
Hi ,

I have created end point template manually and called it in connector, It is working fine. The problem occurred when I was creating the end point template within connector. 


Thank you
Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
M:<a href="tel:%2B94752786138" value="+94752786138" target="_blank">+94752786138

On Fri, Feb 5, 2016 at 5:22 PM, Vivekananthan Sivanayagam <[hidden email]> wrote:
Hi ,

I created the endpoint template as follow.

<?xml version="1.0" encoding="UTF-8"?>
<template name="salesforceEndPoint" xmlns="http://ws.apache.org/ns/synapse">
    <parameter name="initialDuration"/>
<parameter name="progressionFactor"/>
<parameter name="maximumDuration"/>
<parameter name="duration"/>
<parameter name="responseAction"/>
<endpoint name="$name">
<address uri="http://wso.com" format="soap11">
<suspendOnFailure>
<initialDuration>$initialDuration</initialDuration>
<progressionFactor>$progressionFactor</progressionFactor>
<maximumDuration>$maximumDuration</maximumDuration>
</suspendOnFailure>
<timeout>
<duration>$duration</duration>
<responseAction>$responseAction</responseAction>
</timeout>
</address>
</endpoint>
</template>
And I called the template in INIT method.
<call>
<endpoint name="ep1" template="salesforceEndPoint">
<parameter name="initialDuration" value="{ctx:salesforce.initialDuration}" />
<parameter name="progressionFactor" value="{ctx:salesforce.progressionFactor}" />
<parameter name="maximumDuration" value="{ctx:salesforce.maximumDuration}" />
<parameter name="duration" value="{ctx:salesforce.duration}" />
<parameter name="responseAction" value="{ctx:salesforce.responseAction}" />
</endpoint>
</call>
It shows the following Error.

WARN - TemplateEndpoint Template salesforceEndPoint cannot be found for the endpoint ep1
[2016-02-05 17:12:44,432]  INFO - LogMediator Connection = Login to Salesforce .....
[2016-02-05 17:12:44,434]  WARN - TemplateEndpoint Couldn't retrieve the endpoint template with the key:salesforceEndPoint
[2016-02-05 17:12:44,435]  INFO - LogMediator To: https://login.salesforce.com/services/Soap/u/27.0, WSAction: urn:partner.soap.sforce.com/Soap/loginRequest, SOAPAction: urn:partner.soap.sforce.com/Soap/loginRequest, MessageID: urn:uuid:d8efb9e0-7b89-4421-b95a-425458b19310, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 305100, ERROR_MESSAGE = Couldn't find the endpoint with the name ep1 & template : salesforceEndPoint, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com"><soapenv:Body><urn:login><urn:username>[hidden email]</urn:username><urn:password>vive@wso2RtKuSKM9w1ra8ahIuloG7FHBP</urn:password></urn:login></soapenv:Body></soapenv:Envelope>
[2016-02-05 17:12:44,436] DEBUG - wire << "HTTP/1.1 202 Accepted[\r][\n]"
I followed doc[1] and malaka's suggestion.


Can you help me to solve this issue?


Thank you
Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
M:<a href="tel:%2B94752786138" value="+94752786138" target="_blank">+94752786138

On Wed, Jan 27, 2016 at 11:20 AM, Kanapriya Kuleswararajan <[hidden email]> wrote:
Noted Malaka

Kanapriya Kuleswararajan
Associate Software Engineer
Mobile : - <a href="tel:0774894438" value="+94774894438" target="_blank">0774894438
Mail : - [hidden email]

On Wed, Jan 27, 2016 at 10:30 AM, Malaka Silva <[hidden email]> wrote:
Hi Chanaka,

Yes I guess that is the best way and make those as optional parameters.

Maybe we can start to implement this with Salesforce connector.

@Kanapriya - Can you please follow this.

eg:- 
    <endpoint name="Salesforce_call1" template="salesforce endpoint_template">
	<parameter name="timeout" value="{ctx.salesforce.timeout}"/>
    </endpoint>
    <template name="salesforce_endpoint_template">
	    <parameter name="suspend_duration"/>
	    <endpoint name="SALESFORCE">
		<address uri="$uri">
		    <timeout>
                        <duration>$timeout</duration>
                    <timeout>
		</address>
	    </endpoint>
    </template>

On Wed, Jan 27, 2016 at 10:05 AM, Chanaka Fernando <[hidden email]> wrote:
Hi Malaka,

We can define endpoint templates within the connector definition and pass the parameters when calling those connector operations from within the synapse configuration as you have pointed out.

On Wed, Jan 27, 2016 at 9:57 AM, Malaka Silva <[hidden email]> wrote:
Hi All,

Currently we are using mainly call mediator in connectors. However currently endpoint settings are static and hardcoded with the connector.

Only way to change this is manually update the zip file. This is not the best solution.

We need to find a way to set this values from esb connector configuration. (In INIT method)

eg:
<salesforce.init>
    <username>[hidden email]</username>
    <password>xxxxx</password>

<!-- Optional Params -->
    <blocking>false</blocking>
<timeout>60000</timeout>
.....
</salesforce.init>

Suggestions are welcome to find the best way to do this?

(https://store.wso2.com/store/assets/esbconnector)

<endpoint name="Sample_First" statistics="enable" >
    <address uri="http://localhost/myendpoint" statistics="enable" trace="disable">
        <timeout>
            <duration>60000</duration>
        </timeout>
 
        <markForSuspension>
            <errorCodes>101504, 101505</errorCodes>
            <retriesBeforeSuspension>3</retriesBeforeSuspension>
            <retryDelay>1</retryDelay>
        </markForSuspension>
 
        <suspendOnFailure>
            <errorCodes>101500, 101501, 101506, 101507, 101508</errorCodes>
            <initialDuration>1000</initialDuration>
            <progressionFactor>2</progressionFactor>
            <maximumDuration>60000</maximumDuration>
        </suspendOnFailure>
 
    </address>
</endpoint>




--
Thank you and Best Regards,
Chanaka Fernando
Senior Technical Lead
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

mobile: <a href="tel:%2B94%20773337238" value="+94773337238" target="_blank">+94 773337238
Blog : http://soatutorials.blogspot.com
LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
Twitter:https://twitter.com/chanakaudaya







--

Best Regards,

Malaka Silva
Senior Tech 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.


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




--

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : [hidden email]  | mobile : <a href="tel:%2B94%20766819985" value="+94766819985" target="_blank">+94 775030545
 
 

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




--

Best Regards,

Malaka Silva
Senior Tech 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,

Malaka Silva
Senior Tech 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

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: Manage ESB Endpoint configs dynamically

malakasilva


On Tue, May 31, 2016 at 10:11 AM, Kalyani Yogeswaranathan <[hidden email]> wrote:
Noted Malaka. I'll start work on this.

On Tue, May 31, 2016 at 10:08 AM, Malaka Silva <[hidden email]> wrote:
Hi Kalyani,

Can we check this with ESB 5.0.0 beta. 

Ravi has already fixed this and we should be able to incorporate this to connectors.
​Sorry should be Kevin not Ravi​
 

We can  start with Salesforce connector. (Soap Connector)

---------- Forwarded message ----------
From: Malaka Silva <[hidden email]>
Date: Thu, Feb 25, 2016 at 8:27 PM
Subject: Re: [Architecture] Manage ESB Endpoint configs dynamically
To: architecture <[hidden email]>


Hi Gayan,

There are currently limitation from esb side to support this from connectors. So firstly this improvement needs to go to next esb version and will implement this afterwards.

Currently only option is to manually update the connector.

[1] [Dev] [PET] Couldn't retrieve the endpoint template

On Thu, Feb 25, 2016 at 2:21 PM, Gayan Gunarathne <[hidden email]> wrote:
Did we update the ESB Salesforce connector new version with this endpoint configs? Is that available in cartridge store?

Thanks,
Gayan

On Fri, Feb 5, 2016 at 5:48 PM, Vivekananthan Sivanayagam <[hidden email]> wrote:
Hi ,

I have created end point template manually and called it in connector, It is working fine. The problem occurred when I was creating the end point template within connector. 


Thank you
Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
M:<a href="tel:%2B94752786138" value="+94752786138" target="_blank">+94752786138

On Fri, Feb 5, 2016 at 5:22 PM, Vivekananthan Sivanayagam <[hidden email]> wrote:
Hi ,

I created the endpoint template as follow.

<?xml version="1.0" encoding="UTF-8"?>
<template name="salesforceEndPoint" xmlns="http://ws.apache.org/ns/synapse">
    <parameter name="initialDuration"/>
<parameter name="progressionFactor"/>
<parameter name="maximumDuration"/>
<parameter name="duration"/>
<parameter name="responseAction"/>
<endpoint name="$name">
<address uri="http://wso.com" format="soap11">
<suspendOnFailure>
<initialDuration>$initialDuration</initialDuration>
<progressionFactor>$progressionFactor</progressionFactor>
<maximumDuration>$maximumDuration</maximumDuration>
</suspendOnFailure>
<timeout>
<duration>$duration</duration>
<responseAction>$responseAction</responseAction>
</timeout>
</address>
</endpoint>
</template>
And I called the template in INIT method.
<call>
<endpoint name="ep1" template="salesforceEndPoint">
<parameter name="initialDuration" value="{ctx:salesforce.initialDuration}" />
<parameter name="progressionFactor" value="{ctx:salesforce.progressionFactor}" />
<parameter name="maximumDuration" value="{ctx:salesforce.maximumDuration}" />
<parameter name="duration" value="{ctx:salesforce.duration}" />
<parameter name="responseAction" value="{ctx:salesforce.responseAction}" />
</endpoint>
</call>
It shows the following Error.

WARN - TemplateEndpoint Template salesforceEndPoint cannot be found for the endpoint ep1
[2016-02-05 17:12:44,432]  INFO - LogMediator Connection = Login to Salesforce .....
[2016-02-05 17:12:44,434]  WARN - TemplateEndpoint Couldn't retrieve the endpoint template with the key:salesforceEndPoint
[2016-02-05 17:12:44,435]  INFO - LogMediator To: https://login.salesforce.com/services/Soap/u/27.0, WSAction: urn:partner.soap.sforce.com/Soap/loginRequest, SOAPAction: urn:partner.soap.sforce.com/Soap/loginRequest, MessageID: urn:uuid:d8efb9e0-7b89-4421-b95a-425458b19310, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 305100, ERROR_MESSAGE = Couldn't find the endpoint with the name ep1 & template : salesforceEndPoint, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com"><soapenv:Body><urn:login><urn:username>[hidden email]</urn:username><urn:password>vive@wso2RtKuSKM9w1ra8ahIuloG7FHBP</urn:password></urn:login></soapenv:Body></soapenv:Envelope>
[2016-02-05 17:12:44,436] DEBUG - wire << "HTTP/1.1 202 Accepted[\r][\n]"
I followed doc[1] and malaka's suggestion.


Can you help me to solve this issue?


Thank you
Vivekananthan Sivanayagam
Associate Software Engineer | WSO2
M:<a href="tel:%2B94752786138" value="+94752786138" target="_blank">+94752786138

On Wed, Jan 27, 2016 at 11:20 AM, Kanapriya Kuleswararajan <[hidden email]> wrote:
Noted Malaka

Kanapriya Kuleswararajan
Associate Software Engineer
Mobile : - <a href="tel:0774894438" value="+94774894438" target="_blank">0774894438
Mail : - [hidden email]

On Wed, Jan 27, 2016 at 10:30 AM, Malaka Silva <[hidden email]> wrote:
Hi Chanaka,

Yes I guess that is the best way and make those as optional parameters.

Maybe we can start to implement this with Salesforce connector.

@Kanapriya - Can you please follow this.

eg:- 
    <endpoint name="Salesforce_call1" template="salesforce endpoint_template">
	<parameter name="timeout" value="{ctx.salesforce.timeout}"/>
    </endpoint>
    <template name="salesforce_endpoint_template">
	    <parameter name="suspend_duration"/>
	    <endpoint name="SALESFORCE">
		<address uri="$uri">
		    <timeout>
                        <duration>$timeout</duration>
                    <timeout>
		</address>
	    </endpoint>
    </template>

On Wed, Jan 27, 2016 at 10:05 AM, Chanaka Fernando <[hidden email]> wrote:
Hi Malaka,

We can define endpoint templates within the connector definition and pass the parameters when calling those connector operations from within the synapse configuration as you have pointed out.

On Wed, Jan 27, 2016 at 9:57 AM, Malaka Silva <[hidden email]> wrote:
Hi All,

Currently we are using mainly call mediator in connectors. However currently endpoint settings are static and hardcoded with the connector.

Only way to change this is manually update the zip file. This is not the best solution.

We need to find a way to set this values from esb connector configuration. (In INIT method)

eg:
<salesforce.init>
    <username>[hidden email]</username>
    <password>xxxxx</password>

<!-- Optional Params -->
    <blocking>false</blocking>
<timeout>60000</timeout>
.....
</salesforce.init>

Suggestions are welcome to find the best way to do this?

(https://store.wso2.com/store/assets/esbconnector)

<endpoint name="Sample_First" statistics="enable" >
    <address uri="http://localhost/myendpoint" statistics="enable" trace="disable">