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 » base64binary conversion problem

Post new topic  Reply to topic
 base64binary conversion problem « View previous topic :: View next topic » 
Author Message
vinod_sri
PostPosted: Tue Aug 28, 2007 8:00 am    Post subject: base64binary conversion problem Reply with quote

Apprentice

Joined: 10 Dec 2003
Posts: 42
Location: Atlanta

Hello Folks,

I have a problem converting a part of the incoming message from base64 to binary. The message is in TDS format defined in MRM domain. One of the options that I had tried are, I took the whole message as BLOB and converted into CHARACTER in the following manner

MqInput (Domain as BLOB) ----> Compute Node ----> MQOutput

the ESQL in the compute node written as

DECLARE cMessage CHARACTER;
SET cMessage = CAST(InputRoot.BLOB.BLOB AS CHARACTER CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);

CALL CopyMessageHeaders();
SET OutputRoot.XML.cMessage = cMessage;
PROPAGATE TO TERMINAL 0;

The result is an error saying, "Message Contain no data". It is not propagating anything to the Output queue.


Then, I was advised to use base64binary conversion. I have no clue how to use it. I have no idea how to code this. Do I need to use Java compute node to do this, or can I do it with ESQL code.


My incoming message looks like

MDWSSC1.153161804911017402221DSM014PNQ2007-06-04 17:45:09DSM014PNQ2007-06-04 17:45:08PG5vYnI+VEFTSyBOT1RFIFBST0ZJTEU6PC9ub2JyPg0KJnF1b3Q7UkVCIG11c3QgYWx3YXlzIGJlIHVwZGF0ZWQgaW4gUktEUyBhczogDQpQQVlBVCA9IEJPMg0KUHJpbnQgRnJ0IGxpbmUgPSZSBhcyBwcmludCA9IE4mcXVvdDsNCihQUkogUkVGOiBJTkRJQSBHRU5FUkFMIDExMDQwNyk8SFI+


But, following piece of message is coming in base64 format.

PG5vYnI+VEFTSyBOT1RFIFBST0ZJTEU6PC9ub2JyPg0KJnF1b3Q7UkVCIG11c3QgYWx3YXlzIGJlIHVwZGF0ZWQgaW4gUktEUyBhczogDQpQQVlBVCA9IEJPMg0KUHJpbnQgRnJ0IGxpbmUgPSZSBhcyBwcmludCA9IE4mcXVvdDsNCihQUkogUkVGOiBJTkRJQSBHRU5FUkFMIDExMDQwNyk8SFI+


Please give me an idea or solution for converting the base64 to binary. Please also provide me the code sample to understand the conversion. I really appreciate your help.

Thanks

Vinod.
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Tue Aug 28, 2007 1:31 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Please give me an idea or solution for converting the base64 to binary
Use Java. The MRM domain can do automatic base64 decoding, but only when you are parsing XML data.
There are well-known Java libraries available for base64 encoding/decoding. Five minutes with a browser and a search engine should find them.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Aug 28, 2007 2:59 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If you search around you should find some ESQL code for calling static java methods on com.ibm.broker.javacompute.Base64
_________________
I am *not* the model of the modern major general.
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 » base64binary conversion problem
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.