Author |
Message
|
sammy_910 |
Posted: Mon Apr 16, 2012 7:17 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Mon Apr 16, 2012 7:17 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Mon Apr 16, 2012 7:19 am Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Mon Apr 16, 2012 7:22 am Post subject: |
|
|
 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 |
|
 |
sammy_910 |
Posted: Mon Apr 16, 2012 7:32 am Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Mon Apr 16, 2012 7:35 am Post subject: |
|
|
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 |
|
 |
Esa |
Posted: Mon Apr 16, 2012 7:52 am Post subject: |
|
|
 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 |
|
 |
sammy_910 |
Posted: Mon Apr 16, 2012 8:07 am Post subject: |
|
|
Apprentice
Joined: 16 Dec 2010 Posts: 33
|
Thanks Everyone.
Learnt something new today  |
|
Back to top |
|
 |
|