Forum Discussion

Miles's avatar
Miles
New Contributor
16 years ago

Property Transfer XPath Bug

SoapUI Pro 2.0.2 property transfer is not operating as expected when using XPath statements, as follows.

Example XML:

aaabbb

With above XML in a previous test case step, I can use property transfer:

//x[1]

to pass value to another property, say.

But, the result now has some spaces added. Result is:

  aaa  bbb

This has introduced unwanted spaces.

Problem is further compounded by XPath implementation used by SoapUI, which is sensitive to whitespace. That is, if the result is then transferred as above, with same XPath:

//x[1]

Result is just whitespace. Whenever there is whitespace between tags, XPath fails to return correct data.

Probably a bug. Any solution/workaround to this?

Cheers.

Miles.

4 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Miles,

    hm.. looks a bit like a bug to me.. is the xml part of a response message? Can you turn off pretty-printing to see if that makes a difference?

    regards,

    /Ole
    eviware.com
  • Miles's avatar
    Miles
    New Contributor
    Hi Ole,

    I tried switching off pretty print but to no avail.

    Can you think of any other way around the issue?

    Also, does SoapUI treat property values differently when using XML data as opposed to strings?

    Miles
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Miles,

    hmm.. I'll have to check this out in more detail.. soapUI shouldn't make any difference between properties containing xml or not.. sorry for the inconvenience..

    regards,

    /Ole
    eviware.com
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    thanks again, this was a bug that was pretty-printing the result of the property-transfer.. I've removed this for the next version..

    regards!

    /Ole
    eviware.com