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 » Need help on stripping the namespace on root element

Post new topic  Reply to topic
 Need help on stripping the namespace on root element « View previous topic :: View next topic » 
Author Message
cvag
PostPosted: Tue Mar 31, 2015 1:10 pm    Post subject: Need help on stripping the namespace on root element Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Hi,
Can you please help on stripping the namespace attributes on the root element.
We are having MB version 8.0.0.4

Message:
======
Quote:
<receiver xsi:type="ns2:gbs_customer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>
<first_name>ABC</first_name>
<last_name>XYZ</last_name>
</name>
</receiver>


But the output is creating as different:

Quote:
<receiver>
<xmlns:xsi>http://www.w3.org/2001/XMLSchema-instance</xmlns:xsi>
<xsi:type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">ns2:gbs_customer</xsi:type>
<name>
<first_name>ABC</first_name>
<last_name>XYZ</last_name>
</name>
</receiver>


Request your help on removing the namespace attributes on the root element "receiver" and the actual output should be

Quote:
<receiver>
<name>
<first_name>ABC</first_name>
<last_name>XYZ</last_name>
</name>
</receiver>






Thanks in Advance.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Tue Mar 31, 2015 1:29 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

did you get a chance to go through this

http://www.mqseries.net/phpBB2/viewtopic.php?t=33449
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Apr 01, 2015 2:27 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You must be copying InputRoot.XMLNSC into the environment tree. That's why the attributes are being converted to tags. You need to prepare the environment tree by using
Code:
CREATE LASTCHILD OF OutputLocalEnvironment.someFolderName Name 'myCopyOfTheInputXMLMesasage' DOMAIN 'XMLNSC';


But if your goal is to strip the namespaces then Gaya3 is correct - you need to recursively remove the namespace from every element in the message tree.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
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 » Need help on stripping the namespace on root element
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.