Search in sources :

Example 1 with MessageProvider

use of nl.nn.adapterframework.http.cxf.MessageProvider 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();
}
Also used : MessageProvider(nl.nn.adapterframework.http.cxf.MessageProvider) EndpointImpl(org.apache.cxf.jaxws.EndpointImpl) SOAPBinding(javax.xml.ws.soap.SOAPBinding)

Aggregations

SOAPBinding (javax.xml.ws.soap.SOAPBinding)1 MessageProvider (nl.nn.adapterframework.http.cxf.MessageProvider)1 EndpointImpl (org.apache.cxf.jaxws.EndpointImpl)1