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 » loosing XML attributes

Post new topic  Reply to topic
 loosing XML attributes « View previous topic :: View next topic » 
Author Message
Sam Uppu
PostPosted: Mon Nov 01, 2010 10:55 am    Post subject: loosing XML attributes Reply with quote

Yatiri

Joined: 11 Nov 2008
Posts: 610

Hi Guys,

I am loosing XML attributes when I copy message to Environment variables.

The input messsage is

Quote:
<ProviderResponse xmlns="http://data.remotecontract.ipi.hcsc.com" xmlns:ns2="http://impl.ws.ipi.services.hcsc.com">
- <provider>
<type>A5</type>
<specialtyCode>079</specialtyCode>
..
...
...
</ProviderResponse>

When I save it in Environment variables I am getting the message as below


Quote:
<NS1:ProviderResponse xmlns:NS1="http://data.remotecontract.ipi.hcsc.com">
<xmlns>http://data.remotecontract.ipi.hcsc.com</xmlns>
<xmlns:ns2>http://impl.ws.ipi.services.hcsc.com</xmlns:ns2>
<NS1:provider>
<NS1:type>0E</NS1:type>


I am using below code to copy the tree.

Quote:
CREATE LASTCHILD OF Environment.Data DOMAIN 'XMLNS' NAME 'Provider';
SET Environment.Data.Provider= InputBody;




Let me know if I am going wrong anywhere. Thanks
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Nov 01, 2010 11:07 am    Post subject: Re: loosing XML attributes Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Sam Uppu wrote:
Hi Guys,

I am loosing XML attributes when I copy message to Environment variables.

The input messsage is

Quote:
<ProviderResponse xmlns="http://data.remotecontract.ipi.hcsc.com" xmlns:ns2="http://impl.ws.ipi.services.hcsc.com">
- <provider>
<type>A5</type>
<specialtyCode>079</specialtyCode>
..
...
...
</ProviderResponse>


At the risk of being fairly silly, I don't see any attributes in this message. Just tags. So what's being lost?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Sam Uppu
PostPosted: Mon Nov 01, 2010 11:09 am    Post subject: Re: loosing XML attributes Reply with quote

Yatiri

Joined: 11 Nov 2008
Posts: 610

Vitor wrote:
Sam Uppu wrote:
Hi Guys,

I am loosing XML attributes when I copy message to Environment variables.

The input messsage is

Quote:
<ProviderResponse xmlns="http://data.remotecontract.ipi.hcsc.com" xmlns:ns2="http://impl.ws.ipi.services.hcsc.com">
- <provider>
<type>A5</type>
<specialtyCode>079</specialtyCode>
..
...
...
</ProviderResponse>


At the risk of being fairly silly, I don't see any attributes in this message. Just tags. So what's being lost?


The namespaces are copied as elements under ProviderResponse.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Nov 01, 2010 11:21 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Do you see a sibling element named 'XMLNS'?
Back to top
View user's profile Send private message
Sam Uppu
PostPosted: Mon Nov 01, 2010 11:23 am    Post subject: Reply with quote

Yatiri

Joined: 11 Nov 2008
Posts: 610

yes
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Nov 01, 2010 11:31 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

that's your parser root element.
Back to top
View user's profile Send private message
Sam Uppu
PostPosted: Mon Nov 01, 2010 4:43 pm    Post subject: Reply with quote

Yatiri

Joined: 11 Nov 2008
Posts: 610

The message which I store in Environment tree has XMLNS domain assigned.
But the XML attributes are not retained by Environment tree. They are appearing as Elements.

Does Environment tree retain's XML attributes?
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Nov 02, 2010 1:32 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Can you post a trace node output showing your input message and the Envrionment please...
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Nov 02, 2010 1:34 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Silly question coming up. Are you sure that InputBody is actually InputRoot.XMLNS. Is it possible that you are using XMLNSC or some other parser?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Nov 02, 2010 1:57 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You have created an XMLNS domain root parser node at
Environment.Data.XMLNS
or possibly
Environment.Data.Provider.XMLNS

You are not assigning any children to it, you are only assigning children to
Environment.Data.Provider.
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Nov 02, 2010 2:33 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Quote:
You are not assigning any children to it, you are only assigning children to Environment.Data.Provider.


I disagree which is why I asked for a trace. If this code is what was actually used:

Quote:
CREATE LASTCHILD OF Environment.Data DOMAIN 'XMLNS' NAME 'Provider';
SET Environment.Data.Provider= InputBody;


Then the "Provider" element is itself owned by a parser of type XMLNS. There should not be a child XMLNS element in this case...


I suspect kimbert may be correct here, but the trace will tell all
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Nov 02, 2010 2:52 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

mgk wrote:
Quote:
You are not assigning any children to it, you are only assigning children to Environment.Data.Provider.


I disagree which is why I asked for a trace. If this code is what was actually used:

Quote:
CREATE LASTCHILD OF Environment.Data DOMAIN 'XMLNS' NAME 'Provider';
SET Environment.Data.Provider= InputBody;


Then the "Provider" element is itself owned by a parser of type XMLNS. There should not be a child XMLNS element in this case...


And yet, there is apparently an XMLNS element in the tree somewhere....
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 » loosing XML attributes
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.