Package com.consol.citrus.validation.xml
Class XpathPayloadVariableExtractor
- java.lang.Object
-
- com.consol.citrus.validation.xml.XpathPayloadVariableExtractor
-
- All Implemented Interfaces:
MessageProcessor,MessageTransformer,VariableExtractor
public class XpathPayloadVariableExtractor extends Object implements VariableExtractor
Class reads message elements via XPath expressions and saves the text values as new test variables. Implementation parsed the message payload as DOM document, so XML message payload is needed here.- Author:
- Christoph Deppisch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXpathPayloadVariableExtractor.BuilderFluent builder.
-
Field Summary
-
Fields inherited from interface com.consol.citrus.variable.VariableExtractor
RESOURCE_PATH, TYPE_RESOLVER
-
-
Constructor Summary
Constructors Constructor Description XpathPayloadVariableExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidextractVariables(Message message, TestContext context)Extract variables using Xpath expressions.Map<String,String>getNamespaces()Gets the namespaces.Map<String,Object>getXpathExpressions()Gets the xPathExpressions.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.consol.citrus.message.MessageProcessor
transform
-
Methods inherited from interface com.consol.citrus.variable.VariableExtractor
process
-
-
-
-
Method Detail
-
extractVariables
public void extractVariables(Message message, TestContext context)
Extract variables using Xpath expressions.- Specified by:
extractVariablesin interfaceVariableExtractor
-
getXpathExpressions
public Map<String,Object> getXpathExpressions()
Gets the xPathExpressions.- Returns:
- the xPathExpressions
-
-