Forum Discussion
SOAP File transfers for backup .ucs files result in unreadable files that are bigger than they should be
The only thing I think is different with your code and the ones I wrote in the iControl CodeShare for ConfigSync is that the 3rd parameter in the call to download_configuration for file_offset is actually an IN/OUT value. The method updates the value with the original file_offset plus the length of the data returned in the FileTransferContext return value.
I'm not sure how bigsuds handles in/out variables. In perl/SOAP::Lite you must access it via the paramsout variable. https://devcentral.f5.com/wiki/iControl.PerlConfigSync.ashx.
In PowerShell (https://devcentral.f5.com/wiki/iControl.PsConfigArchiving.ashx) the code looks like this:
while($bContinue -eq 1)
{
$ctx = (Get-F5.iControl).SystemConfigSync.download_configuration($config_name, $chunk_size, [ref]$file_offset);
$w.Write($ctx.file_data, 0, $ctx.file_data.Length);
Write-Host "Bytes Transferred: $file_offset";
if ( ($ctx.chain_type -eq "FILE_LAST") -or ($ctx.chain_type -eq "FILE_FIRST_AND_LAST") ) {
$bContinue = 0;
}
}
You'll see that in there, the value returned in file_offset is what's passed into the next call.
For debugging on your end, I'd print to the console the values of file_offset and chunk_size before each call and make sure that fill_offset is incrementing by chunk_size correctly each it. So, if chunk_size is 100, the output should looks something like:
0, 100
99, 100
199, 100
299, 100
...
Hope this helps...
-Joe
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com