Forum Discussion

florian_schoepp's avatar
florian_schoepp
New Contributor
15 years ago

SOAP UI stripping Velocity-like placeholders in request: ${parameter}

Hello soapUI community,
in a SOAP-Request we want the clients to pass a string containing parameter placeholders which get parsed on the serverside. We use the Apache Velocity-Engine for parsing and though the format of the placeholders is e.g. ${user.name}.

It seems like soapUI is stripping this kind of placeholders.

XML-view:
<gam:htmlBody><![CDATA[Hello ${username}, 
${emailVerificationToken}]]>
</gam:htmlBody>

RAW-view:
<gam:htmlBody><![CDATA[Hello , 
]]>
</gam:htmlBody>


Does anyone knows how to prevent this stripping, or a workaround beside changing our placeholder format?

Thank you in advance!
Florian

3 Replies

  • Found out that soapUI does not strip the parameters when I use the shorter (still verlocity compatible) parameter format $user.username instead of ${user.username}.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    I'm glad you found a workaround. The reason that soapUI was stripping these "tags" is that they use the same syntax as Property Expansions in soapUI ("${property expression}"). Since there are no matching properties for the expansions, they instead become empty.

    Regards,
    Dain
    eviware.com
  • The workaround does not always work. For example for variable function calls like: ${variable}test

    Possible to disable the stripping if the parameter is not found?

    Thanks
    Andrew