Class XpathMessageProcessor
java.lang.Object
org.citrusframework.message.AbstractMessageProcessor
org.citrusframework.validation.xml.XpathMessageProcessor
- All Implemented Interfaces:
MessageDirectionAware,MessageProcessor,MessageTransformer,MessageTypeSelector
Processor implementation evaluating XPath expressions on message payload during message construction.
Class identifies XML elements inside the message payload via XPath expressions in order to overwrite their value.
- Author:
- Christoph Deppisch
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classFluent builder. -
Field Summary
Fields inherited from interface org.citrusframework.message.MessageProcessor
RESOURCE_PATH, TYPE_RESOLVER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the xPathExpressions.voidprocessMessage(Message message, TestContext context) Intercept the message payload construction and replace elements identified via XPath expressions.booleansupportsMessageType(String messageType) Methods inherited from class org.citrusframework.message.AbstractMessageProcessor
getDirection, getName, process, setDirectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.citrusframework.message.MessageProcessor
transform
-
Constructor Details
-
XpathMessageProcessor
public XpathMessageProcessor()Default constructor.
-
-
Method Details
-
processMessage
Intercept the message payload construction and replace elements identified via XPath expressions. Method parses the message payload to DOM document representation, therefore message payload needs to be XML here.- Overrides:
processMessagein classAbstractMessageProcessor
-
supportsMessageType
- Specified by:
supportsMessageTypein interfaceMessageTypeSelector- Overrides:
supportsMessageTypein classAbstractMessageProcessor
-
getXPathExpressions
Gets the xPathExpressions.- Returns:
- the xPathExpressions
-