Class 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 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
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'
and for each response a multipart message is constructed if a 'multipart'-XML is provided in sessionKey specified by multipartXmlSessionKey.
Gerrit van Brakel, Jaco de Groot, Niels Meijer
  • Constructor Details

    • WebServiceListener

      public WebServiceListener()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      initialize listener and register this to the JNDI
      Specified by:
      configure in interface IConfigurable
      Specified by:
      configure in interface IListener<Message>
      configure in class PushingListenerAdapter
    • open

      public void open() throws ListenerException
      Description copied from interface: IListener
      Prepares the listener for receiving messages. open() is called once each time the listener is started.
      Specified by:
      open in interface IListener<Message>
      open in class PushingListenerAdapter
    • close

      public void close()
      Description copied from interface: IListener
      Close all resources used for listening. Called once each time the listener is stopped.
      Specified by:
      close in interface IListener<Message>
      close in class PushingListenerAdapter
    • processRequest

      public Message processRequest(Message message, PipeLineSession session) throws ListenerException
      Description copied from interface: ServiceClient
      Method to implement for processing a request. This will usually delegate to a IListener implementation.
      TODO: We may want to add the correlationId parameter back to this method, for cleaner calling and cleaner implementation.
      Specified by:
      processRequest in interface ServiceClient
      processRequest in class PushingListenerAdapter
      message - Message to process
      session - PipeLineSession of the request. If the request has a correlation ID, it should be put into this session.
      Resulting Message.
      ListenerException - Thrown if an exception occurs.
    • getLogPrefix

      public String getLogPrefix()
    • getPhysicalDestinationName

      public String getPhysicalDestinationName()
      Specified by:
      getPhysicalDestinationName in interface HasPhysicalDestination
    • setSoap

      public void setSoap(boolean b)
      If true 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
    • setServiceNamespaceURI

      public void setServiceNamespaceURI(String string)
      Namespace of the service that is provided by the adapter of this listener. If specified, requests posted to that have this namespace in their body will be handled by this listener, where and ibis4something refer to 'your ibis'.
    • setApplicationFaultsAsSoapFaults

      public void setApplicationFaultsAsSoapFaults(boolean b)
    • setAddress

      public void setAddress(String address)
      The address to listen to, e.g the part <address> in<address>, where and ibis4something refer to 'your ibis'.
    • setMtomEnabled

      public void setMtomEnabled(boolean mtomEnabled)
      If set, MTOM is enabled on the SOAP binding
    • setAttachmentSessionKeys

      public void setAttachmentSessionKeys(String attachmentSessionKeys)
      Comma separated list of session keys to hold contents of attachments of the request
    • setMultipartXmlSessionKey

      public void setMultipartXmlSessionKey(String multipartXmlSessionKey)
      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
    • getSpecialDefaultValue

      public Object getSpecialDefaultValue(String attributeName, Object defaultValue, Map<String,String> attributes)
      Specified by:
      getSpecialDefaultValue in interface HasSpecialDefaultValues
    • getDomain

      public String getDomain()
      Specified by:
      getDomain in interface HasPhysicalDestination
    • isSoap

      public boolean isSoap()
    • getServiceNamespaceURI

      public String getServiceNamespaceURI()
    • getAddress

      public String getAddress()
    • isMtomEnabled

      public boolean isMtomEnabled()
    • getAttachmentSessionKeys

      public String getAttachmentSessionKeys()
    • getMultipartXmlSessionKey

      public String getMultipartXmlSessionKey()