Examples of LocatorService


Examples of org.apache.locator.LocatorService

    public void testLocatorService() throws Exception {
        URL wsdl = getClass().getResource("/wsdl/locator.wsdl");
        assertNotNull(wsdl);

        LocatorService_Service ss = new LocatorService_Service(wsdl, serviceName);
        LocatorService port = ss.getLocatorServicePort();
        updateAddressPort(port, PORT);
        W3CEndpointReferenceBuilder builder = new  W3CEndpointReferenceBuilder();
        W3CEndpointReference w3cEpr = builder.build();
        port.registerPeerManager(w3cEpr,
                                 new Holder<W3CEndpointReference>(),
                                 new Holder<java.lang.String>());

        port.deregisterPeerManager(new java.lang.String());

       
        port.registerEndpoint(null, w3cEpr);

       
        port.deregisterEndpoint(null, w3cEpr);

       
       
        port.lookupEndpoint(new javax.xml.namespace.QName("", ""));
           
        port.listEndpoints();

        port.queryEndpoints(new QueryEndpoints());

    }
View Full Code Here

Examples of org.apache.locator.LocatorService

    public void testLocatorService() throws Exception {
        URL wsdl = getClass().getResource("/wsdl/locator.wsdl");
        assertNotNull(wsdl);

        LocatorService_Service ss = new LocatorService_Service(wsdl, serviceName);
        LocatorService port = ss.getLocatorServicePort();
        updateAddressPort(port, PORT);
        W3CEndpointReferenceBuilder builder = new  W3CEndpointReferenceBuilder();
        W3CEndpointReference w3cEpr = builder.build();
        port.registerPeerManager(w3cEpr,
                                 new Holder<W3CEndpointReference>(),
                                 new Holder<java.lang.String>());

        port.deregisterPeerManager(new java.lang.String());

       
        port.registerEndpoint(null, w3cEpr);

       
        port.deregisterEndpoint(null, w3cEpr);

       
       
        port.lookupEndpoint(new javax.xml.namespace.QName("", ""));
           
        port.listEndpoints();

        port.queryEndpoints(new QueryEndpoints());

    }
View Full Code Here

Examples of org.apache.locator.LocatorService

    public void testLookupEndpointAndVerifyWsdlLocationAndNamespace() throws Exception {
        URL wsdl = getClass().getResource("/wsdl/locator.wsdl");
        assertNotNull(wsdl);

        LocatorService_Service ss = new LocatorService_Service(wsdl, serviceName);
        LocatorService port = ss.getLocatorServicePort();
        updateAddressPort(port, PORT);
       
        W3CEndpointReference epr = port.lookupEndpoint(new QName("http://service/1", "Number"));
        String eprString = epr.toString();
        assertTrue(eprString.contains("Metadata"));
        assertTrue(eprString.contains("wsdli:wsdlLocation=\"http://service/1 wsdlLoc\""));
    }
View Full Code Here

Examples of org.apache.locator.LocatorService

    public void testLookupEndpointAndVerifyWsdlLocationOnly() throws Exception {
        URL wsdl = getClass().getResource("/wsdl/locator.wsdl");
        assertNotNull(wsdl);

        LocatorService_Service ss = new LocatorService_Service(wsdl, serviceName);
        LocatorService port = ss.getLocatorServicePort();
        updateAddressPort(port, PORT);
       
        W3CEndpointReference epr = port.lookupEndpoint(new QName("http://service/2", "Number"));
        String eprString = epr.toString();
        assertTrue(eprString.contains("Metadata"));
        assertTrue(eprString.contains("wsdli:wsdlLocation=\"wsdlLoc\""));
    }
View Full Code Here

Examples of org.talend.services.esb.locator.rest.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

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

    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

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

        // 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

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

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
Copyright © 2018 www.massapi.com. 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.