ashok
ashok

Reputation: 1268

In wso2 esb how to read endpoint from a file

In wso2 esb what is the best practice for Endpoint maintenance. From some article I got to know that we can read from file So, if this the best approach how achieve this one.

Upvotes: 0

Views: 355

Answers (2)

prabushi samarakoon
prabushi samarakoon

Reputation: 549

In a scenario where the endpoint is saved as a file within the carbon registry (You can even upload the file via management console or can use WSO2 EI Tooling to create an endpoint template), we can read the content of the endpoint as follows.

  1. Add the endpoint registry resource. enter image description here

  2. Log the endpoint content using the following synapse configuration. (Can even retrieve specific attributes within the endpoint using their xpath expressions)

 <log level="custom">
    <property name="Endpoint Content:" expression="$ctx:endpointFile//*"/>
    <property name="Endpoint URL:" expression="$ctx:endpointFile//*[local-name() = 'address'][1]/@uri"/>
 </log>

You can see the logged endpoint content as below. enter image description here

Upvotes: 3

Maninda
Maninda

Reputation: 2216

There are 3 ways to Endpoint Maintenance.

  1. Using ESB Tooling
  2. From Command Line
  3. Using a Script

More details can be found in WSO2 Documentation.

Upvotes: 2

Related Questions