Class BasicMessageFilter

  • All Implemented Interfaces:
    MessageFilter

    public class BasicMessageFilter
    extends Object
    implements MessageFilter
    This class populates a SOAP header and attachments in the WebServiceMessage instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doProcessSoapAttachments​(org.apache.camel.attachment.AttachmentMessage inOrOut, org.springframework.ws.soap.SoapMessage response)
      Populate SOAP attachments from in or out exchange message.
      protected void doProcessSoapHeader​(org.apache.camel.attachment.AttachmentMessage inOrOut, org.springframework.ws.soap.SoapMessage soapMessage)
      The SOAP header is populated from exchange.getOut().getHeaders() if this class is used by the consumer or exchange.getIn().getHeaders() if this class is used by the producer.
      void filterConsumer​(org.apache.camel.Exchange exchange, org.springframework.ws.WebServiceMessage response)
      Calls filter for a consumer
      void filterProducer​(org.apache.camel.Exchange exchange, org.springframework.ws.WebServiceMessage response)
      Calls filter for a producer
      protected void processHeaderAndAttachments​(org.apache.camel.attachment.AttachmentMessage inOrOut, org.springframework.ws.WebServiceMessage response)
      If applicable this method adds a SOAP headers and attachments.
      protected void processSoapHeader​(org.apache.camel.attachment.AttachmentMessage inOrOut, org.springframework.ws.soap.SoapMessage soapMessage)
      If applicable this method adds a SOAP header.
      protected boolean validHeaderName​(String name)
      Whether a header is valid
    • Constructor Detail

      • BasicMessageFilter

        public BasicMessageFilter()
    • Method Detail

      • validHeaderName

        protected boolean validHeaderName​(String name)
        Whether a header is valid
      • filterProducer

        public void filterProducer​(org.apache.camel.Exchange exchange,
                                   org.springframework.ws.WebServiceMessage response)
        Description copied from interface: MessageFilter
        Calls filter for a producer
        Specified by:
        filterProducer in interface MessageFilter
        Parameters:
        exchange - the exchange
        response - provided by the producer
      • filterConsumer

        public void filterConsumer​(org.apache.camel.Exchange exchange,
                                   org.springframework.ws.WebServiceMessage response)
        Description copied from interface: MessageFilter
        Calls filter for a consumer
        Specified by:
        filterConsumer in interface MessageFilter
        Parameters:
        exchange - the exchange
        response - provided by the consumer
      • processHeaderAndAttachments

        protected void processHeaderAndAttachments​(org.apache.camel.attachment.AttachmentMessage inOrOut,
                                                   org.springframework.ws.WebServiceMessage response)
        If applicable this method adds a SOAP headers and attachments.
        Parameters:
        inOrOut -
        response -
      • processSoapHeader

        protected void processSoapHeader​(org.apache.camel.attachment.AttachmentMessage inOrOut,
                                         org.springframework.ws.soap.SoapMessage soapMessage)
        If applicable this method adds a SOAP header.
        Parameters:
        inOrOut -
        soapMessage -
      • doProcessSoapHeader

        protected void doProcessSoapHeader​(org.apache.camel.attachment.AttachmentMessage inOrOut,
                                           org.springframework.ws.soap.SoapMessage soapMessage)
        The SOAP header is populated from exchange.getOut().getHeaders() if this class is used by the consumer or exchange.getIn().getHeaders() if this class is used by the producer. If .getHeaders() contains under a certain key a value with the QName object, it is directly added as a new header element. If it contains only a String value, it is transformed into a header attribute. Following headers are excluded:
      • doProcessSoapAttachments

        protected void doProcessSoapAttachments​(org.apache.camel.attachment.AttachmentMessage inOrOut,
                                                org.springframework.ws.soap.SoapMessage response)
        Populate SOAP attachments from in or out exchange message. This the convenient method for overriding.
        Parameters:
        inOrOut -
        response -