0

I have a scenario where I want to write xml content to a file in SFTP. I want to set property to check the file size of the file that is being written. If the property is empty it means the file is not written and I would like to reprocess the file write operation. Is there a way I can set the file-size property after I write it using VFS? Below is my code to write to file.

 <call>
        <endpoint>
            <address uri="vfs:sftp://{username}:{password}@{host/path}">
                <timeout>
                    <duration>60000</duration>
                </timeout>
                <suspendOnFailure>
                    <initialDuration>1000</initialDuration>
                    <progressionFactor>2</progressionFactor>
                    <maximumDuration>60000</maximumDuration>
                </suspendOnFailure>
                <markForSuspension>
                   <retriesBeforeSuspension>3</retriesBeforeSuspension>
                    <retryDelay>1</retryDelay>
                </markForSuspension>
            </address>
        </endpoint>
    </call>
Ruby
  • 368
  • 1
  • 9

1 Answers1

1

There isn't such property you can set to do what you need. Generally if an error occurs while writing to the FTP it will throw a error and the call mediator would retry. If you want to do any additional validations you will have to implement some logic like, to read the file again and validate the content.

ycr
  • 12,828
  • 2
  • 25
  • 45