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

Post new topic  Reply to topic
 Base64Binary Conversion « View previous topic :: View next topic » 
Author Message
Deepali
PostPosted: Thu Jul 25, 2013 11:40 pm    Post subject: Base64Binary Conversion Reply with quote

Novice

Joined: 05 Mar 2013
Posts: 19

Hi All,
We are putting base64binary data from input xml into an xml element of type string in outputroot. At this point the original base64binary data looks like hex binary format. Now in the receiver flow we want to convert the string element back to original base64binary.
We have tried different casts and encoding-decoding from help content. But not able to do the required. We are working on WMB v8.0.0.1
Any help is appreciated.javascript:emoticon('')
Thanks.
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Thu Jul 25, 2013 11:48 pm    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

Did you try to cast hex string first to BLOB and then decode it?

--
Marko
Back to top
View user's profile Send private message Visit poster's website
kimbert
PostPosted: Fri Jul 26, 2013 1:24 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
We are putting base64binary data from input xml into an xml element of type string in outputroot. At this point the original base64binary data looks like hex binary format.
That is ( probably ) because XMLNSC has decoded the base64Binary into a byte array. In the message tree, the field is an ESQL 'BLOB'. Put in a Trace node if you want to verify that.
Quote:
Now in the receiver flow we want to convert the string element back to original base64binary.
Here's one solution. Instead of fixing the receiver flow, modify this message flow so that it leaves the base64Binary data alone.
- open the input node properties
- find the 'Parser Options' section
- deselect 'Build tree using XML Schema types'.
This will cause the message tree to be built using CHARACTER types, and the base64Binary field will pass through the flow unchanged. Not sure whether that meets the requirements because you haven't told us very much about the rest of the flow...
_________________
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
Deepali
PostPosted: Fri Jul 26, 2013 3:23 am    Post subject: Reply with quote

Novice

Joined: 05 Mar 2013
Posts: 19

Thanks all,
for quick reply. The problem has been solved. We just put the input xml on Environment tree with 'XMLNSC' domain and it worked.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jul 26, 2013 3:37 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
The problem has been solved. We just put the input xml on Environment tree with 'XMLNSC' domain and it worked
That sounds like an over-complicated solution. Why do you need to put anything into the Environment tree?
_________________
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
mqjeff
PostPosted: Fri Jul 26, 2013 4:55 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kimbert wrote:
Quote:
The problem has been solved. We just put the input xml on Environment tree with 'XMLNSC' domain and it worked
That sounds like an over-complicated solution. Why do you need to put anything into the Environment tree?


It sounds actually like the original problem diagnosis was incorrect, that the flow has all along been copying data into Environment tree, but doing so incorrectly. And so the parser-specific information about the hex binary field was lost, and so when the field was put back into the output tree, it was no longer an XMLNSC hex binary field, it was just a plain character string. And thus corrupted on output.

So doing the right thing to copy the field in the first place corrected the actual problem, rather than trying to fix the wrong problem.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jul 26, 2013 6:10 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

@mqjeff: Well spotted - that's probably the explanation.
_________________
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 » Base64Binary Conversion
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.