Forum Discussion

fradebru's avatar
fradebru
New Contributor
16 years ago

How to escape ${...}

Hi,

I am trying to pass a velocity template via webservices to my server. Velocity uses exactly the same property mechanism as SoapUI.

The problem is now that when I try to pass a value ${myprop.value} SoapUI is trying to resolve that property (which is not present).

I did not find information on how to escape the $ or something like that.

Any hints?

Thanks in advance,
Franck
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Franck,

    thanks for pointing this out.. the upcoming nightly build will allow you to prefix the property-reference with an additional '$', which will make soapUI ignore it (and remove the superfluous $)..

    Alternatively we could add a request-level property to not expand properties in the request message at all.. what do you prefer?

    regards!

    /Ole
    eviware.com
  • fradebru's avatar
    fradebru
    New Contributor
    Hi Ole,

    Thanks for your answer.

    I would prefer the 2nd alternative, since I develop my Velocity templates in a separate editor and then I would like to copy/paste them into SoapUI. So, with one setting to disable property expansion would help me.

    I do think however that with this solution you limit yourselves. What if I would like to mix SoapUI property expansion and Velocity properties? In that case escaping the $ would be the best way to go.

    Anyway: I fixed the problem by defining (global) properties in SoapUI as follows:

    keya.valueb = ${keya.valueb}

    That works fine (althoug not highly convenient!)