Forum Discussion

soapuiframework's avatar
soapuiframework
Occasional Contributor
12 years ago

Transfer Property

Hello,

I am new to SoapUI and I need some help regarding property transfer.

I have inserted test step Property Transfer to add a value from response to custom test suites properties.


<ns:HotelReservations>
<ns:HotelReservation>
<ns:ResGlobalInfo>
<ns:HotelReservationIDs>
<ns:HotelReservationID ResID_Type="23" ResID_Value="[color=#FF0000]${#TestSuite#ResID}[/color]"/>
</ns:HotelReservationIDs>
</ns:ResGlobalInfo>
</ns:HotelReservation>
</ns:HotelReservations>


I am having difficulties in parametrize the ResID. Could you please advise, whether I have put the correct formula under ResID_Value. Is this the right way to get the property?

Appreciate your help.

Best Regards,
Kam
  • soapuiframework's avatar
    soapuiframework
    Occasional Contributor
    Hi,

    Thank you for your reply. I have followed the same document to parameterize the data, but I am still unsuccessful.

    <ns:HotelReservationIDs>
    <ns:HotelReservationID ResID_Type="23" ResID_Value="${#Hotel Selection TestCase#ResID}"/>
    </ns:HotelReservationIDs>

    I am getting error response saying System.Web.Services.Protocols.SoapException: The 'ResID_Value' attribute is invalid - The value '' is invalid according to its datatype http://www.opentravel.org/OTA/2003/05:S ... ngth1to64' - The actual length is less than the MinLength value.

    It looks like to me that it is taking actual value entered in ResID_Value rather then taking parameter value from Hotel Selection TestCase property.

    Can you please advise how to parameterize an Attribute?

    Appreciate your help.

    Best Regards,
    Kam
  • It's not taking the expression as is, but it's trying to expand it - it's complaining that you're setting the attribute to an empty string. I think you should replace ${#Hotel Selection TestCase#ResID} with ${#TestCase#ResID}.

    Regards,
    Manne