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 » IBM MQ API Support » Java Header structures.

Post new topic  Reply to topic
 Java Header structures. « View previous topic :: View next topic » 
Author Message
cameron
PostPosted: Fri Feb 18, 2005 8:13 am    Post subject: Java Header structures. Reply with quote

Newbie

Joined: 06 Feb 2005
Posts: 7
Location: Livingston, UK

C++, Cobol etc have structures that allow a message to be parsed and headers obtained easlily. Does java have objects that are do this? Is there any way to easily parse a message or is the only way to use the MQMessage class seek and getXXX()?

If not this means that I could write Java classes to accomodate this, however I am just checking with the experts to see if I am barking up the wrong tree.

All help will be greatly appreciated.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Feb 18, 2005 8:47 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It depends on the format of the data.

If the data is XMl, then you can use the JAXB framework to unmarshall the XML into a Java object.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
cameron
PostPosted: Fri Feb 18, 2005 12:09 pm    Post subject: Java Header structures. Reply with quote

Newbie

Joined: 06 Feb 2005
Posts: 7
Location: Livingston, UK

The data is in cwf format, guess I need to use the MQMessage class
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Feb 18, 2005 2:17 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Probably.

Especially if you are dealing with packed decimals.

But you should still be able to treat it as a bindings problem - and create a class that knows how to unmarshall from the format, and remarshall. This will allow you to treat the data as a Java bean, and only access getters and setters from everything else.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kirani
PostPosted: Sat Feb 26, 2005 11:56 pm    Post subject: Reply with quote

Jedi Knight

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

And if you already have Broker in your environent then you can use Broker to translate message from CWF to XML (or any other format).
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Java Header structures.
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.