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 » Problem While Creating a XML Message

Post new topic  Reply to topic
 Problem While Creating a XML Message « View previous topic :: View next topic » 
Author Message
narendrach
PostPosted: Wed Nov 01, 2006 12:34 pm    Post subject: Problem While Creating a XML Message Reply with quote

Voyager

Joined: 29 Jun 2005
Posts: 78

Hi

i am facing a problem while creating a XML message

my requirement is i need to propagate the XML Message from compute node twice

i am trying to create a XML message by using following code
in Environment tree i am having value like this
Environment.msgStream=<MSG><Jv-Ins-Reinsurance Version="2005-1" xmlns="http://www.ACORD.org/standards/Jv-Ins-Reinsurance/2005-1">........</MSG>

CREATE LASTCHILD OF OutputRoot
DOMAIN 'XML' PARSE (FIELDVALUE(Environment.msgStream)
ENCODING InputRoot.MQMD.Encoding
CCSID InputRoot.MQMD.CodedCharSetId);

i am able to create the message with the above code

each time i am propagating from my compute node
i need to updated different the fields in message in different ways

i am able to succesfully propagate the 1 message

and when i am trying to build 2'nd XML message by the same statement as above
CREATE LASTCHILD OF OutputRoot
DOMAIN 'XML' PARSE (FIELDVALUE(Environment.msgStream)
ENCODING InputRoot.MQMD.Encoding
CCSID InputRoot.MQMD.CodedCharSetId);

the attributes in the xml tags are becoming the Elements

Message is

<Jv-Ins-Reinsurance Version="2005-1" xmlns="http://www.ACORD.org/standards/Jv-Ins-Reinsurance/2005-1">
first time i am trying to build the message it is working fine as

<Jv-Ins-Reinsurance Version="2005-1" xmlns="http://www.ACORD.org/standards/Jv-Ins-Reinsurance/2005-1">

and secound time when i am building the message the attributes of my tag are becoming as child elements as shown below

<Jv-Ins-Reinsurance>
<Version>2005-1</Version>
<xmlns>http://www.ACORD.org/standards/Jv-Ins-Reinsurance/2005-1</xmlns>


i can able to see the 2 messages in Queue where the first message is coming correct where the secound is coming with the problem.but i am not Handling or modifying any of the attributes in message

i am not doing any operations on the msgStream variable in the environment


i have see the message while debugging, when i am trying to create the message secound time it is giving the problem attributes are becoming the elements

Environment
OS Windows
Broker 5.0 FixPac - 6


Thanks
_________________
Narendra CH
Back to top
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Wed Nov 01, 2006 12:52 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Please only use the XMLNS domain on WBIMB v5.

Particularly for XML that has NameSpaces in it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
madi
PostPosted: Wed Nov 01, 2006 12:52 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

as i see it your output message is XMLNS domain and not XML

try parsing it as XMLNS and i think you should get the correct message

--madi
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Nov 01, 2006 12:57 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

On the second hand, though, if you are successfully propagating once, but not twice...

Then maybe you should change your code to add a call to CopyMessageHeaders after your PROPAGATE.

And don't forget to RETURN FALSE; too.

A usual PROPAGATE loop looks like

...
While <I still need to propagate>
CopyMessageHeaders
Adjust message, including headers if needed.
PROPAGATE;
end while
return false;
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Nov 01, 2006 2:13 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

narendrach,

Don't use the XML domain for new message flows. XMLNS is the best choice whether or not you are using namespaces.

Many users have complained about attributes turning into elements. Usually the tree has been copied to/from an environment tree which has no parser ( its root node was not CREATEd with the DOMAIN clause ).
In your case, it is only the bitstream that is stored in the environment, so that should be OK. Are you copying the message tree to/from the environment before you propagate?
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 » Problem While Creating a XML Message
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.