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 » Blob to Meaning ful string conversion

Post new topic  Reply to topic
 Blob to Meaning ful string conversion « View previous topic :: View next topic » 
Author Message
er_pankajgupta84
PostPosted: Fri Nov 14, 2008 3:59 am    Post subject: Blob to Meaning ful string conversion Reply with quote

Master

Joined: 14 Nov 2008
Posts: 203
Location: charlotte,NC, USA

I am having 3 nodes in my flow:

MQInput -> Java compute --> soap request.

I am accepting a message from a queue and then using the payload of that message i am creating another message which i need to send to a web service.

The problem here is that the message that i receive from MQInput node has blob as payload and when i copy paste this in the other message (SOAP) and send it to a web service. The webservice will treat this blob characters as string.

I cannot use any RCD in the flow or do some parsing on the input queue.

The only option i can see is to convert blob payload back to readable and meaningful form so that i can send that message to soap request node.

I have tried the option of converting blob to Hex string using the below mentioned code:

byte[] b = inroot.getFirstElementByPath("BLOB/BLOB").getValue().getBytes();
String result = "";
for (int i=0; i < b.length; i++) {
result +=
Integer.toString( ( b[i] & 0xff ) + 0x100, 16).substring( 1 );
}

but the variable "result" is again meaningless for a webservice.

Can someone guide...
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
m4c0
PostPosted: Fri Nov 14, 2008 5:11 am    Post subject: Reply with quote

Novice

Joined: 07 Nov 2008
Posts: 17

I think I didn't understand. You receive a BLOB message from MQ. Is this message binary? If so, you need to encode it to pass to a WS. Try using base64.

BTW, what does the Java compute node do?
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Nov 14, 2008 5:15 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I cannot use any RCD in the flow or do some parsing on the input queue.
Why not? Please explain what the message flow is trying to do.
Back to top
View user's profile Send private message
er_pankajgupta84
PostPosted: Fri Nov 14, 2008 5:33 am    Post subject: Reply with quote

Master

Joined: 14 Nov 2008
Posts: 203
Location: charlotte,NC, USA

I resolved the problem aniways thanks...for your reply
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
m4c0
PostPosted: Fri Nov 14, 2008 5:41 am    Post subject: Reply with quote

Novice

Joined: 07 Nov 2008
Posts: 17

er_pankajgupta84 wrote:
I resolved the problem aniways thanks...for your reply


Ermm... Can you tell us how?
Back to top
View user's profile Send private message
rajeevreddy
PostPosted: Tue Dec 02, 2008 5:16 pm    Post subject: Reply with quote

Apprentice

Joined: 07 Sep 2004
Posts: 39

Can u explain how you have resolved the issue.
thx sashi
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 » Blob to Meaning ful string 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.