Forum Discussion

bayoakioye's avatar
bayoakioye
Occasional Contributor
15 years ago

Excel DataSource fails when empty cells are transformed as Blank Values

When tests are executed using an Excel Datasource, SOAPUI treats each
cell with no enumeration value supplied as having Null values thus resulting in the SOAP request message failing validation.

By Default SOAPUI treats all empty cells in excel with no values supplied in the excel datasource as below:


 

   
   
   



Can SOAPUI transform empty Excel cells as with Null values:

Note: when the failed soap request is re-run in manual mode and validated, the outbound soap message sent after post manual validation is the above.

3 Replies

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

    hmm... I'm not really sure on what you want soapUI to do here.. can you show an example?

    regards,

    /Ole
    eviware.com
  • bayoakioye's avatar
    bayoakioye
    Occasional Contributor
    Hi,

    My Excel dataSource contains empty cells for the listed optional columns below:

    DatePurchased
    NewBuild
    AddressChanged
    ResidencyType
    ConstructionStartDate
    ConstructionEndDate

    The SOAP request message fails schema validation during execution as the request message reads each empty cell as Nill.


               
                   
                         
                   

               

               
               
               
               
               


    I've followed the advice provided on: http://www.eviware.com/blogs/oleblog/?p=768

    and created an Event handler for : RequestFilter.filterRequest with the
    script set to:

    context.requestContent = context.requestContent.replaceAll( "","" )
    context.requestContent = context.requestContent.replaceAll( "","" )
    context.requestContent = context.requestContent.replaceAll( "","" )
    context.requestContent = context.requestContent.replaceAll( "","")
    context.requestContent = context.requestContent.replaceAll( "","")
    context.requestContent = context.requestContent.replaceAll("","")

    This failed to replace the elements specified.

    I've executed the same test manually and this passed schema validation with the request message formatted as the optional elements are stripped off during
    formatting



    Can you help ?
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    hmm... what if you set the "Remove Empty Content" to true for this request.. does that help?

    regards,

    /Ole
    eviware.com