New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

escapeXml() won't work with `,` in sub-XML #94

toschneck opened this Issue Apr 22, 2016 · 1 comment


None yet
2 participants

toschneck commented Apr 22, 2016

If the function escapeXML will be used with a content which contains an comma, the Function will get internal 2 Arguments if i set an Breakpoint and throw the Error Invalid function parameter usage! Missing parameter!


 if (CollectionUtils.isEmpty(parameterList) || parameterList.size() != 1) {
            throw new InvalidFunctionUsageException("Invalid function parameter usage! Missing parameter!");

        return StringEscapeUtils.escapeXml(parameterList.get(0));


 <VAL_IN>citrus:escapeXml('<VAL_IN >
                    <test>with , an error occurs</test>


com.consol.citrus.exceptions.InvalidFunctionUsageException: Invalid function parameter usage! Missing parameter!
    at com.consol.citrus.functions.core.EscapeXmlFunction.execute(
    at com.consol.citrus.functions.FunctionUtils.resolveFunction(
    at com.consol.citrus.functions.FunctionUtils.replaceFunctionsInString(
    at com.consol.citrus.context.TestContext.replaceDynamicContentInString(
    at com.consol.citrus.context.TestContext.replaceDynamicContentInString(
    at com.consol.citrus.validation.builder.StaticMessageContentBuilder.buildMessagePayload(
    at com.consol.citrus.validation.builder.StaticMessageContentBuilder.buildMessageContent(
    at com.consol.citrus.actions.ReceiveMessageAction.createControlMessage(
    at com.consol.citrus.actions.ReceiveMessageAction.validateMessage(
    at com.consol.citrus.actions.ReceiveMessageAction.doExecute(
    at com.consol.citrus.actions.AbstractTestAction.execute(
    at com.consol.citrus.container.Sequence.doExecute(
    at com.consol.citrus.actions.AbstractTestAction.execute(
    at com.consol.citrus.container.Parallel$

This comment has been minimized.

codemental commented Sep 13, 2016

This issue still appears when there are more comma "," characters. Like in this example:

                    <TEST_FIELD2>StatNo=9899, SeqNo=567</TEST_FIELD2>
                    <TEST_FIELD3>LinkStatNo=8988, LinkSeqNo=789</TEST_FIELD3>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment