Package org.talend.services.esb.locator.v1

Examples of org.talend.services.esb.locator.v1.LocatorService


public final class RESTClient {
 
  private RESTClient() throws IOException {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] { "META-INF/spring/beans.xml" });
    LocatorService client = (LocatorService) context.getBean("restClient");
    try {
      System.out.println("************************ Register 3 endpoints ****************************");
      registerExample(client, "{http://service.locator.esb.talend.org}LocatorRestServiceImpl", "http://services.talend.org/TestEndpoint1");
      registerExample(client, "{http://service.locator.esb.talend.org}LocatorRestServiceImpl", "http://services.talend.org/TestEndpoint2");
      registerExample(client, "{http://service.locator.esb.talend.org}LocatorRestServiceImpl", "http://services.talend.org/TestEndpoint3");
View Full Code Here


            throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
        } catch (InterruptedException e) {
            InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
            interruptionFaultDetail.setInterruptionDetail(serviceName
                    .toString() + "throws InterruptionFault");
            throw new InterruptedExceptionFault(e.getMessage(),
                    interruptionFaultDetail);
        }
    }
View Full Code Here

            throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
        } catch (InterruptedException e) {
            InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
            interruptionFaultDetail.setInterruptionDetail(serviceName
                    .toString() + "throws InterruptionFault");
            throw new InterruptedExceptionFault(e.getMessage(),
                    interruptionFaultDetail);
        }
    }
View Full Code Here

            throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
        } catch (InterruptedException e) {
            InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
            interruptionFaultDetail
                    .setInterruptionDetail(serviceName.toString() + "throws InterruptionFault");
            throw new InterruptedExceptionFault(e.getMessage(), interruptionFaultDetail);
        }
    }
View Full Code Here

            throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
        } catch (InterruptedException e) {
            InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
            interruptionFaultDetail.setInterruptionDetail(serviceName
                    .toString() + "throws InterruptionFault");
            throw new InterruptedExceptionFault(e.getMessage(),
                    interruptionFaultDetail);
        }
        if (names != null && !names.isEmpty()) {
            names = getRotatedList(names);
            adress = names.get(0);
View Full Code Here

            throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
        } catch (InterruptedException e) {
            InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
            interruptionFaultDetail.setInterruptionDetail(serviceName
                    .toString() + "throws InterruptionFault");
            throw new InterruptedExceptionFault(e.getMessage(),
                    interruptionFaultDetail);
        }
        if (names != null && !names.isEmpty()) {
            for (int i = 0; i < names.size(); i++) {
                adress = names.get(i);
View Full Code Here

            throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
        } catch (InterruptedException e) {
            InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
            interruptionFaultDetail.setInterruptionDetail(serviceName
                    .toString() + "throws InterruptionFault");
            throw new InterruptedExceptionFault(e.getMessage(),
                    interruptionFaultDetail);
        }
        if (endpoint != null) {
            SLProperties properties = endpoint.getProperties();
            if (properties != null && !properties.getPropertyNames().isEmpty()) {
View Full Code Here

    public void contextDestroyed(ServletContextEvent event) {
        // Output a simple message to the server's console
        System.out.println("The Simple Web App. Has Been Removed");
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
                "/client.xml");
        LocatorService client = (LocatorService) context
                .getBean("locatorService");

        String serviceHost = this.context.getInitParameter("serviceHost");

        try {
            client.unregisterEndpoint(new QName("http://talend.org/esb/examples/", "GreeterService"), serviceHost);
        } catch (InterruptedExceptionFault e) {
            e.printStackTrace();
        } catch (ServiceLocatorFault e) {
            e.printStackTrace();
        }
View Full Code Here

        // Output a simple message to the server's console
        System.out.println("The Simple Web App. Is Ready");

        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
                "/client.xml");
        LocatorService client = (LocatorService) context
                .getBean("locatorService");

        String serviceHost = this.context.getInitParameter("serviceHost");

        try {
            client.registerEndpoint(new QName(
                    "http://talend.org/esb/examples/", "GreeterService"),
                    serviceHost, BindingType.SOAP_11, TransportType.HTTP, null);
        } catch (InterruptedExceptionFault e) {
            e.printStackTrace();
        } catch (ServiceLocatorFault e) {
View Full Code Here

public class Client {

    public static void main(String[] args) throws Exception {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("/META-INF/client.xml");
        LocatorService client = (LocatorService) context.getBean("locatorService");

        LookupRequestType request = new LookupRequestType();
        request.setServiceName(new QName("http://talend.org/esb/examples/",
                "GreeterService"));

        LookupEndpointResponse response = client.lookupEndpoint(request);
        W3CEndpointReference endpointReference = response
                .getEndpointReference();
        System.out.println(endpointReference.toString());

        javax.xml.ws.Service jaxwsServiceObject = Service.create(new QName(
View Full Code Here

TOP

Related Classes of org.talend.services.esb.locator.v1.LocatorService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.