use of org.apache.cxf.bus.spring.SpringBus in project iaf by ibissource.
the class WebServiceListener method configure.
/**
* initialize listener and register <code>this</code> to the JNDI
*/
@Override
public void configure() throws ConfigurationException {
super.configure();
if (StringUtils.isEmpty(getAddress()) && isMtomEnabled())
throw new ConfigurationException("can only use MTOM when address attribute has been set");
if (StringUtils.isNotEmpty(getAddress()) && getAddress().contains(":"))
throw new ConfigurationException("address cannot contain colon ( : ) character");
if (StringUtils.isNotEmpty(getAttachmentSessionKeys())) {
StringTokenizer stringTokenizer = new StringTokenizer(getAttachmentSessionKeys(), " ,;");
while (stringTokenizer.hasMoreTokens()) {
attachmentSessionKeysList.add(stringTokenizer.nextToken());
}
}
if (isSoap()) {
// String msg = ClassUtils.nameOf(this) +"["+getName()+"]: the use of attribute soap=true has been deprecated. Please use the SoapWrapperPipe instead";
// ConfigurationWarnings.getInstance().add(log, msg, true);
soapWrapper = SoapWrapper.getInstance();
}
if (StringUtils.isEmpty(getServiceNamespaceURI()) && StringUtils.isEmpty(getAddress())) {
String msg = "calling webservices via de ServiceDispatcher_ServiceProxy is deprecated. Please specify an address or serviceNamespaceURI and modify the call accordingly";
ConfigurationWarnings.add(this, log, msg, SuppressKeys.DEPRECATION_SUPPRESS_KEY, null);
}
Bus bus = getApplicationContext().getBean("cxf", Bus.class);
if (bus instanceof SpringBus) {
cxfBus = (SpringBus) bus;
log.debug("found CXF SpringBus id [" + bus.getId() + "]");
} else {
throw new ConfigurationException("unable to find SpringBus, cannot register " + this.getClass().getSimpleName());
}
}
use of org.apache.cxf.bus.spring.SpringBus in project iaf by ibissource.
the class IbisApplicationInitializer method initWebApplicationContext.
/*
* Purely here to print the CXF SpringBus ID
*/
@Override
public WebApplicationContext initWebApplicationContext(ServletContext servletContext) {
try {
WebApplicationContext wac = super.initWebApplicationContext(servletContext);
SpringBus bus = (SpringBus) wac.getBean("cxf");
servletContext.log("Successfully started IBIS WebApplicationInitializer with SpringBus [" + bus.getId() + "]");
return wac;
} catch (Exception e) {
log.fatal("IBIS ApplicationInitializer failed to initialize", e);
throw e;
}
}
use of org.apache.cxf.bus.spring.SpringBus in project iaf by ibissource.
the class NamespaceUriProviderBean method afterPropertiesSet.
@Override
public void afterPropertiesSet() throws Exception {
// TODO look into NamespaceHandlerResolver
Bus bus = (Bus) applicationContext.getBean("cxf");
if (bus instanceof SpringBus) {
log.debug("default CXF SpringBus [" + bus.getId() + "]");
log.info("registering NamespaceURI Provider with JAX-WS CXF Dispatcher");
namespaceRouter = new EndpointImpl(bus, new NamespaceUriProvider());
namespaceRouter.publish("/rpcrouter");
if (namespaceRouter.isPublished()) {
log.info("published NamespaceURI Provider on CXF endpoint [rpcrouter] on SpringBus [" + namespaceRouter.getBus().getId() + "]");
} else {
throw new IllegalStateException("unable to NamespaceURI Service Provider on CXF endpoint [rpcrouter]");
}
} else {
throw new IllegalStateException("CXF bus [" + bus + "] not instance of [SpringBus]");
}
}
use of org.apache.cxf.bus.spring.SpringBus in project uavstack by uavorg.
the class CxfConfig method endpoint.
@Bean
public Endpoint endpoint() {
EndpointImpl endpoint = new EndpointImpl(new SpringBus(), userService());
endpoint.publish("/user");
return endpoint;
}
Aggregations