Forum Discussion

Optical_Image_T's avatar
Optical_Image_T
Occasional Contributor
10 years ago

Soap call strips parameter from macro

I am using SoapUI-Pro to send a soap call to our application for testing purposes. The format of the xml data is:

<SOAP-ENV:Body>
...
<value>#FormatStringDate(${ReportDate},"MM/dd/yyyy")</value>
...
</SOAP-ENV:Body>

The macro #FormatStringDate is used in our application with the two parameters that are passed in. The application will replace ${ReportDate} with the appropriate data and configure it according to the format string "MM/dd/yyyy" passed in along with it. However, when using SoapUI-Pro to make this web service call, the actual string that gets sent to our application is:

#FormatStringDate(,"MM/dd/yyyy")

and the ${ReportDate} parameter is stripped out. I have checked the setting for Remove Empty Content and it is set to false. The client program that uses this web service passes the macro correctly in its entirety.

1 Reply

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    Is the property you are using a global property? If not, then you are referencing that property wrong. The easiest way to get that property is to right click in the editor, select Get Data, and select the property you want.

    <web:FromCurrency>#FormatStringDate(${Properties#Account},GHC)</web:FromCurrency> replaced ${Properties#Account} with the correct value when I tried.


    Regards,
    Marcus
    SmartBear Support