protected void initDefaultServant() { servant = new HttpNumberImpl(); String wsdlLocation = "testutils/factory_pattern.wsdl"; String bindingId = null; EndpointImpl ep = new EndpointImpl(bus, servant, bindingId, wsdlLocation); ep.setEndpointName(new QName(NUMBER_SERVICE_QNAME.getNamespaceURI(), "NumberPort")); ep.publish(getServantAddressRoot()); endpoints.add(ep); templateEpr = ep.getServer().getDestination().getAddress(); } }
endpoint.getProperties().put(NULL_MEANS_ONEWAY, Boolean.TRUE); if (cbInterfaceName != null) { endpoint.setEndpointName(serverFactory.getEndpointName()); endpoint.setServiceName(serverFactory.getServiceName()); if (useWsdlLocation) {
protected void initDefaultServant() { servant = new ManualNumberImpl(); String wsdlLocation = "testutils/factory_pattern.wsdl"; String bindingId = null; EndpointImpl ep = new EndpointImpl(bus, servant, bindingId, wsdlLocation); ep.setEndpointName(new QName(NUMBER_SERVICE_QNAME.getNamespaceURI(), "NumberPort")); ep.publish(getServantAddressRoot()); endpoints.add(ep); templateEpr = ep.getServer().getDestination().getAddress(); } }
protected void run() { // We use a null binding id in the call to EndpointImpl // constructor. Why? final String nullBindingID = null; // We need to specify to use defaults on constructing the // bus, because our configuration file doesn't have // everything needed. final boolean useDefaults = true; // We configure a new bus for this server. setBus(new SpringBusFactory().createBus(configFileURL, useDefaults)); // 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. ep = new EndpointImpl( getBus(), implementor, nullBindingID, this.getClass().getResource("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); }
protected void run() { // We use a null binding id in the call to EndpointImpl // constructor. Why? final String nullBindingID = null; // We need to specify to use defaults on constructing the // bus, because our configuration file doesn't have // everything needed. final boolean useDefaults = true; // We configure a new bus for this server. setBus(new SpringBusFactory().createBus(configFileURL, useDefaults)); // 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. ep = new EndpointImpl( getBus(), implementor, nullBindingID, this.getClass().getResource("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); }
protected void initDefaultServant() { servant = new NumberImpl(); String wsdlLocation = "testutils/factory_pattern.wsdl"; String bindingId = null; EndpointImpl ep = new EndpointImpl(bus, servant, bindingId, wsdlLocation); ep.setEndpointName(new QName(NUMBER_SERVICE_QNAME.getNamespaceURI(), "NumberPort")); ep.publish(getServantAddressRoot()); endpoints.add(ep); templateEpr = ep.getServer().getDestination().getAddress(); // jms port EmbeddedJMSBrokerLauncher.updateWsdlExtensors(bus, wsdlLocation); ep = new EndpointImpl(bus, servant, bindingId, wsdlLocation); ep.setEndpointName(new QName(NUMBER_SERVICE_QNAME.getNamespaceURI(), "NumberPortJMS")); ep.setAddress("jms:jndi:dynamicQueues/test.cxf.factory_pattern.queue"); ep.publish(); ep.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor()); ep.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor()); endpoints.add(ep); }
protected void run() { setBus(BusFactory.getDefaultBus()); Object implementor = new AddNumberImpl(); String address = "http://localhost:" + PORT + "/jaxws/add"; //Endpoint.publish(address, implementor); ep = (EndpointImpl) Endpoint.create(implementor); ep.getFeatures().add(new WSAddressingFeature()); ep.publish(address); ep = new EndpointImpl(BusFactory.getThreadDefaultBus(), implementor, null, getWsdl()); ep.setServiceName(new QName("http://apache.org/cxf/systest/ws/addr_feature/", "AddNumbersService")); ep.setEndpointName(new QName("http://apache.org/cxf/systest/ws/addr_feature/", "AddNumbersNonAnonPort")); String address12 = "http://localhost:" + PORT2 + "/jaxws/soap12/add"; ep.getFeatures().add(new WSAddressingFeature()); ep.publish(address12); }
private Server createServerFromJaxwsEndpoint(JaxWsServerFactoryBean factory) { @SuppressWarnings("resource") EndpointImpl endpoint = new EndpointImpl(factory.getBus(), null, factory); endpoint.setWsdlLocation(factory.getWsdlURL()); endpoint.setImplementorClass(factory.getServiceClass()); endpoint.setEndpointName(factory.getEndpointName()); endpoint.setServiceName(factory.getServiceName()); endpoint.setInvoker(factory.getInvoker()); endpoint.setSchemaLocations(factory.getSchemaLocations()); return endpoint.getServer(factory.getAddress()); }
URL wsdl = SecurityPolicyTest.class.getResource("DoubleIt.wsdl"); EndpointImpl ep = (EndpointImpl)Endpoint.create(new DoubleItImpl()); ep.setEndpointName( new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortCXF4122") );
ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortHttps")); ep.setWsdlLocation(wsdl.getPath()); ep.setAddress(POLICY_HTTPS_ADDRESS); ep.setEndpointName( new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortEncryptThenSign") ); ep.setEndpointName( new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortSignThenEncrypt") ); ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortSign")); ep.setWsdlLocation(wsdl.getPath()); ep.setAddress(POLICY_SIGN_ADDRESS); ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortXPath")); ep.setWsdlLocation(wsdl.getPath()); ep.setAddress(POLICY_XPATH_ADDRESS); ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortSignedOnly")); ep.setWsdlLocation(wsdl.getPath()); ep.setAddress(POLICY_SIGNONLY_ADDRESS); ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortCXF3041")); ep.setWsdlLocation(wsdl.getPath()); ep.setAddress(POLICY_CXF3041_ADDRESS); ep.setEndpointName(new QName("http://www.example.org/contract/DoubleIt", "DoubleItPortCXF3042"));