use of org.apache.cxf.jaxws.EndpointImpl in project cxf by apache.
the class Server method run.
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());
}
use of org.apache.cxf.jaxws.EndpointImpl in project cxf by apache.
the class Server method run.
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");
}
use of org.apache.cxf.jaxws.EndpointImpl in project cxf by apache.
the class Server method run.
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);
}
use of org.apache.cxf.jaxws.EndpointImpl in project iaf by ibissource.
the class WebServiceListener method open.
@Override
public void open() throws ListenerException {
if (StringUtils.isNotEmpty(getAddress())) {
log.debug("registering listener [" + getName() + "] with JAX-WS CXF Dispatcher on SpringBus [" + cxfBus.getId() + "]");
endpoint = new EndpointImpl(cxfBus, new MessageProvider(this, getMultipartXmlSessionKey()));
// TODO: prepend with `local://` when used without application server
endpoint.publish("/" + getAddress());
SOAPBinding binding = (SOAPBinding) endpoint.getBinding();
binding.setMTOMEnabled(isMtomEnabled());
if (endpoint.isPublished()) {
log.debug("published listener [" + getName() + "] on CXF endpoint [" + getAddress() + "]");
} else {
log.error("unable to publish listener [" + getName() + "] on CXF endpoint [" + getAddress() + "]");
}
}
// Can bind on multiple endpoints
if (StringUtils.isNotEmpty(getServiceNamespaceURI())) {
log.debug("registering listener [" + getName() + "] with ServiceDispatcher by serviceNamespaceURI [" + getServiceNamespaceURI() + "]");
ServiceDispatcher.getInstance().registerServiceClient(getServiceNamespaceURI(), this);
} else {
log.debug("registering listener [" + getName() + "] with ServiceDispatcher");
// Backwards compatibility
ServiceDispatcher.getInstance().registerServiceClient(getName(), this);
}
super.open();
}
use of org.apache.cxf.jaxws.EndpointImpl in project tutorials by eugenp.
the class ServiceConfiguration method endpoint.
@Bean
public Endpoint endpoint() {
EndpointImpl endpoint = new EndpointImpl(springBus(), new BaeldungImpl());
endpoint.publish("http://localhost:8081/services/baeldung");
return endpoint;
}
Aggregations