The help for the SendObject method of APL+WebTransfer says that it returns a 2 element vector. The first element is a return code of 0 for success and 1 for error.
There's at least one case where I'm getting a -1 as the return code. If you open a connection to an existing machine, but on a port that isn't open (being listened to), you get back a -1.
'x' Œwi 'Create' 'APL2000.WebTransfer'
x
'x' Œwi 'XOpen' 'http://sprica1:6000'
0 opened
(rc msg)„'x' Œwi 'XSendObject' '/virtpath' 'some data'
rc
¯1
msg
error: System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server.
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult)
at System.Net.HttpWebRequest.GetRequestStream()
at APL2000.Utils.WebTransfer.WebTransfer.AplHttpClient(String urlu, Byte[] rawdata, Boolean ispost, String filename, Int32 os, Int32 c
ount)
at APL2000.Utils.WebTransfer.WebTransfer.SendObject(String path, Object data)
In the example above, sprica1 is a real machine on the network, but there's no process listening in on port 6000. You can use anything for the virtual path and data.
I'm not sure if this is a problem with the code (it should return 1) or with the help file (other return codes are possible).
-Brian