|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MRM-XML: "default rendering" problem |
« View previous topic :: View next topic » |
Author |
Message
|
sten72 |
Posted: Thu Oct 20, 2005 8:18 am Post subject: MRM-XML: "default rendering" problem |
|
|
Newbie
Joined: 20 Oct 2003 Posts: 7
|
I am porting an existing integration from CASP to WBIMBv5.0.
I am working with MRM-XML messages (I imported input and output message models from DTD) and I have a problem with XML attributes in output message.
**************** Example Field Input ******************
<Ordine cod_ord="1987632" qta_ordta="120"/>
*************** Output Results ***********
<Ordine cod_ord="1987632">
<qta_ordta>120</qta_ordta>
</Ordine>
****************************************
I use the following ESQL instruction to copy the input element to the corresponding output.
SET OutputRoot.MRM.Ordine.[]* = InputRoot.MRM.Ordine.[]*;
The problem is that the input and output DTD are different (in the output message the element "Ordine" has just a subset of the attributes of the "Ordine" in the input DTD).
In the specific case, the attribute "qta_ordta" is not present in the output model, so the "default" behaviour of the Broker is that the unknown attribute is rendered as an element, and not as an attribute (or in general, with the same rendering of the input).
Is there a way to copy the "unknown" elements with the same rendering they have in the input ?
Or a way to tell the broker the default rendering for a message-set ?
Thanks,
Antonio Formaggio _________________ IBM Italy
AMS IT Specialist |
|
Back to top |
|
 |
kimbert |
Posted: Wed Oct 26, 2005 1:12 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Antonio,
The MRM will assume that a syntax element is an XML element unless your message set requests that it be rendered as an XML attribute. The only exception is that self-defining attributes are always preserved as attributes via a name-mangling scheme.
You have two options:
1. Remove the definition of qta_ordta from the input message. This will cause 'qta_ordta' to be treated as a self-defining attribute. The MRM will prefix its name with '@' so that it remembers to output it as an attribute.
2. Add 'qta_ordta' to the output message set, and ask for it to be rendered as an XML attribute.
I realise that you probably knew about both options, but did not like either of them  |
|
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
|
|
|
|