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 » Map MRM to XMLNSC with namespace

Post new topic  Reply to topic
 Map MRM to XMLNSC with namespace « View previous topic :: View next topic » 
Author Message
angka
PostPosted: Tue Jun 23, 2009 5:05 am    Post subject: Map MRM to XMLNSC with namespace Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

I checked through this forum and there is similiar question on this but I still did not figure out how to make this work.

I have a message coming in in fixed length format and i created the messge definition. I parsed the message to MRM in the MQ input node then the message go through a mapping node and map to XMLNSC and put to another queue. The message is in XML but without namespace. How do I add namespace to the xml content without using esql?

Thanks
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jun 23, 2009 6:43 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Use a JavaCompute node to add the namespace declarations.
You will need to use MbElement.setSpecificType( MbXMLNSC.NAMESPACE_DECLARATION ) to set the field type of the parent syntax element to the correct value.
Back to top
View user's profile Send private message
angka
PostPosted: Tue Jun 23, 2009 7:02 am    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

Is it possible to set it using the message set or the message definition?

Thanks
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jun 23, 2009 12:40 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

No. As I've explained many times on this forum, XMLNSC does not use *any* information from the physical format in the message set.
The only input to the XMLNSC writer is the message tree ( with the appropriate field types set for various types of XML construct ).
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jun 23, 2009 12:58 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

But the mapping node should read the XSD/message set at runtime and build statements to add the namespace if the message set/XSD says that an element needs a namespace.
Back to top
View user's profile Send private message
LazyBoy
PostPosted: Tue Jun 23, 2009 7:47 pm    Post subject: Reply with quote

Voyager

Joined: 04 May 2006
Posts: 78

AFAIK, You have to use Compute or Java Compute node to add the namespace.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jun 24, 2009 12:59 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Will people please stop saying 'namespace' when they mean 'namespace declaration'. They are not the same thing.
Every element in the message tree has a namespace ( which may be the empty string ). When an XML message is output, any non-empty namespaces must have corresponding namespace declarations ( xmlns attributes ) which control the prefix that is used.
The MRM parser uses the Namespace table in the message set to control the output of namespace declarations. The XMLNSC parser does not - you have to add them using ESQL/Java.
Back to top
View user's profile Send private message
angka
PostPosted: Tue Jul 14, 2009 3:13 am    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

kimbert wrote:
No. As I've explained many times on this forum, XMLNSC does not use *any* information from the physical format in the message set.
The only input to the XMLNSC writer is the message tree ( with the appropriate field types set for various types of XML construct ).


Then what is the use for the physical format?

Btw is there a way to remove those auto generated Namespace NS1 infront of all elements?

Thanks
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jul 14, 2009 3:31 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Then what is the use for the physical format?
The MRM XML parser uses it. But please don't use the MRM XML parser in new message flows.
Quote:
Btw is there a way to remove those auto generated Namespace NS1 infront of all elements?
Yes - you put namespace declarations ( xmlns attributes ) into the XMLNSC mesage tree.
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ac67194_.htm
Java code to do the same thing is discussed earlier in this thread. This is pretty basic stuff, by the way, and it has been discussed many times before.
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 » Map MRM to XMLNSC with namespace
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.