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 » XML to String transformation

Post new topic  Reply to topic
 XML to String transformation « View previous topic :: View next topic » 
Author Message
AgentSmith
PostPosted: Wed Nov 19, 2003 8:36 pm    Post subject: XML to String transformation Reply with quote

Novice

Joined: 19 Nov 2003
Posts: 19

Hi friendz,
I have a situation where i have an XML input, i transform it into a Single string message by obtaining the data part of the XML message alone and put it into a Qu.
All i do is, I import a COBOL copybook and create a message set using the cobol elements. Then i use a MRM parser to convert the data inside XML to CWF format. To reset the message format, i use a ResetContentDescriptor Node in MRM domain which gives me my desired output string.
>>I was glad to find that if the data given in XML tags is shorter than the defined message set element's size, the RCD fills the remaining bytes with spaces.
>>But, on the other side, if the data length exceeds the length of the message set element, the exception "Field length is less than MaxLength" is obtained

I need to do something so that, if the data exceeds the length of the message set element, the unnecessary data is ignored.

Oh no! I can't use a substring command in the compute node to provide exact-length data(hardcoded) to the RCD, 'cos the length of the message set depends upon the COBOL copy book inported by the client, which may change anytime.

Please give me some suggestions in this regard ASAP.

Regards,
AgentSmith
Back to top
View user's profile Send private message
Missam
PostPosted: Thu Nov 20, 2003 9:00 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

This is a typical requirement you have,if you have your messageset changing by time.it is better to go for TDS rather than Fixed Length CWF.
if you get solution for your present requirement,i'll be glad to know that.
Yhanx
Sam
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Dec 02, 2003 6:48 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Can I ask what format the 'data' part of the XML message is in?
Is it text, or true binary data. Surely, either way you run the risk of getting badly-formed XML messages (because the data may contain '<' or some other XML reserved character).
Or is the data base64 encoded?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Dec 02, 2003 7:45 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Use a substring function. Hardcode the length.

AgentSmith wrote:
Oh no! I can't use a substring command in the compute node to provide exact-length data(hardcoded) to the RCD, 'cos the length of the message set depends upon the COBOL copy book inported by the client, which may change anytime.


When the copybook changes, change the hardcoded length.

If the copybook changes in any meaningful way, you're going to have to change your WMQI anyway!

You're going to have to reimport the copy book into a message set, and then deploy it. Deploying a changed or new message set has a bigger impact on production than deploying a changed message flow anyway. The message set requires a redeployment of the whole broker, rather than just a particular execution group. So you might as well change your message flow at the same time.

Or you could create a database table that contains the length of your message and look it up, instead of hardcoding the value.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
AgentSmith
PostPosted: Fri Dec 05, 2003 4:34 am    Post subject: Reply with quote

Novice

Joined: 19 Nov 2003
Posts: 19

IamSam, Sorry, I can't use TDS. Its not the right option for transforming XML data to String.

Kimbert, My data in XML is sure Text. I don't have any risks of getting badly-formed messages.

Jeff, I think i have to finally jump to ur idea. Anyways, i have to ask the client to use COBOL copybook. But, storing the lengths in database, caching them and using them is a better idea. I'll try to combine both these concepts and let u know the outcome. Thx anyways.
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 » XML to String transformation
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.