I think the issue is passing the file contents (by-value vs. by-reference). Looks like I need to pass the file as a variable.

On Sunday, July 31, 2005, at 10:20  AM, Robert Garcia wrote:

If I understand right, you are saying you can read in a gif via a read action in TAF, but when you call through a TCF it doesnt work.

I have done this many times in taf, but not in tcf. Wondering, maybe the act of passing the binary data through the tcf interface, where it may only handle text and arrays, is screwing it somehow.

Something to try, when you read in the gif data in the tcf, before setting to out value, encode to base64. Then, when you read out when you call the method, decode it back. Does that work? Base64 encoding should have a fairly low overhead, or also try HEX. My guess is, if it is the interface that is the problem, one of those should solve.

--
Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://bighead.net/ - http://eventpix.com/

On Jul 30, 2005, at 2:38 PM, Bill Conlon wrote:

Robert,

Thx.  The problem is with a READ action within a TCF.

I've made a taf that first reads the GIF with a read action, and then correctly writes the length and file content with a Results Action. The taf then calls a method which which contains the same two actions -- the call method fails.

I'm preparing a test case with a stripped-down TCF. One problem could be with instantiating the object in my Application Scope, which doesn't work on 5.0.1.065 on Linux (only the default application stanza works). Maybe there are other problems with app scope.

Bill

On Friday, July 29, 2005, at 10:40  PM, Robert Garcia wrote:


I have done this many times in the past, how are you reading in the file? Maybe attach a simple taf that doesn't work?

-- Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://bighead.net/ - http://eventpix.com/

On Jul 29, 2005, at 2:38 PM, Bill Conlon wrote:


This definitely seems to be a problem reading binary data: Here's a hex dump of the first line:

0000: 47 49 46 38 39 61 28 00 28 00 F7 9F 00 97 97 97 GIF89a(¿(¿˜ü¿óóó

It looks like Witango is choking on the NULL (00). I've tried it with other file types and the READ action only stores up to the NULL.

So does anyone know how I can read a binary file? Or do I have to complete my action in another language (shell/perl/php script)?


On Friday, July 29, 2005, at 12:00  PM, Bill Conlon wrote:



Are there any tricks to reading a GIF or other binary data?

My log shows:

29/07/2005 11:29:09 66.219.95.118 [EMAIL PROTECTED] -1443935312 1 723 [File Action] Read_thumb 29/07/2005 11:29:09 66.219.95.118 [EMAIL PROTECTED] -1443935312 1 723 [Query] <@ASSIGN NAME=thumb VALUE="GIF89a(


Subsequently, I check the length of the file and it is indeed seven bytes long. Yet, I've confirmed the file is complete:

[EMAIL PROTECTED] ~]$ ls -al /tmp/vcs/*thumb.gif
-rw-rw-rw- 1 root root 1466 Jul 29 11:29 /tmp/vcs/6FB6C1AE0DF8BD7C42E9240D_thumb.gif
[EMAIL PROTECTED] ~]$ cat /tmp/vcs/6FB6C1AE0DF8BD7C42E9240D_thumb.gif
GIF89a((�������������������������������������������������������� �������������������������� ....

So it looks like it's choking on some binary data.

thx.

Bill
___________________________________________________________________ _____
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf




____________________________________________________________________ ____
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf




_____________________________________________________________________ ___
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf



______________________________________________________________________ __
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf



_______________________________________________________________________ _
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to