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 » Help with converting base64 encoded string from VB6

Post new topic  Reply to topic
 Help with converting base64 encoded string from VB6 « View previous topic :: View next topic » 
Author Message
wraymore
PostPosted: Mon Mar 03, 2008 8:03 am    Post subject: Help with converting base64 encoded string from VB6 Reply with quote

Centurion

Joined: 16 Aug 2005
Posts: 114
Location: Burlington, NC USA

WMB 6.0.0.3 on AIX 5.3

Message coming into broker from a queue that is populated by a Web Service that gets input from a VB6 application.

My message flow has successfully decoded the base64 string into a BLOB; however when I write this BLOB as a message to a queue for a down line server to process the data is still UTF-16(unicode; two-byte). How can I convert the character code set of the data to 819.

I have tried CAST(... AS BLOB CCSID OutputRoot.MQMD.CodedCharSetId) which 819, also MQRFH2.CodedCharSetId and MQRFH2.NameValueCCSID to no avail.

Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Mar 03, 2008 12:35 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

First you must cast the Blob as char giving it the correct char set for the incomming blob.
Then you can cast the char to a blob for the output giving the target CCSID.
You might want to set the target CCSID on OutputRoot.Properties and the MQRFH2.CodedCharSetId.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
broker_new
PostPosted: Mon Apr 21, 2008 6:08 pm    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

hey wraymore can you post the code how to post using the base64 encoding
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
wraymore
PostPosted: Tue Apr 22, 2008 12:32 pm    Post subject: Reply with quote

Centurion

Joined: 16 Aug 2005
Posts: 114
Location: Burlington, NC USA

Here is a snippet of code from my flow:

DECLARE DataAsBase64 CHARACTER;
DECLARE DataAsBLOB BLOB;


SET DataAsBLOB = CAST(FINALHEADER AS BLOB CCSID 1208);
SET DataAsBase64 = base64Encode(DataAsBLOB);

...
CREATE PROCEDURE base64Encode(IN source BLOB)RETURNS CHARACTER LANGUAGE JAVA
EXTERNAL NAME "com.ibm.broker.javacompute.Base64.encode";


This is taking a data string; casting as BLOB; and then envoking the built in javacompute.Base64 method.

To decode you just need to do the opposite operations.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Apr 22, 2008 4:11 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Note that XMLNSC has base64 support in v6.1
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 » Help with converting base64 encoded string from VB6
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.