ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » fileread reading ZIP FILE doubles the message size

Post new topic  Reply to topic
 fileread reading ZIP FILE doubles the message size « View previous topic :: View next topic » 
Author Message
matuwe
PostPosted: Sun Jan 18, 2015 11:14 pm    Post subject: fileread reading ZIP FILE doubles the message size Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Sun Jan 18, 2015 11:39 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
matuwe
PostPosted: Sun Jan 18, 2015 11:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Mon Jan 19, 2015 1:39 am    Post subject: Re: fileread reading ZIP FILE doubles the message size Reply with quote

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
View user's profile Send private message
matuwe
PostPosted: Mon Jan 19, 2015 3:28 am    Post subject: Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Mon Jan 19, 2015 5:22 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » fileread reading ZIP FILE doubles the message size
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.