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 » Missing namespace declaration in output XML msg using MRM

Post new topic  Reply to topic
 Missing namespace declaration in output XML msg using MRM « View previous topic :: View next topic » 
Author Message
isaw
PostPosted: Tue Feb 19, 2008 12:44 am    Post subject: Missing namespace declaration in output XML msg using MRM Reply with quote

Apprentice

Joined: 09 May 2007
Posts: 45

Hi guys,

I've viewed several threads already for this but they haven't addressed my issue.

I'm using WMB 6.0.2. I'm trying to create an output XML message using an existing MRM set for XML format.

What's happening is my output XML is missing all the namespace declarations I defined in the messageSet.mset --> Namespace settings table.

Instead, the namespace declarations are appearing 'if and when needed' in the XML output.

For example, instead of seeing:

Code:
<MyOutMessage xmlns:cmn="aaa/bbb/ccc" xmlns:foo="xxx/yyy/zzz">
  <cmn:Header>
  ...
  </cmn:Header>
  <foo:Body>
  ...
  </foo:Body>
</MyOutMessage>


I'm seeing this:

Code:
<MyOutMessage>
  <cmn:Header xmlns:cmn="aaa/bbb/ccc">
  ...
  </cmn:Header>
  <foo:Body xmlns:foo="xxx/yyy/zzz">
  ...
  </foo:Body>
</MyOutMessage>


I have checked the messageSet.mset properties and the following is set:

Code:
Properties Hierarchy
  - Message Set
    - Default Wire Format = XML
    - Use namespaces = checked
  - Namespace settings
    - Namespace declarations
      - Namespace URI = aaa/bbb/ccc, Prefix = cmn
      - Namespace URI = xxx/yyy/zzz, Prefix = foo
    - Namespace schema locations = empty
    - Output Namespace Declaration = At Start of Document


Is this meant to be "automagical" or do i still need to set something in the OuputRoot.MRM or .Properties in order for the namespaces to appear in the ouput XML ?

The reason I'm using MRM and not XMLNSC is due to the powers that be -- it was decided early on that validation and ensuring the developers were coding to a predefined set that prevented them from straying with mislabeled tags, etc.

I'm not expecting anyone to just "give" me the answer and I'm happy to research -- I'm just a bit stuck as to where to look next. Everything that I have found which deals with output namespace declarations seems to be XML or XMLNSC related and sadly I can't use them. And as far as I can tell, I've adhered to the what the Online help and in-app help docs have said for ouput namespace decl's.

Thanks guys!
Back to top
View user's profile Send private message
AJStar
PostPosted: Tue Feb 19, 2008 1:03 am    Post subject: Reply with quote

Acolyte

Joined: 27 Jun 2007
Posts: 64

But your XML is still well-formed right!!! Just that the namespaces are included on demand.

Anyways... you can try setting the "Output Namespace Declaration" property to "At start of document" instead of "As required", in the .mset file.
_________________
Regards
AJ
Back to top
View user's profile Send private message
isaw
PostPosted: Tue Feb 19, 2008 2:19 am    Post subject: [FIXED] No namespace declaration in output XML msg using MRM Reply with quote

Apprentice

Joined: 09 May 2007
Posts: 45

Fixed. Gyah, this was a contact admin one. But it turns out it was a one liner in the ESQL:

Code:
CREATE LASTCHILD OF OutputRoot DOMAIN('MRM');


Had to explicitly tell the parser to use the MRM and not the defaulted XML.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Feb 19, 2008 2:53 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Always, always remember to specify the DOMAIN clause if you are going to copy a parser-created message tree into the environment. If you forget, all of the parser-specific field type info is zeroed during the copy. That causes all kinds of mayhem, and it is often very hard to diagnose.
Back to top
View user's profile Send private message
isaw
PostPosted: Tue Feb 19, 2008 6:41 am    Post subject: Reply with quote

Apprentice

Joined: 09 May 2007
Posts: 45

Exactly. It was a pain to resolve with such a basic fix!

Thx Kimbert -- it's the sort of error that you really do learn from!
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 » Missing namespace declaration in output XML msg using MRM
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.