As APL+WebTransfer has been designed to work either as a com object or as a .Net assembly, it can be used in almost any programming language. This means that you can have data sent to your APL session from VB programs, .Net language programs, C++ programs, .asp and .aspx pages and much more. Additionally you can return data to those programs, all by simply calling a method.
APL to APL
APL+WebTransfer has been designed for the transfer of data between an APL session and APL+WebServices.
If we create a variable such as:
res„10 20 (10 10½›'test') 'what' (3 3½¼9)
It has historically been difficult to send this data structure over the Internet, as the Internet is designed to transfer only UTF8 text.
To make it possible to send this data structure, we use Microsoft’s Binary Serializer and Soap Serializer in APL+WebTransfer.
Using the Binary Serializer
So, to send this data to the APL+WebServices, we could write some code such as:
'wt' Œwi 'Create' 'APL2000.WebTransfer'
'wt' Œwi 'XOpen' 'http://localhost/'
'wt' Œwi 'XSendObject' '/complex' res
This will send the res variable. The XSendObject will automatically serialize the data using Binary serialization. In the APL+WebServices we could select a “rarg” for the /complex virtual path to have an input name of “data” with a type set to “binarywrapl”. In the APL session, the function called would see the original complex data structure as its right argument.

That is all that is required to transfer the complex data structure between APL sessions. To return a complex data structure to the client, set the result to apl2binarywrapl.

The client APL session will then see the complex data structure returned by the server APL session.
It is not required to have both the send and return be binary data. You could send text and return binary, or send binary and receive text. The APL+WebTransfer automatically does the serialization and deserialization of the data being transferred. So, the APL workspaces always see only the APL data.
This facility makes it possible to move large and complex data structures easily between an APL client workspace and an APL server workspace.
Additionally the transfer is very efficient, as the data being sent is smaller than the internal data representation in APL. This can also be used with the XASendObject to send and receive the data asynchronously. When using XASendObject the complex data returned from the server is in the “returnedObject” property.
C#, and other languages to APL, or APL to other languages!
It is also possible to send data from programs written in other languages to APL and return data to those programs.
You can use APL+WebTransfer to transfer data from VB applications, C#, J#, etc, and .asp and .aspx pages to your APL+WebServices server.
For instance in C# we would use:
WebTransfer dl = new WebTransfer();
dl.Open("http://localhost");
dl.CompleteCallback += new TransferCompleteHandler( DownloadCompleteCallback );
dl.DownloadProgressCallback += new DownloadProgressHandler( DownloadProgressCallback );
dl.UploadProgressCallback += new UploadProgressHandler( UploadProgressCallback );
object[] pd = new object[2]{3,"test"};
res = dl.SendObject("/echo",pd); // this will send the data synchronously
res = dl.ASendObject("/echo",pd); // this will send the data asynchronously
Virtually the same syntax would work for most other languages. So, if you have a client who needs to retrieve data from your server for an .asp or .aspx web page, you can have him use the APL+WebTransfer to facilitate the data transfer.
Your customer in this case will not have to learn anything new to move data to your server, or to receive data from your server. All you have to do is agree on the data to be sent back and forth.
This is an ideal way to share data with other programs and also to interact with .asp and .aspx pages.
APL data in SOAP
The APL+WebTransfer can also convert your APL data to SOAP. You can use this to transfer data between APL sessions, but as it is SOAP, it consumes significantly more memory than the original data. There are two methods that address creating SOAP from an APL variable. The first is XSendSoapObject for synchronous transfer and XASendSoapObject for transferring data asynchonously. The place where this is best applied is when you have a client who needs to receive the data as SOAP. If you would like to see what the SOAP looks like, you can use the XASendSoapObject to send the data, and then set the server to the entity-body type for the right argument to your function. The right argument of your function will be the raw SOAP sent from the APL+WebTransfer.