Package javax.xml.ws

Examples of javax.xml.ws.Endpoint


    }
   
   
    @Test
    public void testGetBinding() throws Exception {
        Endpoint ep = Endpoint.create("http://schemas.xmlsoap.org/wsdl/soap/http", new HelloImpl());
        System.out.println(ep.getBinding().getClass());
    }
View Full Code Here


        new QName("http://apache.org/hello_world/services",
                  "SoapPort");

    @Test
    public void testWSDLPublishWithCatalogs() throws Exception {
        Endpoint ep = Endpoint.publish(null, new GreeterImpl());
        try {
            URL url = new URL("http://localhost:9000/SoapContext/SoapPort?"
                              + "xsd=testutils/hello_world_schema2.xsd");
            assertNotNull(url.getContent());
           
           
            url = new URL("http://localhost:9000/SoapContext/SoapPort"
                          + "?xsd=testutils/hello_world_schema.xsd");
            String result = IOUtils.toString((InputStream)url.getContent());
            assertTrue(result.contains("xsd=testutils/hello_world_schema2.xsd"));

            url = new URL("http://localhost:9000/SoapContext/SoapPort"
                          + "?wsdl=testutils/hello_world_messages_catalog.wsdl");
            result = IOUtils.toString((InputStream)url.getContent());
            assertTrue(result.contains("xsd=testutils/hello_world_schema.xsd"));

        } finally {
            ep.stop();
        }
    }
View Full Code Here

    }

    @Override
    public Endpoint createEndpoint(String bindingId, Object implementor) {

        Endpoint ep = null;
        if (EndpointUtils.isValidImplementor(implementor)) {
            Bus bus = BusFactory.getThreadDefaultBus();
            ep = new EndpointImpl(bus, implementor, bindingId);
            return ep;
        } else {
View Full Code Here

        }
    }

    @Override
    public Endpoint createAndPublishEndpoint(String url, Object implementor) {
        Endpoint ep = createEndpoint(null, implementor);
        ep.publish(url);
        return ep;
    }
View Full Code Here

        return ep;
    }
    //new in 2.2
    public Endpoint createAndPublishEndpoint(String address,
                                             Object implementor, WebServiceFeature ... features) {
        Endpoint ep = createEndpoint(null, implementor, features);
        ep.publish(address);
        return ep;
    }
View Full Code Here

    }
    // END SNIPPET: retrieveContent
   
    public void test() throws Exception {
        int port = PortAllocator.allocatePort();
        Endpoint endpoint = Endpoint.publish("http://localhost:" + port + "/mtom", new MTOMServiceImpl());
        retrieveContent(new URL("http://localhost:" + port + "/mtom"), "G87ZX20047", System.out);
        endpoint.stop();
    }
View Full Code Here

    public Endpoint createAndPublishEndpoint(String s, Object obj) {
    return createAndPublishEndpoint(s, obj, (WebServiceFeature[]) null);
    }

    public Endpoint createAndPublishEndpoint(String s, Object obj, WebServiceFeature... features) {
        Endpoint ep = new EndpointImpl(obj);
        ep.publish(s);
        return ep;
    }
View Full Code Here

    }
   
   
    @Test
    public void testGetBinding() throws Exception {
        Endpoint ep = Endpoint.create("http://schemas.xmlsoap.org/wsdl/soap/http", new HelloImpl());
        assertTrue(ep.getBinding() instanceof SOAPBinding);
    }
View Full Code Here

    }

    @Override
    public Endpoint createEndpoint(String bindingId, Object implementor) {

        Endpoint ep = null;
        if (EndpointUtils.isValidImplementor(implementor)) {
            Bus bus = BusFactory.getThreadDefaultBus();
            ep = createEndpointImpl(bus, bindingId, implementor);
            return ep;
        } else {
View Full Code Here

        }
    }

    @Override
    public Endpoint createAndPublishEndpoint(String url, Object implementor) {
        Endpoint ep = createEndpoint(null, implementor);
        ep.publish(url);
        return ep;
    }
View Full Code Here

TOP

Related Classes of javax.xml.ws.Endpoint

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.