Package org.frankframework.http
Class WebServiceListener
java.lang.Object
org.frankframework.http.PushingListenerAdapter
org.frankframework.http.WebServiceListener
- All Implemented Interfaces:
FrankElement,HasApplicationContext,HasName,HasPhysicalDestination,IConfigurable,IListener<Message>,IPushingListener<Message>,IScopeProvider,NameAware,RequestReplyListener,ServiceClient,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
@DestinationType(HTTP)
public class WebServiceListener
extends PushingListenerAdapter
implements HasPhysicalDestination
Listener that allows a
If
Receiver to receive messages as a SOAP webservice.
The structure of the SOAP messages is expressed in a WSDL (Web Services Description Language) document.
The Frank!Framework generates a WSDL document for each adapter that contains WebServiceListeners. You can
find these documents in the Frank!Console under main menu item Webservices, heading Available WSDL's.
The WSDL documents that we generate document how the SOAP services can be accessed. In particular, the
URL of a SOAP service can be found in an XML element <soap:address> with
soap pointing to namespace http://schemas.xmlsoap.org/wsdl/soap/.
If
address is set, then for each request:- MIME headers are described in a 'mimeHeaders'-XML stored under session key 'mimeHeaders'
- Attachments present in the request are described by an 'attachments'-XML stored under session key 'attachments'
- SOAP protocol is stored under a session key 'soapProtocol'
- SOAP action is stored under a session key 'SOAPAction'
multipartXmlSessionKey.- Author:
- Gerrit van Brakel, Jaco de Groot, Niels Meijer
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.frankframework.core.RequestReplyListener
RequestReplyListener.ExceptionHandlingMethod -
Field Summary
Fields inherited from class org.frankframework.http.PushingListenerAdapter
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinitialize listener and registerthisto the JNDIprocessRequest(Message message, PipeLineSession session) Method to implement for processing a request.voidsetAddress(String address) The address to listen to, e.g the part <address> in https://mydomain.com/ibis4something/services/<address>, where mydomain.com and ibis4something refer to 'your ibis'.voidsetApplicationFaultsAsSoapFaults(boolean b) voidsetAttachmentSessionKeys(String attachmentSessionKeys) Comma separated list of session keys to hold contents of attachments of the requestvoidsetMtomEnabled(boolean mtomEnabled) If set, MTOM is enabled on the SOAP bindingvoidsetMultipartXmlSessionKey(String multipartXmlSessionKey) Key of session variable that holds the description (name, sessionKey, mimeType) of the parts present in the request.voidsetServiceNamespaceURI(String string) Namespace of the service that is provided by the adapter of this listener.voidsetSoap(boolean b) Iftruethe SOAP envelope is removed from received messages and a SOAP envelope is added to returned messages (SOAP envelope will not be visible to the pipeline)voidsetSoapAction(String string) SOAP Action to listen to.voidstart()Prepares the listener for receiving messages.voidstop()Close all resources used for listening.Methods inherited from class org.frankframework.http.PushingListenerAdapter
afterMessageProcessed, extractMessage, setApplicationFaultsAsExceptions, setExceptionListener, setHandler, setName, setRunning, toString, wrapRawMessageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface org.frankframework.core.RequestReplyListener
getOnException, setOnException
-
Constructor Details
-
WebServiceListener
public WebServiceListener()
-
-
Method Details
-
configure
Description copied from class:PushingListenerAdapterinitialize listener and registerthisto the JNDI- Specified by:
configurein interfaceIConfigurable- Overrides:
configurein classPushingListenerAdapter- Throws:
ConfigurationException- in case it was not able to configure the component.
-
start
public void start()Description copied from interface:IListenerPrepares the listener for receiving messages.start()is called once each time the listener is started.- Specified by:
startin interfaceIListener<Message>- Overrides:
startin classPushingListenerAdapter
-
stop
public void stop()Description copied from interface:IListenerClose all resources used for listening. Called once each time the listener is stopped.- Specified by:
stopin interfaceIListener<Message>- Overrides:
stopin classPushingListenerAdapter
-
processRequest
Description copied from interface:ServiceClientMethod to implement for processing a request. This will usually delegate to aIListenerimplementation.
TODO: We may want to add the correlationId parameter back to this method, for cleaner calling and cleaner implementation.- Specified by:
processRequestin interfaceServiceClient- Overrides:
processRequestin classPushingListenerAdapter- Parameters:
message-Messageto processsession-PipeLineSessionof the request. If the request has a correlation ID, it should be put into this session.- Returns:
- Resulting
Message. - Throws:
ListenerException- Thrown if an exception occurs.
-
getLogPrefix
-
getPhysicalDestinationName
- Specified by:
getPhysicalDestinationNamein interfaceHasPhysicalDestination
-
setSoap
public void setSoap(boolean b) Iftruethe SOAP envelope is removed from received messages and a SOAP envelope is added to returned messages (SOAP envelope will not be visible to the pipeline)- Default value
- true
-
setServiceNamespaceURI
Namespace of the service that is provided by the adapter of this listener. If specified, requests posted to https://mydomain.com/ibis4something/servlet/rpcrouter that have this namespace in their body will be handled by this listener, where mydomain.com and ibis4something refer to 'your ibis'. -
setApplicationFaultsAsSoapFaults
public void setApplicationFaultsAsSoapFaults(boolean b) -
setAddress
The address to listen to, e.g the part <address> in https://mydomain.com/ibis4something/services/<address>, where mydomain.com and ibis4something refer to 'your ibis'. -
setSoapAction
SOAP Action to listen to. Requests sent to `/servlet/rpcrouter` which matches the soapAction will be processed by this listener. This is slightly different from the namespaceURI which routes messages based on the first element's namespace. -
setMtomEnabled
public void setMtomEnabled(boolean mtomEnabled) If set, MTOM is enabled on the SOAP binding -
setAttachmentSessionKeys
Comma separated list of session keys to hold contents of attachments of the request -
setMultipartXmlSessionKey
Key of session variable that holds the description (name, sessionKey, mimeType) of the parts present in the request. Only used if attachmentSessionKeys are specified- Default value
- multipartXml
-