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 » MRM XML Attribute Problem

Post new topic  Reply to topic
 MRM XML Attribute Problem « View previous topic :: View next topic » 
Author Message
Ramphart
PostPosted: Tue Jul 27, 2004 1:00 am    Post subject: MRM XML Attribute Problem Reply with quote

Disciple

Joined: 21 Jul 2004
Posts: 150
Location: South Africa, JHB

Work Done:
- I'm using WMQI 2.1 CSD 07 on Windows 2000.
- I've imported two XSD's into the MRM (Input and Output Msg)
- All the attribute fields are set to render as XMLAttribute (I've double checked this)

Input Message
<ProductList>
<Product PType="PType">
<Action>Action</Action>
<ProductID>ProductID</ProductID>
<ValidFrom>ValidFrom</ValidFrom>
<ValidUntil>ValidUntil</ValidUntil>
<ProductBarcode>ProductBarcode</ProductBarcode>
<ProductName></ProductName>
<Notes SeqNbr="SeqNbr" NoteType="NoteType">
<Note>This is a note</Note>
</Notes>
<TrackExpiryDate></TrackExpiryDate>
<DaysToTrade></DaysToTrade>
<DaysShelfLife></DaysShelfLife>
<LotSize></LotSize>
<Fragile></Fragile>
<TrackBatch></TrackBatch>
</Product>
</ProductList>


Mappings
SET "OutputRoot"."MRM"."Prod"."ProdType" = "InputBody"."Product"."PType";
SET "OutputRoot"."MRM"."Prod"."Action" = "InputBody"."Product"."Action";
SET "OutputRoot"."MRM"."Prod"."ProductID" = "InputBody"."Product"."ProductID";
SET "OutputRoot"."MRM"."Prod"."Notes"."NoteType" = "InputBody"."Product"."Notes"."NoteType";
SET "OutputRoot"."MRM"."Prod"."Notes"."SeqNbr" = "InputBody"."Product"."Notes"."SeqNbr";
SET "OutputRoot"."MRM"."Prod"."Notes"."Note" = "InputBody"."Product"."Notes"."Note";


Output Message PRODUCED
<?xml version="1.0"?>
<ProductList>
<Prod>
<ProdType>PType</ProdType>
<Action>Action</Action>
<ProductID>ProductID</ProductID>
<Notes NoteType="NoteType" SeqNbr="SeqNbr">
<Note>This is a note</Note>
</Notes>
</Prod>
</ProductList>


Output Message EXSPECTED
<?xml version="1.0"?>
<ProductList>
<Prod ProdType="PType">
<Action>Action</Action>
<ProductID>ProductID</ProductID>
<Notes NoteType="NoteType" SeqNbr="SeqNbr">
<Note>This is a note</Note>
</Notes>
</Prod>
</ProductList>


Problem
- The <ProdType>PType</ProdType> renders as an XML Element instead of the exspected <Prod ProdType="PType"> attribute although it is defined in the MRM to render as XMLAttribute.
- The <Notes NoteType="NoteType" SeqNbr="SeqNbr"> renders properly though.


Any ideas on why one attribute will appear as an element while all the other renders as expected?

Regards
_________________
Applications Architect
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jul 28, 2004 1:11 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The most likely reason is that 'ProdType' is being treated as self-defining . If the broker cannot match ProdType to an element in the model, there's nothing to tell it that ProdType is supposed to be rendered as an attribute.
Without seeing your model I cannot say for sure.

To see whether I'm right, set 'Type Content' on all Complex Types and Groups to 'Closed' and switch on validation in your message flow. If you start getting validation errors, make sure that your model matches your input message.
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 » MRM XML Attribute Problem
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.