Forum Discussion

llittle's avatar
llittle
New Contributor
12 years ago

Property Transfer failing when "space' included in response

I am doing a property transfer. If all properties being transfered are single words (no embedded spaces) then all is fine. If a space is embedded however in the property response being transferred, then an error is thrown.

I am running soapUI Pro 4.5.2, Build Date: 20130522-1354

Here's is some sample output. The property transfer looks like this:

${FindProperty#Response#declare namespace ns2='http://propertysearch.addresscorrection.xxx.com/'; //ns2:findPropertyResponse[1]/return[1]/address[1]/streetName[1]}


Test started at 2013-10-18 10:53:34.136
Step 1 [DataSource] OK: took 2 ms
Step 2 [FindProperty] OK: took 560 ms
Step 3 [PropertyTransfer 1] OK: took 26 ms
-> Performed transfer [errorCode]
-> Performed transfer [blsPropId]
-> Performed transfer [status]
-> Performed transfer [city]
-> Performed transfer [state]
-> Performed transfer [zip]
-> Performed transfer [streetName]
-> Performed transfer [houseNumber]
-> Performed transfer [strType]
Step 4 [DataSink] OK: took 1 ms
Step 5 [DataSource Loop] OK: took 0 ms
-> Current row = 1
Step 6 [FindProperty] OK: took 717 ms
Step 7 [PropertyTransfer 1] FAILED: took 21 ms
-> Performed transfer [errorCode]
-> Performed transfer [blsPropId]
-> Performed transfer [status]
-> Performed transfer [city]
-> Performed transfer [state]
-> Performed transfer [zip]
-> Error performing transfer [streetName] - net.sf.saxon.trans.XPathException: XPath syntax error at char 9 in {MAJESTIC PINES}:
Unexpected token name "PINES" beyond end of expression
TestCase failed [Cancelling due to failed test step:com.eviware.soapui.impl.wsdl.teststeps.PropertyTransferException: net.sf.saxon.trans.XPathException: XPath syntax error at char 9 in {MAJESTIC PINES}:
Unexpected token name "PINES" beyond end of expression], time taken = 1327
  • llittle's avatar
    llittle
    New Contributor
    A little more information here. It appears there is a difference of behavior depending on how creates the association between property to be transferred. If I right click in the "association area" on the propertytransfer screen (where the xpath will appear) and select "get data" then associate the data from/to, an xpath is created but it looks very different and fails with the error previously stated. The xpath in this case looks liked this:

    ${FindProperty#Response#declare namespace prop='http://propertysearch.addresscorrection.intellireal.com/'; //prop:findPropertyResponse[1]/return[1]/address[1]/errorCode[1]}

    If I instead click on the the icon to the right of the the area where the xpath information will get populated (looks like a stack of books icon), then make the appropriate associations for the data (from/to), the xpath looks like the following and does work. Seems like a defect to me.

    declare namespace ns2='http://propertysearch.addresscorrection.intellireal.com/';
    //ns2:findPropertyResponse[1]/return[1]/address[1]/errorCode[1]
  • In property transfer you should define the name of the step and part of the test step (e.g. Response) that you are transferring that value from or to.

    When you generated the whole property expansion (http://www.soapui.org/Scripting-Propert ... nsion.html) then you are already pointing to the step and also doing that in the generated path with the following snippet:
    "${FindProperty#Response# ..."

    So you are actually hitting the expected behavior. If you were to reference that node somewhere else, then you would need the full path to the step and #Response.

    Hope my explanation makes sense. Thanks,
    Michael Giller
    SmartBear Software