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 » Decoding/Encoding base64 with MIME Parser

Post new topic  Reply to topic
 Decoding/Encoding base64 with MIME Parser « View previous topic :: View next topic » 
Author Message
GCal05
PostPosted: Tue Apr 14, 2009 11:01 am    Post subject: Decoding/Encoding base64 with MIME Parser Reply with quote

Newbie

Joined: 14 Apr 2009
Posts: 2

I'm taking in a multi-part message and using the MIME parsing Message Domain on the MQInput node. The part of the message containing the base64 encoded data (a pdf file) is getting decoded on parsing to a hexbinary string. I'm trying to use the XMLNSC base64 support options to re-encode it but it appears almost like it is encoding it a second time. However when I try to let it pass through as a BLOB it stays in hexbinary. Are there parameters or options I am missing?

Here are a few examples of code i have used to encode:

Example1:

DECLARE myBLOB BLOB;
SET myBLOB = InputRoot.MIME.Parts.Part[2].Data.BLOB.BLOB;
CREATE LASTCHILD OF document.doc:DocumentData
TYPE BITOR(XMLNSC.Field, XMLNSC.base64Binary)
NAMESPACE doc
NAME 'Data'
VALUE myBLOB;

Example 2:

DECLARE myBLOB BLOB;
SET myBLOB = CAST(InputRoot.MIME.Parts.Part[2].Data.BLOB.BLOB AS BLOB);
DECLARE base64FieldType INTEGER XMLNSC.Field + XMLNSC.base64Binary;
CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNSC' NAME 'Data';
CREATE LASTCHILD OF OutputRoot.XMLNSC TYPE base64FieldType NAME 'myBinaryData' VALUE myBLOB;
Back to top
View user's profile Send private message
GCal05
PostPosted: Tue Apr 14, 2009 12:42 pm    Post subject: Reply with quote

Newbie

Joined: 14 Apr 2009
Posts: 2

This has been solved. Turns out that the input node was not truly decoding it to hexbinary. It just needed to be casted to a CHARACTER and then SET to my XML element. So I truly was encoding it a second time.
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 » Decoding/Encoding base64 with MIME Parser
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.