Forum Discussion

Jacob_Hassing's avatar
Jacob_Hassing
Contributor
15 years ago

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

  • SmartBear_Suppo's avatar
    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
  • 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
  • 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's avatar
    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