Package org.apache.cxf.jaxws

Examples of org.apache.cxf.jaxws.EndpointImpl


   
    protected void run() {
        String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";

        Object implementor1 = new GreeterImplMixedStyle(" version1");
        EndpointImpl ep1 = (EndpointImpl) Endpoint.publish(address, implementor1);

        ep1.getServer().getEndpoint().put("version", "1");
        ep1.getServer().getEndpoint().put("allow-multiplex-endpoint", Boolean.TRUE);

        //Register a MediatorInInterceptor on this dummy service

        Object implementor2 = new GreeterImplMixedStyle(" version2");
        EndpointImpl ep2 = (EndpointImpl) Endpoint.publish(address, implementor2);
        ep2.getServer().getEndpoint().put("version", "2");
       
        MultipleEndpointObserver meo = (MultipleEndpointObserver)
            ep1.getServer().getDestination().getMessageObserver();
        meo.getRoutingInterceptors().clear();
        meo.getRoutingInterceptors().add(new MediatorInInterceptor());
View Full Code Here


        // This impl class must have the appropriate annotations
        // to match the WSDL file that we are using.
        Object implementor = new GreeterImpl(name);
       
        // I don't know why this works.
        EndpointImpl ep =
            new EndpointImpl(
                    getBus(),
                    implementor,
                    nullBindingID,
                    this.getClass().getResource("resources/greeting.wsdl").toString());
        // How the hell do I know what the name of the
        // http-destination is from using this call?
        ep.setEndpointName(new QName("http://apache.org/hello_world", name));
        ep.publish(address);
    }
View Full Code Here

       
        createStaticBus(SecurityPolicyTest.class.getResource("https_config.xml").toString())
            .getExtension(PolicyEngine.class).setEnabled(true);
        getStaticBus().getOutInterceptors().add(new LoggingOutInterceptor());
       
        EndpointImpl ep = (EndpointImpl)Endpoint.create(new DoubleItImpl());
        ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortHttps"));
        ep.setWsdlLocation(wsdl.getPath());
        ep.setAddress(POLICY_HTTPS_ADDRESS);
        ep.publish();
        ep.getServer().getEndpoint().getEndpointInfo().setProperty(SecurityConstants.CALLBACK_HANDLER,
                                                                   new ServerPasswordCallback());
        Endpoint.publish(POLICY_ADDRESS, new DoubleItImpl());
       
        ep = (EndpointImpl)Endpoint.create(new DoubleItImpl());
        ep.setEndpointName(
            new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortEncryptThenSign")
        );
        ep.setWsdlLocation(wsdl.getPath());
        ep.setAddress(POLICY_ENCSIGN_ADDRESS);
        ep.publish();
        EndpointInfo ei = ep.getServer().getEndpoint().getEndpointInfo();
        setCryptoProperties(ei, "bob.properties", "alice.properties");

        ep = (EndpointImpl)Endpoint.create(new DoubleItImpl());
        ep.setEndpointName(
            new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortSignThenEncrypt")
        );
        ep.setWsdlLocation(wsdl.getPath());
        ep.setAddress(POLICY_SIGNENC_ADDRESS);
        ep.publish();
        ei = ep.getServer().getEndpoint().getEndpointInfo();
        setCryptoProperties(ei, "bob.properties", "alice.properties");

        ep = (EndpointImpl)Endpoint.create(new DoubleItImpl());
        ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortSign"));
        ep.setWsdlLocation(wsdl.getPath());
        ep.setAddress(POLICY_SIGN_ADDRESS);
        ep.publish();
        ei = ep.getServer().getEndpoint().getEndpointInfo();
        setCryptoProperties(ei, "bob.properties", "alice.properties");

        ep = (EndpointImpl)Endpoint.create(new DoubleItImpl());
        ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortXPath"));
        ep.setWsdlLocation(wsdl.getPath());
        ep.setAddress(POLICY_XPATH_ADDRESS);
        ep.publish();
        ei = ep.getServer().getEndpoint().getEndpointInfo();
        setCryptoProperties(ei, "alice.properties", "bob.properties");
       
        ep = (EndpointImpl)Endpoint.publish(POLICY_SIGNENC_PROVIDER_ADDRESS,
                                            new DoubleItProvider());
       
        ei = ep.getServer().getEndpoint().getEndpointInfo();
        setCryptoProperties(ei, "bob.properties", "alice.properties");
       
        ep = (EndpointImpl)Endpoint.create(new DoubleItImpl());
        ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortSignedOnly"));
        ep.setWsdlLocation(wsdl.getPath());
        ep.setAddress(POLICY_SIGNONLY_ADDRESS);
        ep.publish();
        ei = ep.getServer().getEndpoint().getEndpointInfo();
        setCryptoProperties(ei, "bob.properties", "alice.properties");
       
        ep = (EndpointImpl)Endpoint.create(new DoubleItImpl());
        ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortCXF3041"));
        ep.setWsdlLocation(wsdl.getPath());
        ep.setAddress(POLICY_CXF3041_ADDRESS);
        ep.publish();
        ei = ep.getServer().getEndpoint().getEndpointInfo();
        setCryptoProperties(ei, "bob.properties", "alice.properties");
       
        ep = (EndpointImpl)Endpoint.create(new DoubleItImpl());
        ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortCXF3042"));
        ep.setWsdlLocation(wsdl.getPath());
        ep.setAddress(POLICY_CXF3042_ADDRESS);
        ep.publish();
        ei = ep.getServer().getEndpoint().getEndpointInfo();
        setCryptoProperties(ei, "alice.properties", "alice.properties");

        ep = (EndpointImpl)Endpoint.create(new DoubleItImpl());
        ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortCXF3452"));
        ep.setWsdlLocation(wsdl.getPath());
        ep.setAddress(POLICY_CXF3452_ADDRESS);
        ep.publish();
        ei = ep.getServer().getEndpoint().getEndpointInfo();
        setCryptoProperties(ei, "alice.properties", "alice.properties");
        ei.setProperty(Message.SCHEMA_VALIDATION_ENABLED, Boolean.TRUE);
    }
View Full Code Here

    protected void run() {
        Object implementor = new TestMtomJMSImpl();
        String address = "http://not.required.for.jms";
        try {
            EndpointImpl jaxep = (EndpointImpl) javax.xml.ws.Endpoint.publish(address, implementor);
            Endpoint ep = jaxep.getServer().getEndpoint();
            ep.getInInterceptors().add(new TestMultipartMessageInterceptor());
            ep.getOutInterceptors().add(new TestAttachmentOutInterceptor());
            ep.getInInterceptors().add(new LoggingInInterceptor());
            ep.getOutInterceptors().add(new LoggingOutInterceptor());
            SOAPBinding jaxWsSoapBinding = (SOAPBinding) jaxep.getBinding();
            jaxWsSoapBinding.setMTOMEnabled(true);

        } catch (Exception e) {
            Thread.currentThread().interrupt();
        }
View Full Code Here

    protected void initDefaultServant() {
        servant = new ManualNumberImpl();

        String wsdlLocation = "testutils/factory_pattern.wsdl";
        String bindingId = null;
        EndpointImpl ep =
            new EndpointImpl(BusFactory.getDefaultBus(), servant, bindingId, wsdlLocation);
        ep.setEndpointName(new QName(NUMBER_SERVICE_QNAME.getNamespaceURI(), "NumberPort"));
        ep.publish(NUMBER_SERVANT_ADDRESS_ROOT);
        templateEpr = ep.getServer().getDestination().getAddress();
    }
View Full Code Here

    protected void initDefaultServant() {
        servant = new HttpNumberImpl();

        String wsdlLocation = "testutils/factory_pattern.wsdl";
        String bindingId = null;
        EndpointImpl ep =
            new EndpointImpl(BusFactory.getDefaultBus(), servant, bindingId, wsdlLocation);
        ep.setEndpointName(new QName(NUMBER_SERVICE_QNAME.getNamespaceURI(), "NumberPort"));
        ep.publish(NUMBER_SERVANT_ADDRESS_ROOT);
        templateEpr = ep.getServer().getDestination().getAddress();       
    }
View Full Code Here

    protected void run() {
        Object implementor = new TestMtomImpl();
        String address = "http://localhost:" + PORT + "/mime-test";
        try {
            EndpointImpl jaxep = (EndpointImpl) javax.xml.ws.Endpoint.publish(address, implementor);
            Endpoint ep = jaxep.getServer().getEndpoint();
            ep.getInInterceptors().add(new TestMultipartMessageInterceptor());
            ep.getOutInterceptors().add(new TestAttachmentOutInterceptor());
           
            SOAPBinding jaxWsSoapBinding = (SOAPBinding) jaxep.getBinding();
            jaxWsSoapBinding.setMTOMEnabled(true);

        } catch (Exception e) {
            Thread.currentThread().interrupt();
        }
View Full Code Here

        servant = new NumberImpl();
        String wsdlLocation = "testutils/factory_pattern.wsdl";
        String bindingId = null;

        EndpointImpl ep = new EndpointImpl(BusFactory.getDefaultBus(),
                                           servant, bindingId, wsdlLocation);
        ep.setEndpointName(new QName(NUMBER_SERVICE_QNAME.getNamespaceURI(), "NumberPort"));
        ep.publish(NUMBER_SERVANT_ADDRESS_ROOT);
        templateEpr = ep.getServer().getDestination().getAddress();

        // jms port
        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(), wsdlLocation);       
        ep = new EndpointImpl(BusFactory.getDefaultBus(), servant, bindingId, wsdlLocation);
        ep.setEndpointName(new QName(NUMBER_SERVICE_QNAME.getNamespaceURI(), "NumberPortJMS"));
        ep.publish();
        ep.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
        ep.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
    }
View Full Code Here

        HelloWorldService ss = new HelloWorldService(wsdl, serviceName);
       
        Greeter port = ss.getSoapPort();
        Object implementor = new GreeterImpl();
        String address = "http://foo/bar/baz";
        EndpointImpl e = (EndpointImpl)Endpoint.publish(address, implementor);
        e.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
        e.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
       
        port.greetMeOneWay("test");
        String rep = port.greetMe("ffang");
        assertEquals(rep, "Hello ffang");
        rep = port.sayHi();
View Full Code Here

    protected void run() {
       
        Object implementor = new GreeterImpl();
        String address = "http://foo/bar/baz";
        EndpointImpl e = (EndpointImpl)Endpoint.publish(address, implementor);
        e.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
        e.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxws.EndpointImpl

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.