public ServerImpl getServer() { return getServer(null); }
org.apache.cxf.endpoint.Endpoint getEndpoint() { return getServer(null).getEndpoint(); }
public ServerImpl getServer() { return getServer(null); }
public MEXEndpoint(EndpointImpl server) { this(server.getServer()); }
public MEXEndpoint(EndpointImpl server) { this(server.getServer()); }
serv = getServer(addr); if (addr != null) { EndpointInfo endpointInfo = serv.getEndpoint().getEndpointInfo();
org.apache.cxf.endpoint.Endpoint getEndpoint() { return getServer(null).getEndpoint(); }
protected Server() throws Exception { System.out.println("Starting Server"); Object implementor = new GreeterImpl(); String address = "http://localhost:8080/services/InterceptorExample"; Endpoint endpoint = Endpoint.create(implementor); // Add the DemoInterceptor's to print the contents DemoInterceptor.addInterceptors(((EndpointImpl)endpoint).getServer().getEndpoint().getBinding()); endpoint.publish(address); }
private void customizeEndpoint(EndpointConfig config, Endpoint endpoint) { EndpointImpl e = (EndpointImpl) endpoint; // log incoming requests SecureAnnotationsInterceptor sai = new RespiroSecureAnnotationsInterceptor(); sai.setSecuredObject(config.getImplementor()); e.getServer().getEndpoint().getInInterceptors().add(sai); for (EndpointCustomizer customizer : endpointCustomizers) { customizer.customizeEndpoint(endpoint); } }
protected void run() { Object implementor = new DoubleItImpl(); String address = "http://localhost:" + PORT + "/DoubleItUsernameToken3"; EndpointImpl jaxWsEndpoint = (EndpointImpl)Endpoint.publish(address, implementor); Map<String, Object> properties = new HashMap<>(); properties.put("action", "UsernameToken"); properties.put("passwordCallbackClass", "org.apache.cxf.systest.ws.common.UTPasswordCallback"); WSS4JInInterceptor wss4jInInterceptor = new WSS4JInInterceptor(properties); jaxWsEndpoint.getServer().getEndpoint().getInInterceptors().add(wss4jInInterceptor); } }
@Test public void lookForMissingNamespace() throws Exception { EndpointImpl endpoint = getBean(EndpointImpl.class, "helloWorld"); Document d = getWSDLDocument(endpoint.getServer()); NodeList schemas = assertValid("//xsd:schema[@targetNamespace='http://nstest.helloworld']", d); Element schemaElement = (Element)schemas.item(0); String ef = schemaElement.getAttribute("elementFormDefault"); assertEquals("qualified", ef); }
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(); } }
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 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()); getBus().getInInterceptors().add(new LoggingInInterceptor()); 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()); }
private Endpoint publishEndpoint(boolean autoRewriteSoapAddress) { Endpoint endpoint = Endpoint.publish("http://localhost:" + PORT + "/SoapContext/GreeterPort", new GreeterImpl()); EndpointInfo ei = ((EndpointImpl)endpoint).getServer().getEndpoint().getEndpointInfo(); ei.setProperty("autoRewriteSoapAddress", autoRewriteSoapAddress); return endpoint; } }
protected void run() { Object implementor = new TestMtomImpl(); String address = "http://localhost:" + PORT + "/mime-test"; String addressProvider = "http://localhost:" + PORT + "/mime-test-provider"; try { jaxep = (EndpointImpl) javax.xml.ws.Endpoint.publish(address, implementor); Endpoint ep = jaxep.getServer().getEndpoint(); ep.getInInterceptors().add(new TestMultipartMessageInterceptor()); ep.getOutInterceptors().add(new TestAttachmentOutInterceptor()); jaxep.getInInterceptors().add(new LoggingInInterceptor()); jaxep.getOutInterceptors().add(new LoggingOutInterceptor()); SOAPBinding jaxWsSoapBinding = (SOAPBinding) jaxep.getBinding(); jaxWsSoapBinding.setMTOMEnabled(true); EndpointImpl endpoint = (EndpointImpl)javax.xml.ws.Endpoint.publish(addressProvider, new TestMtomProviderImpl()); endpoint.getProperties().put("schema-validation-enabled", "true"); endpoint.getInInterceptors().add(new LoggingInInterceptor()); endpoint.getOutInterceptors().add(new LoggingOutInterceptor()); } catch (Exception e) { Thread.currentThread().interrupt(); } } public void tearDown() {
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()); }
ep.setAddress(POLICY_CXF4122_ADDRESS); ep.publish(); EndpointInfo ei = ep.getServer().getEndpoint().getEndpointInfo(); setCryptoProperties(ei, "bob.properties", "revocation.properties"); ei.setProperty(SecurityConstants.ENABLE_REVOCATION, Boolean.TRUE);