Forum Discussion

yliliy's avatar
yliliy
Occasional Contributor
14 years ago

please help on transfer a value to a attibute

hi guys,

sorry i may not give a clear tilte for my question because i just start to use soapui for a week..
i need your kind help on this: here is a request , i wanna transfer value to msisdn from property instead of hardcode

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pm="http://xxxx">
<soapenv:Header/>
<soapenv:Body>
<pm:ACommand>
<pm:command><![CDATA[
<Order>
<GetSubscriptionInformation
Code="1111111111"
/>
</Order>]]>
</pm:command>
</pm:ACommand>
</soapenv:Body>
</soapenv:Envelope>

how to assign "1111111111" to Code?? Thank you!!
  • deepesh_jain's avatar
    deepesh_jain
    Frequent Contributor
    Here are the steps you need to take:

    1. Create a new properties step just before your request step and create a property there with some name.
    2. Assign it the value you are looking for to transfer.
    3. Go back to request, select the value ("111111111") and right click, select get value from, and select properties and the property name you created.

    It should work.

    Regards,
    Deepesh Jain
  • Hi,

    This seems to be bit more than what Deepesh replied above.
    Since your request/response data contain CDATA tag you need to remove that before applying the property transfer step. For the same you can either search the forum or soapui.org website or my blog ;-)

    Then create a simple testcase level property (or any other which way you are comfortable) and replace the msisdn with the following
    ${TestCase#myNewProperty}

    BTW, also replied to your mail.

    Best Regards,
    /Pradeep Bishnoi
    http://learnsoapui.wordpress.com
  • yliliy's avatar
    yliliy
    Occasional Contributor
    i met the problem :
    'no such property: submit for class'
    i am using soapui4 ..
    no idea
  • yliliy's avatar
    yliliy
    Occasional Contributor
    i am not able to make it work with groovy, but i got it work by creating property transfer steps ...:-)
    refer to this useful website:
    http://www.soapui.org/Functional-Testin ... cdata.html
    thanks for your guys help indeed...
    if anyone can make it in script , welcome! i think the logic should be same as by using property tranfering..