|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Can both XML and NEON parsers be used for same message ? |
« View previous topic :: View next topic » |
Author |
Message
|
MVO |
Posted: Wed Apr 17, 2002 5:27 pm Post subject: |
|
|
 Centurion
Joined: 09 Sep 2001 Posts: 131
|
Hi,
I'd like to know if we can use both XML and NEON parsers to parse a message (MQSI 2.0.2 and up, on Sun Solaris with DB2).
For example:
<Message>
<MessageHdr><f1>data1</f1><f2>data2</f2></MessageHdr>
<MessageBody>a formatted message</MessageBody>
</Message>
"a formatted message" is a character string having multiple fields, tag delimited by either <sp> or <cr>, some fields are optional, and they can be in any order. As far as I know, only NEON can handle partially parse this type of message. I always have problem with the delimiter being either <sp> or <cr>.
Can you help please ?
Thanks |
|
Back to top |
|
 |
kolban |
Posted: Wed Apr 17, 2002 7:46 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
Once you have a field extracted from the XML message, you can then apply a different parser (possibly NEON) to one of the fields. This can be done with the Reset Content Descriptor or the new CREATE FIELD ESQL statement. |
|
Back to top |
|
 |
MVO |
Posted: Thu Apr 18, 2002 4:51 am Post subject: |
|
|
 Centurion
Joined: 09 Sep 2001 Posts: 131
|
I thought the ResetContentDescriptor will reset the entire message, not just a field !!! Could you please tell me a little more on how the reset can be done on just one field. Very much appreciated !!! |
|
Back to top |
|
 |
kirani |
Posted: Thu Apr 18, 2002 11:03 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
CREATE FIELD ESQL is available only in wMQI 2.1
This is how you can do this in MQSI 2.0.2,
First parse the message as XML. In a compute node, extract the data from appropriate field (InputBody.Message.MessageBody) and send it as output message. Use ESQL like ..
SET OutputRoot."BLOB"."BLOB" = CAST(InputBody.Message.MessageBody AS BLOB);
Wire RCD node to the out terminal of this Compute node which parses incoming message to appropriate NEON format. You will not be able to refer to any other field except MessageBody in this path.
_________________ 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|