Am trying to download file from SFTP using "Route via SSH22", this is successful if I call the service from API call using SOUP UI.
Now in Policy 2 I have tried to use Create Policy (Tasks --> Services 7 API's --> Create Policy) and assigned Policy Type as "Policy-Backed Service Operation Policy Fragment" and copied Policy 1 and tried to schedule it to run every 1 min. Now am getting error as "SSH routing error: Request is not initialized; nothing to route".
I could not move further due to this error and not understanding reason for this error.
Have attached my policy for reference.
Dear saivenkat ,
When you call a gateway service endpoint using soap UI, or any client, the soap UI build a request and sends to gateway, gateway route this request to the backend server.
When you run it as schedule task, there is no client to send the request, the default request variable is empty -- that means you will need to build the request in your policy before routing to backend server.
But, I don't see a reason why you download file by a schedule task? Even you retrieve the file successfully, you have no requestor(client) to return the response.
Thanks for replying, yes our plan is to pull the file from SFTP service without involvement of client. That was the reason I was trying to schedule this job.
However I could achieve my requirement by using Manage SFTP listener service :-)