Package org.frankframework.http
Class WebServiceListener
java.lang.Object
org.frankframework.http.PushingListenerAdapter
org.frankframework.http.WebServiceListener
- All Implemented Interfaces:
HasSpecialDefaultValues
,HasPhysicalDestination
,IConfigurable
,IConfigurationAware
,IListener<Message>
,INamedObject
,IPushingListener<Message>
,IScopeProvider
,ServiceClient
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class WebServiceListener
extends PushingListenerAdapter
implements HasPhysicalDestination, HasSpecialDefaultValues
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'
- Author:
- Gerrit van Brakel, Jaco de Groot, Niels Meijer
-
Field Summary
Fields inherited from class org.frankframework.http.PushingListenerAdapter
log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize listener and registerthis
to the JNDIboolean
boolean
isSoap()
processRequest
(Message message, PipeLineSession session) Method to implement for processing a request.void
setAddress
(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'.void
setApplicationFaultsAsSoapFaults
(boolean b) void
setAttachmentSessionKeys
(String attachmentSessionKeys) Comma separated list of session keys to hold contents of attachments of the requestvoid
setMtomEnabled
(boolean mtomEnabled) If set, MTOM is enabled on the SOAP bindingvoid
setMultipartXmlSessionKey
(String multipartXmlSessionKey) Key of session variable that holds the description (name, sessionKey, mimeType) of the parts present in the request.void
setServiceNamespaceURI
(String string) Namespace of the service that is provided by the adapter of this listener.void
setSoap
(boolean b) Iftrue
the 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)void
start()
Prepares the listener for receiving messages.void
stop()
Close all resources used for listening.Methods inherited from class org.frankframework.http.PushingListenerAdapter
afterMessageProcessed, extractMessage, getApplicationContext, getConfigurationClassLoader, getName, isApplicationFaultsAsExceptions, isRunning, setApplicationContext, setApplicationFaultsAsExceptions, setExceptionListener, setHandler, setName, setRunning, toString, wrapRawMessage
-
Constructor Details
-
WebServiceListener
public WebServiceListener()
-
-
Method Details
-
configure
initialize listener and registerthis
to the JNDI- Specified by:
configure
in interfaceIConfigurable
- Specified by:
configure
in interfaceIListener<Message>
- Overrides:
configure
in classPushingListenerAdapter
- Throws:
ConfigurationException
-
start
public void start()Description copied from interface:IListener
Prepares the listener for receiving messages.open()
is called once each time the listener is started.- Specified by:
start
in interfaceIListener<Message>
- Overrides:
start
in classPushingListenerAdapter
-
stop
public void stop()Description copied from interface:IListener
Close all resources used for listening. Called once each time the listener is stopped.- Specified by:
stop
in interfaceIListener<Message>
- Overrides:
stop
in classPushingListenerAdapter
-
processRequest
Description copied from interface:ServiceClient
Method to implement for processing a request. This will usually delegate to aIListener
implementation.
TODO: We may want to add the correlationId parameter back to this method, for cleaner calling and cleaner implementation.- Specified by:
processRequest
in interfaceServiceClient
- Overrides:
processRequest
in classPushingListenerAdapter
- Parameters:
message
-Message
to processsession
-PipeLineSession
of 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:
getPhysicalDestinationName
in interfaceHasPhysicalDestination
-
setSoap
public void setSoap(boolean b) Iftrue
the 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'. -
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
-
getSpecialDefaultValue
public Object getSpecialDefaultValue(String attributeName, Object defaultValue, Map<String, String> attributes) - Specified by:
getSpecialDefaultValue
in interfaceHasSpecialDefaultValues
-
getDomain
- Specified by:
getDomain
in interfaceHasPhysicalDestination
-
isSoap
public boolean isSoap() -
getServiceNamespaceURI
-
getAddress
-
isMtomEnabled
public boolean isMtomEnabled() -
getAttachmentSessionKeys
-
getMultipartXmlSessionKey
-