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 XML transformation in Custom Node(on Solaris)

Post new topic  Reply to topic
 BLOB to XML transformation in Custom Node(on Solaris) « View previous topic :: View next topic » 
Author Message
subhadra
PostPosted: Tue May 07, 2002 5:08 am    Post subject: Reply with quote

Newbie

Joined: 06 May 2002
Posts: 8

Hi,

I have created a custom node which takes BLOB as input and forms an XML tree which is routed to the output terminal.
The XML is created properly and it appears at the output Q when i run it on Windows.
But when the same thing is taken to soalris (with required porting) i am not getting the XML at the output node!
When i put a trace node inbetween the custom node and the output node i can see the XML getting formed.
But at the output node, the message length is 0.

Any setting needs to be done in the MQSI headers (Properties and MQMD. Tried putting XML as the Message format in the Properties structure. It didnt work)?

Thanx in advance,
Subhadra
Back to top
View user's profile Send private message
kirani
PostPosted: Tue May 07, 2002 12:29 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Could you please explain "required porting" here? You can try setting MQMD.Format to 'MQSTR' (MQSeries constant is MQFMT_STRING).
Why do you need a plug-in node to convert from BLOB to XML? ResetContentDescriptor node does the same thing for you.



_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
autorun
PostPosted: Wed May 08, 2002 11:07 am    Post subject: Reply with quote

Apprentice

Joined: 02 Feb 2002
Posts: 29

Greetings,

This confuse me all the time too, so would like to verify my understanding is correct or not.

RCD can be used to reset message domain from BLOB to XML, but it will never re-parse your message content from BLOB to XML, hence we (for those MQSI 2.0.2) need to do something to convert BLOB to XML. When message is being sent out to output queue, a correct parser will be invoked to create the actual output message, that's why we need RCD. Am I correct?

Best regards,
Autorun
Back to top
View user's profile Send private message Send e-mail
kirani
PostPosted: Wed May 08, 2002 2:04 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Autorun,

No this is not true. You can use RCD to convert message from one domain to another (XML to BLOB, BLOB to XML, BLOB to MRM, .....) provided Your message has correct data in it. MQSI/WMQI uses lazy parsing. RCD will not really parse your message, it will just change your message domain and set values (Message Set, Message Type and Message Format for MRM messages). The parsed tree will be created after you refer to your tree elements in any node down the line. MQSI will create parsed tree according to the values specified in the Message Domain,

Let's say you have a message flow as follows,
MQInput(Domain : BLOB)->RCD (DOMAIN to XML)->MQOutput

Now, even if you send an invalid XML message on input queue, your message will goto output queue. This happens because you never refered to parserd tree in your message flow so MQSI will not parse it. So how do you validate proper XML messages in your message flow? Well, to do this, you have to add a trace node (with ${Root}) within your message flow after RCD node. Now your message flow will look like this,

MQInput(out)->RCD(to XML)->Trace (default settings)->MQOutput

After doing this, your message is parsed at the Trace node itself. If an invalid XML message is sent, Trace node will throw and error indicating parsing error.

Hope this is clear now.


_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
subhadra
PostPosted: Thu May 09, 2002 6:27 am    Post subject: Reply with quote

Newbie

Joined: 06 May 2002
Posts: 8

Hi Kiran....
Thanx for the info on RCD...but i'm afraid it won't solve my problem.

In my custom node, i have to parse an input BLOB message, pick up some values from it, access a table and get some more values, and build up an XML tree based on some logic. (I basically copy the input mesg onto output mesg, detach the last child, which is "BLOB" and create a new node "XML"). The tree gets formed properly(i did a tree traversal before propagating it), and the trace node which i have after the custom node also shows the XML...but the output node rejects it and the message backs out to the failure Q. By 'required porting', i mean the conversions which need to be done on Solaris(coz the wide char set on Solaris, occupies 4 bytes!).

Pls let me know if u need any further info.
Regards
Subhadra
Back to top
View user's profile Send private message
kirani
PostPosted: Thu May 09, 2002 7:51 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Try connecting RCD in between your custom node and Trace node. In RCD Reset your Message domain to XML. Looks like the tree is not getting created properly, so it is failing at the MQOutput node.

_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
subhadra
PostPosted: Fri May 10, 2002 11:06 pm    Post subject: Reply with quote

Newbie

Joined: 06 May 2002
Posts: 8

Actually, i have now traced the problem, and have found out exactly WHICH call is failing, but am still clueless as to WHY it is failing(as it seems 2 work perfectly on Windows !)

A quick view of the logic i am using: I copy the input mesg to the output mesg tree, and detach BLOB, create XML in its place. Then i form ANOTHER message tree, and build up a tree structure under this(acc. to the functionality required). Once this second tree is done, i detach the first child(under Root), using cniDetach() and use cniAddAsLastChild() to attach this sub-tree to the main out msg tree. Now, this call seems 2 be failing for some reason ! (I cannot directly create this subtree under XML becoz of complications in the logic....i am re-using the sub-tree, etc...) I feel that probably cniAddAsLastChild cannot be used 2 attach sub-trees, as opposed 2 single syntax elements...is this so ?

Thanx and Regards
Subhadra
Back to top
View user's profile Send private message
kirani
PostPosted: Sat May 11, 2002 12:32 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

I think you can use cniAddAsLastChild to attach a sub-tree.
Posting your code here would help in debugging the problem.



_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
suneelsh
PostPosted: Sun May 12, 2002 7:58 am    Post subject: Reply with quote

Acolyte

Joined: 13 Apr 2002
Posts: 69
Location: Pune,India

I have tried RCD and it does nt work. In the aggregate node example after the aggregate reply node i have put a rcd. this converts from blob to xml. but it dosent work. I tried debugging it and the system went to a standstill. so i wrote a java plugin node that converts blob[hex] to xml[ascii].
Back to top
View user's profile Send private message Send e-mail
kirani
PostPosted: Mon May 13, 2002 5:28 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Are you talking about standard Aggregation message flow in "Using Control Center" manual? If so, Message generated by AggregateReply node cannot be output directly. You will have to prepare message in proper format (see Chapter 6 for more details). An exception may occur if you try to write this message directly to output queue.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
dnaren
PostPosted: Fri Jun 14, 2002 12:29 pm    Post subject: BLOB to XML transformation in Custom Node(on Solaris) Reply with quote

Apprentice

Joined: 10 Aug 2001
Posts: 45
Location: Charlotte, NC

suneelsh wrote:
I have tried RCD and it does nt work. In the aggregate node example after the aggregate reply node i have put a rcd. this converts from blob to xml. but it dosent work. I tried debugging it and the system went to a standstill. so i wrote a java plugin node that converts blob[hex] to xml[ascii].


I have tried RCD and it works

I am using RCD to switch between the message domains XML and BLOB.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
rahdilarum
PostPosted: Mon Oct 07, 2002 1:49 pm    Post subject: Reply with quote

Novice

Joined: 02 Mar 2002
Posts: 15
Location: Winston-Salem, NC

I Am using MQSI 2.0.1 and I don't have a whole lot expereince with the MQSI development. My background is network administration. I Am working on a problem where our business partner sends us data as BLOB too and we need to convert it to XML to be able to Publish the data to the broker. I thought the easiest thing to do would be to use RCD node and it didn't work. Did you over come your problem you mentioned in this message board? How do we write a message exit within MQSI like you said about the JAVA code you wrote. Any suggestions appreciated
Thanks,
Murali
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
kirani
PostPosted: Mon Oct 07, 2002 7:25 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Murali,
Before using RCD node to parse XML messages you should first create valid xml string from your input hex values using a Compute node. Could you give us an example of input and Output message here?
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
rahdilarum
PostPosted: Tue Oct 08, 2002 4:02 am    Post subject: Reply with quote

Novice

Joined: 02 Mar 2002
Posts: 15
Location: Winston-Salem, NC

Kiran, thanks for the quick reply and here is the string in HEX.

(0x1000000)BLOB = (
(0x3000000)UnknownParserName = 'MQSTR'
(0x3000000)BLOB = X'4953412a30302a202020202020202020
202a30302a202020202020202020202a5a5a2a3036383131333130303030303020202a5a5a2a474c4e4658555320202020202020202a
3032303932392a313031312a3a2a30303430332a3030303030303130392a302a502a3e7e47532a4f522a57414c4d4152542a474c4e43
5843412a32303032303932392a313031312a3130392a582a3030343033307e53542a3831362a303030317e4248542a303036352a3034
2a3230303230393239313030394e3030303030302a32303032303932397e4e312a46522a57414c2d4d4152542053544f5245532c2049
4e432e7e484c2a303030303030312a2a33357e4e312a43512a57414c2d4d4152542043414e41444120494e432a554c2a303638313133
313030303030307e4e332a3139343020415247454e54494120524f41447e4e342a4d495353495353415547412a4f4e2a4c354e203150
392a43417e5245462a444e532a323439373633313435303030307e484c2a303030303030322a303030303030312a33367e4e312a534e
2a57414c2d4d4152542053544f524520333635332a554c2a303638313133313030323938317e4e332a48575920343720262057454c57
4f4f4420524f41447e4e342a55584252494447452a4f4e2a2a43417e5245462a444e532a323439373633313435333635337e5245462a
53542a30333635337e44544d2a3030372a32303033303133307e4153492a322a3032317e484c2a303030303030332a30303030303031
2a33367e4e312a534e2a57414c2d4d4152542053544f524520333733392a554c2a303638313133313030323939387e4e332a524f5554
4520313136202620424c5644204a55545241537e4e342a564943544f52494156494c4c452a50512a2a43417e5245462a444e532a3234
39373633313435333733397e5245462a53542a30333733397e44544d2a3030372a32303033303133307e4153492a322a3032317e5345
2a32352a303030317e47452a312a3130397e4945412a312a3030303030303130397e0a'
)
)

Thanks,
Muralidhar Behara
--------------------------------------------
Sr. Systems Analyst
Saralee Corp.
CCNA, MCSE, A+ Certified
--------------------------------------------
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
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 XML transformation in Custom Node(on Solaris)
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.