>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




Bug Reports

Author Thread: APL+WebTransfer: return code from XSendObject
Brian.Chizever
APL+WebTransfer: return code from XSendObject
Posted: Thursday, December 09, 2004 10:24 AM (EST)

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


Comments:

Author Thread:
Jairo.Lopez
APL+WebTransfer: return code from XSendObject
Posted: Thursday, December 09, 2004 10:28 AM (EST)

It is indeed an error in the documentation. The error code is always -1.

This will be fixed on the next release.

     



APL2000 Official Web Site

You must be the change you wish to see in the world.
--- Mahatma Ghandi

APLDN Home   |    |  Events   |  Trainings   |  APL Books   |  APLDN Links   |    |  Discussion Groups   |    |  Downloads   |  Articles   |  Library   |  Learning Tools   |  APLDN User IO   |  APL2000.com   |