Package javax.xml.ws

Examples of javax.xml.ws.Endpoint


        assertNotNull("cannot find test resource", url);
        String configFileName = url.toString();
        if (configFileName != null) {
            System.setProperty("celtix.config.file", configFileName);
        }
        Endpoint endpoint = Endpoint.publish(address, implementor);
        List<Handler> handlerChain = endpoint.getBinding().getHandlerChain();
        for (Object h : handlerChain) {
            if (h instanceof MAPVerifier) {
                ((MAPVerifier)h).verificationCache = this;
            } else if (h instanceof HeaderVerifier) {
                ((HeaderVerifier)h).verificationCache = this;
View Full Code Here


    }
    
    public void testInitialisationServerSide() {
  
        String address = "http://localhost:9000/SoapContext/GreeterPort";
        Endpoint ep = Endpoint.publish(address, new GreeterImpl());

        AbstractBindingImpl abi = (AbstractBindingImpl)ep.getBinding();
        List<Handler> handlerChain = abi.getPreLogicalSystemHandlers();
       
        assertEquals(1, handlerChain.size());
        RMHandler handler = (RMHandler)handlerChain.get(0);
       
View Full Code Here

        return new ServiceImpl(Bus.getCurrent(), url, qname, cls);
    }

    @Override
    public Endpoint createEndpoint(String bindingId, Object implementor) {
        Endpoint ep = null;
        if (EndpointUtils.isValidImplementor(implementor)) {
            ep = new EndpointImpl(Bus.getCurrent(), implementor, bindingId);
            return ep;
        } else {
            throw new WebServiceException(new Message("INVALID_IMPLEMENTOR_EXC", LOG).toString());
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

        String configFileName = url.toString();
        if (configFileName != null) {
            System.setProperty("celtix.config.file", configFileName);
        }
       
        Endpoint endpoint = Endpoint.publish(address, implementor);
        List<Handler> handlerChain = endpoint.getBinding().getHandlerChain();
        for (Object h : handlerChain) {
            if (h instanceof MAPVerifier) {
                ((MAPVerifier)h).setVerificationCache(this);
            } else if (h instanceof HeaderVerifier) {
                ((HeaderVerifier)h).setVerificationCache(this);
View Full Code Here

                                           destSrv, destPort);
       
        TestRouter router = new TestRouter(null, def, rt);
        router.init();
        assertEquals(1, router.epList.size());
        Endpoint ep = router.epList.get(0);
        assertNotNull("Should have a Endpoint for Source Service", ep);
        assertNotNull("Should have a wsdl model", ep.getMetadata());
        Map<String, Object> props = ep.getProperties();
        assertNotNull("Should have a wsdl model", props);
        assertEquals(sourceSrv,  props.get(Endpoint.WSDL_SERVICE));
        QName portName = (QName) props.get(Endpoint.WSDL_PORT);
        assertEquals(sourceSrv.getNamespaceURI(), portName.getNamespaceURI());
        assertEquals(sourcePort, portName.getLocalPart());
        Object impl = ep.getImplementor();
        assertTrue("Should be instance of Provider<Source>",
                   impl instanceof Provider);
        StreamSourceMessageProvider ssmp = (StreamSourceMessageProvider) impl;
        assertNull("WebServiceContext is not set as endpoint is not published",
                   ssmp.getContext());
View Full Code Here

        loader = doCodeGeneration(wsdlURl.getFile(), srcDir);
       
        router = new TestRouter(loader, def, rt);
        router.init();
        assertEquals(1, router.epList.size());
        Endpoint ep = router.epList.get(0);
        assertNotNull("Should have a Endpoint for Source Service", ep);
        assertNotNull("Should have a wsdl model", ep.getMetadata());
        Map<String, Object> props = ep.getProperties();
        assertNotNull("Should have a wsdl model", props);
        assertEquals(sourceSrv,  props.get(Endpoint.WSDL_SERVICE));
        QName portName = (QName) props.get(Endpoint.WSDL_PORT);
        assertEquals(sourceSrv.getNamespaceURI(), portName.getNamespaceURI());
        assertEquals(sourcePort, portName.getLocalPart());
        Object impl = ep.getImplementor();
       
        //The Implementor Should be a proxy class.
        assertTrue("Implemetor Should be a proxy Class",
                     Proxy.isProxyClass(impl.getClass()));
View Full Code Here

                //CodeGenerated Servant
                InvocationHandler implHandler = new SEIImplHandler(wsdlModel, route);
                implementor = createSEIImplementor(p.getBinding().getPortType(), implHandler);
            }

            Endpoint sourceEP = Endpoint.create(srcBindingId, implementor);

            Map<String, Object> properties =
                createEndpointProperties(st.getService(), p.getName());           
            sourceEP.setMetadata(metadata);
            sourceEP.setProperties(properties);
            //TODO Set Executor on endpoint.
            epList.add(sourceEP);
        }
    }
View Full Code Here

        Object implementor = new AddNumbersImpl();
        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

        if (obj instanceof Function) {
            invokeFunc = (Function)obj;
        } else {
            throw new JSDOMProviderException(ILLEGAL_INVOKE_TYPE);
        }
        Endpoint ep = Endpoint.create(binding, this);
        List<Source> metadata = new ArrayList<Source>();
        metadata.add(new StreamSource(wsdlLoc));
        ep.setMetadata(metadata);
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(Endpoint.WSDL_SERVICE, new QName(tgtNmspc, svcNm));
        props.put(Endpoint.WSDL_PORT, new QName(tgtNmspc, portNm));
        ep.setProperties(props);
        ep.publish(addr);
    }
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.