The step by step guide you posted above looks ok and should work, but I would like to make a couple adjustment.
When to use workspaces:
Omit step 2 as there is no need to have a workspace in this project example. A create workspace task is used to create a temporary file location within GoAnywhere to store files as they are being processed. Having the workspace gives you the ability to quickly clean up temporary files after other tasks has completed processing them. For example, if you were doing an HTTP download (instead of an upload), you could create a workspace to store the downloaded file in. Say the file you are downloading is a CSV file which we will store in the temporary workspace. After the download, you would have another task such as Read CSV to parse the downloaded file, followed by an SQL Task to insert the downloaded data into a database file/table. After all processing is completed, you could have a Delete Workspace Task to remove the temporary folder and clean up all working files.
HTTP Host attribute:
On step 5, the host name is simply the domain name or IP of the server you are connecting to. That field should contain nothing other than the 'mydomain' section of the URL. For example, if your URL you are posting to is http://www.linomasoftware.com/folder/upload.asp
, the host name field would contain only www.linomasoftware.com
. Having the full URL in this field could cause problems.
Instead of specifying the host name and other connection information on the Advanced tab, you could create an HTTP Resource (Resources -> HTTP Servers -> Add HTTP Server) and store your connection information there. The resource could then be selected on the Basic tab of the HTTP Task. Defining a resource gives you the ability to use this same server connection information (host name, user, password, etc...) across multiple projects and HTTP tasks without having to specify the connection information in the advanced tab each time. If you are simply setting up one project and will not use this HTTP server anywhere else, then specifying the information on the advanced tab is fine.
Post URI attribute:
In step number 7, the URI is the path to the target file or application on the server you are connecting to. So the URI field should only contain the path information after the domain name. So in the example http://www.linomasoftware.com/folder/upload.asp
, the URI would be /folder/upload.asp
What your project seems to be doing is making a connection to /login.asp
with the provided credentials. Then when the POST method is executed, it is establishing a whole new connection to the server to /upload.asp
. It is most likely re-authenticating when accessing upload.asp. By following the updated steps I posted below, you should be able to accomplish the same outcome with a single connection to the server.
I have updated your steps a bit and posted them below. I hope this explains/clears up a couple things about the HTTP task.
- Create a new project
- Add the HTTP task
- In the HTTP task, click on the Advanced tab
- For the HOST, specify the domain name of the target system. This should be either the domain name or IP address of the system. For example, 192.168.1.1 or http://www.linomasoftware.com. If the target web server requires authentication, specify the username and password.
- Within the HTTP task, add a POST element.
- For the POST element, In the URI field, put path on the server to the web application that will process the upload. This value is the rest of the URL after the domain name. In the case of the URL http://mydomain/folder/upload.asp, use the URI /folder/upload.asp
- Still in the POST element, add a FILE element.
- In the FILE element, type the path AND filename of the source file you are trying to transfer. The file must be locate on or accessible from the system where GoAnywhere is installed. For example, if GoAnywhere is running on an AS/400 and your file is on the IFS, specify a path similar to /FOLDER1/File1.csv