Ask a Question

send empty optional element is request

Jacob_Hassing
Contributor

send empty optional element is request

e.g. i have a service that updates phone number for customers.
the phone element is optional
i would like to send a empty phone element in request, as this is the way we implemented functionallity to reset customer phone number.
how is this best done in SOAPUI ? do i have to make a event handler and replace some dummy data with empty ?? or is there a easier way ?
if event handler is the way to go, do you have an examble ?
4 REPLIES 4
SmartBear_Suppo
SmartBear Alumni (Retired)

Hello,

I may be misunderstanding your question, but is anything preventing you from simply sending the request with an empty element? You shouldn't require an event handler or anything like that.

Regards,
Dain
eviware.com

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Jacob_Hassing
Contributor

if i have a request i would like to send like this

 
     
        ${returned values#IdentityHandle}
       
        ${setupTestCase#EMAIL}
     

 


i fill it out in the form editor, but when sending the request, SOAPUI is deleting the            part of the request
Jacob_Hassing
Contributor

i found out you can make a empty dummyValue in a properties step, and then in the form editor specify ${properties#dummyValue}.
then it will send a empty element in request
SmartBear_Suppo
SmartBear Alumni (Retired)

Hello,

I was just writing a response suggesting you do this when I saw that you had figured it out for yourself. You may want to define a global property (in the soapUI Preferences) named "empty" or something simmilar, which you can then refer to using just ${empty}.

Regards,
Dain
eviware.com

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: