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 IndexWebSphere Message Broker (ACE) Supportnamespace xmlns:xml is generated in output XML only in MB6.

Post new topicReply to topic
namespace xmlns:xml is generated in output XML only in MB6. View previous topic :: View next topic
Author Message
CuriCAT
PostPosted: Thu Apr 05, 2007 4:14 am Post subject: namespace xmlns:xml is generated in output XML only in MB6. Reply with quote

Voyager

Joined: 26 Sep 2006
Posts: 82

PROBLEM:

When I generate XML message by using Message Broker 6, it generates extra
XML namespaces xmlns:xml="http://www.w3.org/XML/1998/namespace" which is not
compatible with all the XML parsers. We need to remove that before putting
the message into output queue.

i am using MRM XML. I HAVE MESSAGE SET AND MSG DEFINITIONS for the output message.

If any one knows how to do avoid this (removing the particular namespace) please share with me.

removing it in ESQL is an option. is there any way to configure this it in MRM


my analysis on the problem :
----------------------------------

the namespace attribute(xmlns:xml="http://www.w3.org/XML/1998/namespace" ) is generated by the broker as per the XML specification to http://www.w3.org/TR/REC-xml-names/

"The prefix xml is by definition bound to the namespace name http://www.w3.org/XML/1998/namespace. It MAY, but need not, be declared, and MUST NOT be bound to any other namespace name. Other prefixes MUST NOT be bound to this namespace name, and it MUST NOT be declared as the default namespace"

Also, I have seen the below mentioned comments in a Technical forum http://www.thescripts.com/forum/thread177565.html
This one discusses the same problem what we are facing with IE.

xmlns:xml='http://www.w3.org/XML/1998/namespace' is the problem. This is
one piece of incompatibility brought to XML by XML namespaces. According
to original XML namespaces spec:

"The prefix xml is by definition bound to the namespace name
http://www.w3.org/XML/1998/namespace."
[http://www.w3.org/TR/REC-xml-names/#nsc-NSDeclared]

Apparently Microsoft's interpretation is "nobody can use xml as
namespace prefix, because it's bound by definition". We can see that
this interpretation is consistently implemented in all versions of MSXML
as well as in .NET.

Btw, recently XML Namespaces 1.1 clarified things a bit:
"The prefix xml is by definition bound to the namespace name
http://www.w3.org/XML/1998/namespace. It MAY, but need not, be declared,
and MUST NOT be undeclared or bound to any other namespace name."
[http://www.w3.org/TR/2004/REC-xml-n...4/#xmlReserved]

In ,my case, the problem can be if the receiving systems are developed by using .NET or Microsoft technologies the parser will throw an error. Otherwise the XML outputs generated by Message Broker are complains to XML specification.

FINALLY:

I HAVE TO REMOVE THIS ATTRIBUTE. CAN I DO IT IN MRM? is my question.

--------------------------------
Thanks in advance
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kimbert
PostPosted: Thu Apr 05, 2007 4:40 am Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Are you by any chance working with nthepak? Or is this just a coincidence? http://www.mqseries.net/phpBB2/viewtopic.php?t=36119
Back to top
View user's profile Send private message
CuriCAT
PostPosted: Thu Apr 05, 2007 5:23 am Post subject: Reply with quote

Voyager

Joined: 26 Sep 2006
Posts: 82

just a coincidence , Isn't it possbile to remove it in ESQL ?
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
jefflowrey
PostPosted: Thu Apr 05, 2007 5:24 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You could probably do it in ESQL by ASBITSTREAMing and then reparsing as XMLNSC and then removing the offensive namespace.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Apr 05, 2007 6:08 am Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
You could probably do it in ESQL by ASBITSTREAMing and then reparsing as XMLNSC and then removing the offensive namespace.
Well, you could. But I would not recommend it unless you were depending on an MRM-only feature. It would perform very badly indeed.
A better solution would be to build an XMLNSC tree. The style of an XMLNSC tree is very similar indeed to an MRM tree ( just an extra level at the top for the root tag).
Back to top
View user's profile Send private message
CuriCAT
PostPosted: Wed Apr 11, 2007 6:21 am Post subject: Reply with quote

Voyager

Joined: 26 Sep 2006
Posts: 82

I have done this way, this works for me.

By changing the XML wire format settings.

After creating the message set and adding the XML wire format to the message set, change the property “Output Namespace Declaration” under “Namespace settings” in XML wire format properties to use the value “As required” instead of the default value “As start of document”.

Following is the explanation of the values:

At start of document. Declarations for all of the entries in the Namespace schema locations table will be output as attributes of the message in the output XML document. The disadvantage of this option is that in some cases unnecessary declarations may be output.
As required. Declarations will only be output when required by an element or attribute that is in that namespace. The disadvantage of this option is that the same namespace declaration may need to be output more than once in the output XML document.


Thanks for you suggestions!
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kimbert
PostPosted: Wed Apr 11, 2007 11:26 am Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Thanks for publishing the workaround. I'll refer to this post if/when others hit this problem.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Apr 11, 2007 11:58 am Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Further to this: you can ask for fixes IC50606 and IC51074 if you want the problem fixed properly. Both fixes will be in the next WMB fix pack.
Back to top
View user's profile Send private message
dilse
PostPosted: Fri Apr 27, 2007 2:19 pm Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

Thanks CuriCat.

Had the same issue luckily had the workaround ready for me.

Thanks,
DilSe..
_________________
DilSe..

Take life as it comes..
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) Supportnamespace xmlns:xml is generated in output XML only in MB6.
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.