Forum Discussion

NKelly's avatar
NKelly
Occasional Contributor
13 years ago

Property Transfer drops leading zeros?

Hi,
Can someone help with this issue:

I have a JDBC request in my SoapUI Pro test case that goes to the database and retrieves serial numbers.
The xml response shows the serial numbers correctly - with leading zeros if applicable.
Example, the xml response would show the a serial number as: 012345674897
I then do a simple property transfer to a properties file to store the serial number for later use.
(ie. Source is the Response from the JDBC request which I used the "Get Data" function - "ResponseAsXml", found the row and select it and Target is a new field in a property file)
But when it transfers the data to the properties file it stores it as 12345674897 (drops the leading zeros).
Can anyone help with a way around this?
Thank you.

4 Replies

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

    NKelly wrote:
    [...] and Target is a new field in a property file)

    What do you mean that the target is a "property file"?

    Regards

    Henrik
    SmartBear Software
  • NKelly's avatar
    NKelly
    Occasional Contributor
    Hi,
    I am using a Property Transfer step
    Source: ${JDBC-GetSerialNumbers#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/CARD_SERIAL_NUM[1]}
    That transfers the above value to a Test Case Property step
    When I look at the value in the Test Case property step it has dropped the leading zero.
    Thank you in advance for your help.
  • NKelly's avatar
    NKelly
    Occasional Contributor
    Hi,
    Still having this issue - anyone have a solution?
    Thanks
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Sorry, we must have missed this topic

    I tried to reproduce the setup that you explained:



    For me, it doesn't strip the leading zero.

    Please have a look at my setup to see if it somehow differ from yours. You may also want to try to reproduce my simple scenario in a new TestCase in your soapUI. If not even that works, please try to update soapUI to 4.0.1.

    Does that solve your problem?

    Henrik
    SmartBear Software