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 » Creating XML with two root elements

Post new topic  Reply to topic Goto page Previous  1, 2
 Creating XML with two root elements « View previous topic :: View next topic » 
Author Message
sammy_910
PostPosted: Mon Apr 16, 2012 7:17 am    Post subject: Reply with quote

Apprentice

Joined: 16 Dec 2010
Posts: 33

Quote:
Code:
OutputRoot
XMLNSC
Root1
XMLNSC
Root2


As said by mqjeff...How would this be achieved?...I am actually not able to comprehend this.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Apr 16, 2012 7:17 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

sammy_910 wrote:
Tried using the MRM message domain and as suggested before by trying to create two OutputRoots.


If the answer to any XML problem is the MRM domain then that's not the answer.

You've been told about doing this with 2 XMLNSC domain OutputRoots and (against my expectations) it does work.

So we're down to the troubleshooting; what doesn't work? What errors do you get? Or is the problem that you're not getting the broken XML document the target system expects i.e.:

Code:
 
OutputRoot
     XMLNSC
           Root1
     XMLNSC
           Root2


not

Code:

OutputRoot
    XMLNSC
           Root1
           Root2


If the target system is expecting the latter, it's not expecting XML. It's expecting an XML-like format which WMB does not produce out of the box because it's custom for your site. Which brings us back to the MRM domain & troubleshooting whatever you've tried to bend the message to your will. Or migrating the custom Java from ICS.

Note that ICS had to use custom java code because this has never been valid XML & they should have pushed back in age old times.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Apr 16, 2012 7:19 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

sammy_910 wrote:
How would this be achieved?...I am actually not able to comprehend this.


By creating 2 domains in the OutputRoot via ESQL.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Apr 16, 2012 7:22 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Just to be clear, because I'm getting confused and not least by my own responses, what exactly does the target system want and how exactly does it differ from a "normal" XML document?

What about their requirement prevents you from outputing as many XML documents as you have root tags in your processing? Is this as simple as they want multiple XML documents (i.e. multiple root tags) but in a single file?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sammy_910
PostPosted: Mon Apr 16, 2012 7:32 am    Post subject: Reply with quote

Apprentice

Joined: 16 Dec 2010
Posts: 33

Quote:
what exactly does the target system want and how exactly does it differ from a "normal" XML document?



The Invalid (not well formed) XML document looks something like this :

<Customer><Surname>Hunter</Surname><CustomerNumber>0044384698</CustomerNumber></Customer><CustomerCard><Pan>32463781</Pan><CustomerNumber>0044384698</CustomerNumber><ExpiryDate>1212</ExpiryDate><CardType>15</CardType><Active>1</Active></CustomerCard>
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Apr 16, 2012 7:35 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Code:
Set OutputRoot.XMLNSC[1].Customer.Surname='Hunter';
Set OutputRoot.XMLNSC[2].CusotmerCard.Pan=32463781

etc.
Back to top
View user's profile Send private message
Esa
PostPosted: Mon Apr 16, 2012 7:52 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Excuse me, I made a mistake when I wrote 'two OutputRoots'.
I should have written 'two output bodies'.

That also explains why you had trouble with MRM. MRM needs infromation from OutputRoot.Properties and the scenario won't work unless both output bodies have exactly the same Message Set, Message Type and Message Format.

While it is possible to have two OutputRoots (at least if you use java), that does not produce the required output, in this case.

One of the strengths of Message Broker is that it is able to support all kinds of peculiar client applications that do not care about well-formedness and other annoying restrictions
Back to top
View user's profile Send private message
sammy_910
PostPosted: Mon Apr 16, 2012 8:07 am    Post subject: Reply with quote

Apprentice

Joined: 16 Dec 2010
Posts: 33

Thanks Everyone.

Learnt something new today
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Creating XML with two root elements
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.