Class AbstractSoapAttachmentValidator
java.lang.Object
org.citrusframework.ws.validation.AbstractSoapAttachmentValidator
- All Implemented Interfaces:
SoapAttachmentValidator
- Direct Known Subclasses:
BinarySoapAttachmentValidator,SimpleSoapAttachmentValidator
public abstract class AbstractSoapAttachmentValidator
extends Object
implements SoapAttachmentValidator
Abstract SOAP attachment validator tries to find attachment within received message and compares
its attachment contentId, contentType and content body to a control attachment definition.
Validator will create a
SoapAttachment and automatically handle contentId and
contentType validation. Content body validation is delegated to subclasses.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SoapAttachmentfindAttachment(SoapMessage soapMessage, SoapAttachment controlAttachment) Finds attachment in list of soap attachments on incoming soap message.voidvalidateAttachment(SoapMessage soapMessage, List<SoapAttachment> controlAttachments) Validate attachments in soap message.protected abstract voidvalidateAttachmentContent(SoapAttachment receivedAttachment, SoapAttachment controlAttachment) Delegate content body validation to subclasses.protected voidvalidateAttachmentContentId(SoapAttachment receivedAttachment, SoapAttachment controlAttachment) Validating SOAP attachment content id.protected voidvalidateAttachmentContentType(SoapAttachment receivedAttachment, SoapAttachment controlAttachment) Validating SOAP attachment content type.
-
Constructor Details
-
AbstractSoapAttachmentValidator
public AbstractSoapAttachmentValidator()
-
-
Method Details
-
validateAttachment
Description copied from interface:SoapAttachmentValidatorValidate attachments in soap message. List of control attachments should be present and get validated.- Specified by:
validateAttachmentin interfaceSoapAttachmentValidator
-
findAttachment
Finds attachment in list of soap attachments on incoming soap message. By default uses content id of control attachment as search key. If no proper attachment with this content id was found in soap message throws validation exception.- Parameters:
soapMessage-controlAttachment-- Returns:
-
validateAttachmentContentId
protected void validateAttachmentContentId(SoapAttachment receivedAttachment, SoapAttachment controlAttachment) Validating SOAP attachment content id.- Parameters:
receivedAttachment-controlAttachment-
-
validateAttachmentContentType
protected void validateAttachmentContentType(SoapAttachment receivedAttachment, SoapAttachment controlAttachment) Validating SOAP attachment content type.- Parameters:
receivedAttachment-controlAttachment-
-
validateAttachmentContent
protected abstract void validateAttachmentContent(SoapAttachment receivedAttachment, SoapAttachment controlAttachment) Delegate content body validation to subclasses.- Parameters:
receivedAttachment-controlAttachment-
-