Package javax.xml.ws

Examples of javax.xml.ws.Endpoint


        super.tearDown();
    }

    public void testCreateWithNotAnnotatedImplementor() throws Exception {
        Object implementor = new NotAnnotatedGreeterImpl();
        Endpoint ep = Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING, implementor);    
        assertNotNull(ep);
    }
View Full Code Here


        assertNotNull(ep);
    }
   
    public void testCreateWithCorrectlyAnnotatedImplementor() throws Exception {
        Object implementor = new AnnotatedGreeterImpl();
        Endpoint ep = Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING, implementor);    
        assertNotNull(ep);
    }
View Full Code Here

                           "org.objectweb.celtix.bus.jaxws.spi.ProviderImpl");
        bus = Bus.init();
        BindingManager bm = bus.getBindingManager();
        bm.registerBinding("http://celtix.objectweb.org/bindings/test", new TestBindingFactory(bus));
        implementor = new DerivedGreeterImpl();
        Endpoint ep = Endpoint.create(TestBinding.TEST_BINDING, implementor);
        ei = (EndpointImpl)ep;
    }
View Full Code Here

        Object implementor = new DocLitWrappedImpl();
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(Endpoint.WSDL_SERVICE, serviceName);
        props.put(Endpoint.WSDL_PORT, portName);
       
        Endpoint ep = Endpoint.create(implementor);
        ep.setProperties(props);
        ep.publish(address);
    }
View Full Code Here

        Object implementor = new DocLitWrappedImpl();
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(Endpoint.WSDL_SERVICE, serviceName);
        props.put(Endpoint.WSDL_PORT, portName);
       
        Endpoint ep = null;
        if (null != bindingId) {
            ep = Endpoint.create(bindingId, implementor);
        } else {
            ep = Endpoint.create(implementor);
        }
        ep.setProperties(props);
        ep.publish(address);
    }
View Full Code Here


    protected void run()  {
        Object implementor = new PutLastTradedPriceImpl();
        String address = "http://localhost:9003/SOAPDocLitBareService/SoapPort";     
        Endpoint ep = Endpoint.create(implementor);
        Map<String, Object> props = new HashMap<String, Object>(2);
        props.put(Endpoint.WSDL_SERVICE, new QName("http://objectweb.org/hello_world_doc_lit_bare",
                                                   "SOAPService"));
        props.put(Endpoint.WSDL_PORT, new QName("http://objectweb.org/hello_world_doc_lit_bare", "SoapPort"));
        ep.setProperties(props);
        ep.publish(address);
    }
View Full Code Here

   
   
    protected void run()  {
        Object implementor = new TestHeaderImpl();
        String address = "http://localhost:9104/SoapHeaderContext/SoapHeaderPort";
        Endpoint ep = Endpoint.create(implementor);
        Map<String, Object> props = new HashMap<String, Object>(2);
        props.put(Endpoint.WSDL_SERVICE, new QName("http://objectweb.org/header_test", "SOAPHeaderService"));
        props.put(Endpoint.WSDL_PORT, new QName("http://objectweb.org/header_test", "SoapHeaderPort"));
        ep.setProperties(props);
        ep.publish(address);
    }
View Full Code Here

    protected Server() throws Exception {
        System.out.println("Starting Server");

        Object implementor = new BankImpl();
        String address = "file:./bank.ref";
        Endpoint endpoint = Endpoint.create("http://schemas.apache.org/yoko/bindings/corba",
                                            implementor);
        endpoint.publish(address);
    }
View Full Code Here

        assertNotNull(wsdl);

        HelloWorldQueueDecoupledOneWaysService service =
            new HelloWorldQueueDecoupledOneWaysService(wsdl, serviceName);
        assertNotNull(service);
        Endpoint requestEndpoint = null;
        Endpoint replyEndpoint = null;
        try {
            HelloWorldOneWayPort greeter = service.getPort(portName, HelloWorldOneWayPort.class);
            GreeterImplQueueDecoupledOneWays requestServant = new GreeterImplQueueDecoupledOneWays();
            requestEndpoint = Endpoint.publish("", requestServant);
            GreeterImplQueueDecoupledOneWaysDeferredReply replyServant =
                new GreeterImplQueueDecoupledOneWaysDeferredReply();
            replyEndpoint = Endpoint.publish("", replyServant);
           
            BindingProvider  bp = (BindingProvider)greeter;
            Map<String, Object> requestContext = bp.getRequestContext();
            JMSMessageHeadersType requestHeader = new JMSMessageHeadersType();
            requestHeader.setJMSReplyTo("dynamicQueues/test.jmstransport.oneway.with.set.replyto.reply");
            requestContext.put(JMSConstants.JMS_CLIENT_REQUEST_HEADERS, requestHeader);
            String expectedRequest = "JMS:Queue:Request";
            greeter.greetMeOneWay(expectedRequest);
            String request = requestServant.ackRequestReceived(5000);
            if (request == null) {
                if (requestServant.getException() != null) {
                    fail(requestServant.getException().getMessage());
                } else {
                    fail("The oneway call didn't reach its intended endpoint");
                }
            }
            assertEquals(expectedRequest, request);
            requestServant.proceedWithReply();
            String expectedReply = requestServant.ackReplySent(5000);
            if (expectedReply == null) {
                if (requestServant.getException() != null) {
                    fail(requestServant.getException().getMessage());
                } else {
                    fail("The decoupled one-way reply was not sent");
                }
            }
            String reply = replyServant.ackRequest(5000);
            if (reply == null) {
                if (replyServant.getException() != null) {
                    fail(replyServant.getException().getMessage());
                } else {
                    fail("The decoupled one-way reply didn't reach its intended endpoint");
                }
            }
            assertEquals(expectedReply, reply);
        } catch (Exception ex) {
            throw ex;
        } finally {
            if (requestEndpoint != null) {
                requestEndpoint.stop();
            }
            if (replyEndpoint != null) {
                replyEndpoint.stop();
            }
        }
    }
View Full Code Here

   
    //this is a standalone test
    public static void main(String[] arg) throws Exception {
        try {
            Bus bus = BusFactory.getDefaultBus();
            Endpoint ep = Endpoint.publish("http://localhost:51919/Foo/Snarf", new FooImpl());
            WSDiscoveryServiceImpl service = new WSDiscoveryServiceImpl(bus);
            service.startup();
           
            //this service will just generate an error.  However, the probes should still
            //work to probe the above stuff.
            WSDiscoveryServiceImpl s2 = new WSDiscoveryServiceImpl() {
                public ProbeMatchesType handleProbe(ProbeType pt) {
                    throw new RuntimeException("Error!!!");
                }
            };
            s2.startup();
            HelloType h = service.register(ep.getEndpointReference());
           
            bus  = BusFactory.newInstance().createBus();
            new LoggingFeature().initialize(bus);
            WSDiscoveryClient c = new WSDiscoveryClient(bus);
            c.setVersion10();
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.