Forum Discussion

Bryan_Nahrwold's avatar
Bryan_Nahrwold
Contributor
16 years ago

Property Transfer Failing

I am having trouble with a propertytransfer.

I have a TestSuite containing three test Steps, representing three operations:

ReportUsageData
GetUsageReport
RemoveUsageReport

ReportUsageData contains:

 

 
     
        jdoe
        mypassword
        <usage><feature id="1" version="8.1"><use count="0" dateTime="2004-03-05 18:34:17" version="8.1"/></use count></feature></usage>
     

 


ReportUsageData Respose produces a fileName like this:

 
     
        jdoemypassword2008-04-05-17-00-35.xml
     

 


Both GetUsageReport and RemoveUsagereport use the filename string generated by ReportUsageDataResponse:

The requests are:

GetUsageReport:


 

 
     
        jdoemypassword2008-04-05-17-00-35.xml
     

 



RemoveUsageReport:


 

 
     
       
     

 


I created two PropertyTransfers to move the out response from ReportUseageData to GetUsageReport and another to transfer this same value to RemoveUsageReport.

In both cases, the Source XPath is:

declare namespace ns1='http://amp.avocent.com/licensing';
//ns1:ReportUsageDataResponse[1]/ns1:out[1]

The first transfer Target XPath is:
declare namespace lic='http://amp.avocent.com/licensing';
//lic:GetUsageReport[1]/lic:usageReportFileName[1]

This first Property Transfer works.  I get:
GetUsageReportResponse
out

The Target XPath for the second Property Transfer is:
declare namespace lic='http://amp.avocent.com/licensing';
//lic:RemoveUsageReport[1]/lic:usageReportFileName[1]

The second Property transfer does not work.  The TestCase reports success, but when I look at RemoveUsageReport after the failure I see that the usageReportFileName was not populated by the PropertyTransfer.
As a result, the response is not success or failure but an HTTP ERROR: 500

Note: In the property transfer, both transfers are listed as "out", not sure if this is a problem.

Can you tell me what I am doing wrong? 

4 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    could you please try entering a dummy-value in the usageReportFileName element in the GetUsageReport request? ie something like

    to be replaced

    Maybe the PropertyTransfer requires an existing text to replace (which could be considered as a bug to fix..)

    regards,

    /Ole
    eviware.com
  • I'm not not sure if either PropertyTransfer is working.  I put "to be removed" in and when I run the test suite, GetUsageReport also fails with an ERROR HTTP:500, Premature end of file.

    When I look at the contents of the usageReportFileName, "to be removed" has been replace with 10 spaces. This does not correspond to either the size of the fileName which should have been transferred or the size of the test "to be removed". 

    Also, is there some kind of debug code which lets me see what is in the propertyTransfer duringe execution?  I'm finding this a very difficult environnment to debug.
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    it's hard to say exactly whats going on, can you send me the soapui project file so I can have a look myself?

    If you open the property-transfer window you can run the transfers manually, either one at a time or all at once; a log at the bottom of the window will show the exact values transfered (this is since soapUI 2.0)

    regards,

    /Ole
    eviware.com
  • Thanks for your help with this.  As it turns out, the source XPath of ReportUsageData was not getting generated with out[1].  I'm not sure what I did differently, but the failing transfer was missing this text. 

    Thanks