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 » how to turn off xml parser in mqsi 2.1 in pubsub compute nod

Post new topic  Reply to topic
 how to turn off xml parser in mqsi 2.1 in pubsub compute nod « View previous topic :: View next topic » 
Author Message
beth_carlin
PostPosted: Tue May 16, 2006 3:27 pm    Post subject: how to turn off xml parser in mqsi 2.1 in pubsub compute nod Reply with quote

Acolyte

Joined: 08 Jun 2004
Posts: 64

Hi Gurus,

I have a very simple pub/sub message flow with a single compute node to pass
the entire InputBody to OutputRoot.XML and everything works great so far. However,
When I try to pass a well_formed and validated xml doc that has some entity reference of
&nbsp. The mqsi 2.1 XML parser will reject this

What I would like to know is :
Is there away that I can pass the data thru as it is without invoking the xml parser ?
page 238 of the eSQL manual shows the AsisElement example can be used but that
is for individual elements, How to do it for the entire OutputRoot.XML that is
how to change

SET OutputRoot.XML = InputBody;

without invoking the xml parser


MY brief and simple code is below:


----------------------------





DECLARE C INTEGER;
SET C = CARDINALITY(InputRoot.*[]);
DECLARE I INTEGER;
SET I = 1;
WHILE I < C DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
SET OutputRoot.MQMD.Format = 'MQHRF2 ' ;
Set OutputRoot.MQRFH2.(MQRFH2.Field)CodedCharSetId = 1208;
Set OutputRoot.MQRFH2.(MQRFH2.Field)Encoding = 546;
Set OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR ';

SET OutputRoot.MQRFH2.psc.Command='Publish';
DECLARE CNT INTEGER;
DECLARE TOPIC CHARACTER;
SET CNT = CARDINALITY(InputRoot.XML.*[]);
-- topic is the last root tag in the tree
SET TOPIC = FIELDNAME(InputRoot.XML.*[CNT]);
IF TOPIC = '' THEN
SET TOPIC = FIELDNAME(InputRoot.XML.*[CNT-1]);
END IF;

SET OutputRoot.MQRFH2.psc.Topic='application/testtopic/' || TOPIC;

SET OutputRoot.XML = InputBody;

---------------------------------------



THanks very much for all your help

Beth
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue May 16, 2006 3:36 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Because you have to access the last child of the XML tree to get the Topic, you can't avoid accessing the XML parser - because you have to invoke it to get that topic!

Unless you decide you can hand-parse the data in the BLOB domain using POSITION and SUBSTRING.

You should absolutely be planning your migration to at least version 5, too. Version 2.1. can't handle XML Namespaces, and is unsupported, and is in my opinion a risk to your organization to run that is more expensive than the cost of migration.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
beth_carlin
PostPosted: Wed May 17, 2006 12:40 pm    Post subject: turn off xml parsing Reply with quote

Acolyte

Joined: 08 Jun 2004
Posts: 64

Grand Master,
I am relatively new to this mqsi project...still trying to learn it
I appreciate your help very much. We are planning to migrate to WMB V6 very soon.

Would you please let me know if
1) WMB V6 will support xml Namespace ?

2) Assuming the input xml looks something like this

<topicname>
<name>John Smith </name>
<address> 123 Bell st </address>
</topicname>

If you have some time,
Could you teach me how the code I listed above in the compute node should be changed to using BLOB domain

Thanks YOU for all your help

Beth
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed May 17, 2006 1:24 pm    Post subject: Re: turn off xml parsing Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

beth_carlin wrote:
Grand Master,

That really just means that I've posted more than like 500 times.

beth_carlin wrote:
I am relatively new to this mqsi project...still trying to learn it
I appreciate your help very much. We are planning to migrate to WMB V6 very soon.

Good.

beth_carlin wrote:
Would you please let me know if
1) WMB V6 will support xml Namespace ?

Yes.

beth_carlin wrote:
2) Assuming the input xml looks something like this

<topicname>
<name>John Smith </name>
<address> 123 Bell st </address>
</topicname>

If you have some time,
Could you teach me how the code I listed above in the compute node should be changed to using BLOB domain

I'd use the POSITION function to find the place in the BLOB data where "<name>" was, and the place where "</name>" was. Then I'd substring between those to get the name. And the same with "<address>" and "</address>".
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
beth_carlin
PostPosted: Thu May 18, 2006 7:30 am    Post subject: THANK YOU grandmaster Reply with quote

Acolyte

Joined: 08 Jun 2004
Posts: 64

because you coined the word 'GrandMaster' therefore I'd like to address you that way....THANK YOU very much for your instructions

Beth
Back to top
View user's profile Send private message
mgk
PostPosted: Fri May 19, 2006 12:12 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

Quote:
because you coined the word 'GrandMaster' therefore I'd like to address you that way


Don't forget there are several "grand masters" who post on this forum, and using this title as a form of address could get very confusing!


Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
beth_carlin
PostPosted: Wed Jun 28, 2006 8:04 pm    Post subject: Re: turn off xml parsing Reply with quote

Acolyte

Joined: 08 Jun 2004
Posts: 64

Dear grand master jefflowrey,
I just asked another question subject " how to add a new field in the xml output msg in pubsub ?" if you have some free time I would appreciate your instructions.

Thanks
Beth Carlin
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 » how to turn off xml parser in mqsi 2.1 in pubsub compute nod
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.