WSO2 Developing Custom Endpoint

429 Views Asked by At

i need to extend the LoadBalance Endpoint developing my custom endpoint. I tried:

1)

 public class CustomLoadBalanceEndpoint extends LoadbalanceEndpoint

2) i exported it using wso2 studio in the /repository/components/dropins folder

3) i cannot find the way to use it inside ESB... I tried with this code

<endpoint class="it.innovapuglia.sistemapuglia.wso2.enpoint.CustomLoadBalanceEndpoint"
               algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin">
    <endpoint name="tomcat1">
           <address uri="http://localhost:8080/RestService/rest/servizio"/>
    </endpoint>
</endpoint>

but ESB doesn't accept it saying me "Proxy service requires a valid in sequence or a valid endpoint."

1

There are 1 best solutions below

6
On

You can not use your endpoint like that. After developing your custom endpoint keep that in the repository/components/lib folder.You have to call your endpoint like this;

<endpoint name="CustomEndpoint">
                    <class name="org.wso2.carbon.endpoint.CustomLoadBalanceEndpoint">

                    </class>
</endpoint>

Check the following posts on how to add your custom endpoint concepts.

[1]http://vvratha.blogspot.com/2012/07/class-endpoints-in-synapse.html [2]http://vvratha.blogspot.com/2013/06/class-endpointssample.html