- Common ways to obtain EndpointImpl
private void myMethod () {EndpointImpl e =
Object implementor;(EndpointImpl) Endpoint.create(implementor)
- Smart code suggestions by Codota
}
serverFactory.setServiceBean(implementor); serverFactory.setBus(bus); serverFactory.setFeatures(getFeatures()); serverFactory.setInvoker(invoker); serverFactory.setSchemaLocations(schemaLocations);
public static void setupEndpoint(final Endpoint endpoint) { if (!(endpoint instanceof EndpointImpl)) { throw new IllegalArgumentException("Only CXF JAX-WS endpoints supported. "); } final EndpointImpl ep = (EndpointImpl) endpoint; final List<Feature> features = new ArrayList<Feature>(); features.add(new RequestCallbackFeature()); if (logging) { features.add(new LoggingFeature()); } if (serviceActivityMonitoring) { features.add(getEventFeature()); } if (ep.getFeatures() != null) { features.addAll(ep.getFeatures()); } ep.setFeatures(features); ep.getProperties().put(NULL_MEANS_ONEWAY, Boolean.TRUE); }
public Endpoint configureEndpoint(Endpoint endpoint) { if (jmsConfiguration == null || !(endpoint instanceof EndpointImpl) || (serviceName == null && configuration == null)) { return null; } if (!jmsConfigured) { setupJmsConfiguration(); } final EndpointImpl ei = (EndpointImpl) endpoint; final JMSConfigFeature feature = new JMSConfigFeature(); feature.setJmsConfig(jmsConfiguration); List<Feature> features = ei.getFeatures(); if (features == null) { features = new ArrayList<Feature>(); } features.add(feature); ei.setFeatures(features); return endpoint; }
@Bean public Endpoint endpoint() { EndpointImpl endpoint = new EndpointImpl(springBus(), new InfoServiceImpl()); endpoint.getFeatures().add(new LoggingFeature()); endpoint.publish("/InfoService"); return endpoint; } }
public static void publish(String address, Object impl) { EndpointImpl ep = (EndpointImpl)Endpoint.create(impl); ep.setBus(bus); ep.getFeatures().add(cff); ep.publish(address); }
@Bean public Endpoint endpoint() { EndpointImpl endpoint = new EndpointImpl(springBus(), weatherService()); // CXF JAX-WS implementation relies on the correct ServiceName as QName-Object with // the name-Attribute“s text <wsdl:service name="Weather"> and the targetNamespace // "http://www.codecentric.de/namespace/weatherservice/" // Also the WSDLLocation must be set endpoint.setServiceName(weather().getServiceName()); endpoint.setWsdlLocation(weather().getWSDLDocumentLocation().toString()); endpoint.publish(SERVICE_URL); LoggingFeature logFeature = new LoggingFeature(); logFeature.setPrettyLogging(true); logFeature.initialize(springBus()); endpoint.getFeatures().add(logFeature); return endpoint; }
locatorEndpoint.getFeatures().add(policyFeature);
serviceEndpoint.getFeatures().add(policyFeature);
serviceEndpoint.getFeatures().add(policyFeature);
@BeforeClass public static void startServers() throws Exception { startBusAndJMS(SoapJmsSpecTest.class); publish("jms:queue:test.cxf.jmstransport.queue2", new GreeterSpecImpl()); publish("jms:queue:test.cxf.jmstransport.queue5", new GreeterSpecWithPortError()); EndpointImpl ep = (EndpointImpl)Endpoint.create(null, new GreeterSpecImpl()); ep.setBus(bus); ep.getFeatures().add(new GZIPFeature()); ep.getFeatures().add(cff); ep.publish("jms:queue:test.cxf.jmstransport.queue6"); }
protected void run() { faultToserver = new org.eclipse.jetty.server.Server(Integer.parseInt(FAULT_PORT)); faultToserver.setHandler(new HelloHandler()); try { faultToserver.start(); } catch (Exception e) { e.printStackTrace(); } setBus(BusFactory.getDefaultBus()); Object implementor = new AddNumberImpl(); String address = "http://localhost:" + PORT + "/jaxws/add"; ep = (EndpointImpl) Endpoint.create(implementor); ep.getInInterceptors().add(new DecoupledFaultHandler()); ep.getFeatures().add(new WSAddressingFeature()); ep.publish(address); Object implementor2 = new GreeterImpl(); String address2 = "http://localhost:" + PORT + "/jaxws/greeter"; ep = (EndpointImpl) Endpoint.create(implementor2); ep.getInInterceptors().add(new DecoupledFaultHandler()); ep.getFeatures().add(new WSAddressingFeature()); ep.publish(address2); }
@BeforeClass public static void startServers() throws Exception { startBusAndJMS(ProviderJMSContinuationTest.class); Object implementor = new HWSoapMessageDocProvider(); String address = "jms:queue:test.jmstransport.text?replyToQueueName=test.jmstransport.text.reply"; EndpointImpl ep = (EndpointImpl)Endpoint.create(implementor); ep.getInInterceptors().add(new IncomingMessageCounterInterceptor()); ep.setBus(bus); ep.getFeatures().add(cff); ep.publish(address); }
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); }
protected void run() { Object implementor = new AddNumberReg(); String address = "http://localhost:" + PORT + "/jaxws/add"; EndpointImpl ep; ep = new EndpointImpl(BusFactory.getThreadDefaultBus(), implementor, null, getWsdl()); ep.getFeatures().add(new WSAddressingFeature()); ep.publish(address); eps.add(ep); implementor = new AddNumberNonAnon(); address = "http://localhost:" + PORT + "/jaxws/addNonAnon"; ep = new EndpointImpl(BusFactory.getThreadDefaultBus(), implementor, null, getWsdl()); ep.getFeatures().add(new WSAddressingFeature()); ep.publish(address); eps.add(ep); implementor = new AddNumberOnlyAnon(); address = "http://localhost:" + PORT + "/jaxws/addAnon"; ep = new EndpointImpl(BusFactory.getThreadDefaultBus(), implementor, null, getWsdl()); ep.getFeatures().add(new WSAddressingFeature()); ep.publish(address); eps.add(ep); }
protected void run() { setBus(BusFactory.getDefaultBus()); Object implementor = new AddNumberImpl(); String address = "http://localhost:" + PORT + "/AddNumberImplPort"; ep1 = new EndpointImpl(implementor); ep1.getFeatures().add(new WSAddressingFeature()); ep1.publish(address); ep2 = new EndpointImpl(new AddNumberImplNoAddr()); ep2.publish(address + "-noaddr"); } public void tearDown() {
@BeforeClass public static void startServers() throws Exception { Object implementor = new TestMtomJMSImpl(); bus = BusFactory.getDefaultBus(); ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); PooledConnectionFactory cfp = new PooledConnectionFactory(cf); cff = new ConnectionFactoryFeature(cfp); EndpointImpl ep = (EndpointImpl)Endpoint.create(implementor); ep.getFeatures().add(cff); ep.getInInterceptors().add(new TestMultipartMessageInterceptor()); ep.getOutInterceptors().add(new TestAttachmentOutInterceptor()); //ep.getInInterceptors().add(new LoggingInInterceptor()); //ep.getOutInterceptors().add(new LoggingOutInterceptor()); SOAPBinding jaxWsSoapBinding = (SOAPBinding)ep.getBinding(); jaxWsSoapBinding.setMTOMEnabled(true); ep.publish(); }
@BeforeClass public static void startServers() throws Exception { bus = BusFactory.getDefaultBus(); ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); PooledConnectionFactory cfp = new PooledConnectionFactory(cf); cff = new ConnectionFactoryFeature(cfp); String address = "http://localhost:" + PORT + "/SOAPDocLitService/SoapPort"; Endpoint.publish(address, new HTTPGreeterImpl()); EndpointImpl ep1 = (EndpointImpl)Endpoint.create(new JMSGreeterImpl()); ep1.setBus(bus); ep1.getFeatures().add(cff); ep1.publish(); }
serverFactory.setServiceBean(implementor); serverFactory.setBus(bus); serverFactory.setFeatures(getFeatures()); serverFactory.setInvoker(invoker); serverFactory.setSchemaLocations(schemaLocations);