Author |
Message
|
matuwe |
Posted: Sun Jan 18, 2015 11:14 pm Post subject: fileread reading ZIP FILE doubles the message size |
|
|
 Master
Joined: 05 Dec 2007 Posts: 296
|
HI
I am trying to read a zip file using FILE READ NODE.. and in my compute node I am trying to wrap the data as XML.. somehow when I write this into a queue I get the message size being doubled.. here is my flow
FILEREAD >> COMPUTE >> MQOUT
In my compute note I am trying to do
Code: |
SET OutputRoot.XMLNSC.DATA.version = '0.0';
SET OutputRoot.XMLNSC.DATA.payload.(XML.CDataSection) = InputRoot.BLOB.BLOB;
|
The input message size is 2662112 and when the message gets stored on the queue its 5MB.. Is broker doing any conversion of the BLOB? I am using broker 7.0.0.2 |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Jan 18, 2015 11:39 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The broker is most probably doing a binary to hex conversion...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
matuwe |
Posted: Sun Jan 18, 2015 11:44 pm Post subject: |
|
|
 Master
Joined: 05 Dec 2007 Posts: 296
|
Hi, Thanks for the response .. I thought that would happen on the FILEREAD node as the data is read in..
How can I stop it from doing more conversions... |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Jan 19, 2015 1:39 am Post subject: Re: fileread reading ZIP FILE doubles the message size |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
matuwe wrote: |
Code: |
SET OutputRoot.XMLNSC.DATA.version = '0.0';
SET OutputRoot.XMLNSC.DATA.payload.(XML.CDataSection) = InputRoot.BLOB.BLOB;
|
|
Please read the last post in this thread
http://www.mqseries.net/phpBB/viewtopic.php?t=38419&sid=433f4cf9fceeba48c807dfcab3c53dbb _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
matuwe |
Posted: Mon Jan 19, 2015 3:28 am Post subject: |
|
|
 Master
Joined: 05 Dec 2007 Posts: 296
|
Hi, Thanks again for the response.. The problem is not the CDATA.. I have tried it also with this line
Code: |
SET OutputRoot.XMLNSC.DATA.payload = InputRoot.BLOB.BLOB;
|
Also tried
Code: |
SET OutputRoot.BLOB.BLOB = InputRoot.BLOB.BLOB;
|
 |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jan 19, 2015 5:22 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I hope this is a typo:
Quote: |
SET OutputRoot.XMLNSC.DATA.payload.(XML.CDataSection) = InputRoot.BLOB.BLOB; |
You must only use XMLNSC field type constants with the XMLNSC domain.
About your problem:
You are assigning a BLOB ( a byte array ) to a field that is owned by the XMLNSC domain. XML is a text-based format. The only sane interpretation of your ESQL is 'please take my byte array, turn it into text and output it'. That is exactly what XMLNSC has done. Each byte has been converted into two single-byte hex digits in the output XML.
You cannot transmit binary data in an XML message without increasing the size. The size does not have to double, though. You can encode the BLOB as base64 text, and the size will only increase by 33%
The XMLNSC parser can do the base64 encoding for you:
http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ac67201_.htm _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
|