Author |
Message
|
ipmqadm |
Posted: Wed Apr 18, 2007 1:34 pm Post subject: MQ Client for Windows get/put .tif files |
|
|
Acolyte
Joined: 18 Apr 2007 Posts: 68
|
I am attempting to send and receive TIFF images via an MQ 6.0 client on Windows. The supplied amqsputc and amqsgetc commands don't seem to work. I have been told (unofficialy) that the amqsputc and amqsgetc commands only work on ascii text files.
We also had to recompile the C source code for the 2 commands to increase the bufferspace which was set at 100 bytes.
Has ANYONE sent .tif images via an MQ client? If so how were you able to put/get the images across the serverconn?
Thanks for any assistance you experts can provide. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Apr 18, 2007 1:46 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
MQ treats the message buffer as a stream of bytes. As such, for the most part it does not care what the contents of the buffer are.
However, if you instruct MQ that the message buffer is character data, and you ask MQ to convert the data, either when you pass it across a channel or when you get it from the queue, then it will treat the message buffer as character data and perform character translation.
What this all means is that you need to change the line in the PUT program that assigns MQFMT_STRING to MQMD.Format, so that it assigns MQFMT_NONE instead. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ipmqadm |
Posted: Wed Apr 18, 2007 2:00 pm Post subject: |
|
|
Acolyte
Joined: 18 Apr 2007 Posts: 68
|
Thanks Jeff.
I'm assuming that the same will apply to the get command program as well. I will examine the source to the put command and the get command.
My ultimate goal is to be able to use the supplied amqsgetc and amqsputc commands to do the transfers instead of having to create some C or Java or .Net applications to do the transfers.
Your hint may help me.
Thanks... |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Apr 18, 2007 2:02 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
ipmqadm |
Posted: Wed Apr 18, 2007 3:04 pm Post subject: |
|
|
Acolyte
Joined: 18 Apr 2007 Posts: 68
|
Jeff,
I can't find the download for the File Transfer Application for the client or the server. Can you find it? |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Apr 18, 2007 3:48 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It's either already installed, or you need to do a custom install from your original media. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ipmqadm |
Posted: Wed Apr 18, 2007 6:28 pm Post subject: |
|
|
Acolyte
Joined: 18 Apr 2007 Posts: 68
|
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed Apr 18, 2007 11:06 pm Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
When I had to send file via MQ from my code I converted file to base64 data.
Code: |
Base64 base = new Base64();
byte[] base64value = base.encode(readbytes);
String base64content= new String( base64value, "UTF-8" );
System.out.println(fileName+" length:"+content.length());
this.sendMQ(queueOut,"<DATA><FILENAME>"+fileName+"</FILENAME><BASE64CONTENT><![CDATA["+base64content+"]]></BASE64CONTENT></DATA>");
|
What do you think about it ?
Is it a good idea ?
+ I can send additional info in one message
- data lrngth _________________ Marcin |
|
Back to top |
|
 |
|