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 » Problem with attributes

Post new topic  Reply to topic
 Problem with attributes « View previous topic :: View next topic » 
Author Message
Drakcir
PostPosted: Mon May 12, 2008 4:09 am    Post subject: Problem with attributes Reply with quote

Newbie

Joined: 12 May 2008
Posts: 3

Hi,

I have a problem with attributes in my message set. In debug mode they show up with an @-sign. eg. "@Qualifier". What does this indicate?
The select-block iterates through all elements, but wont find a match.

The following code works fine with another part of my message where the attributes don't show up as "@attribute".

Code:

SET OutPtr.InvoiceAmountTrans =   COALESCE(
THE(SELECT ITEM REF.fs:MonetaryAmount.fe:Amount
FROM InPtr.MonetaryAmounts[] AS REF
WHERE REF.Qualifier = 'InvoiceAmountTrans')
,'');


Help is very much appriciated
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Mon May 12, 2008 10:43 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Drakcir,

The @ symbol indicates the attributes in your msgset.

To access an attribute use
InputRoot.XMLNS.someNS:someTag.(XML.attr)<attributeName>

And if your attributes are not showing up as attributes in some part of the message, then that part is wrong, as the attributes must be coming as elements.

Regards.
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Mon May 12, 2008 11:25 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The MRM XML parser puts an @ on the front of self-defining attributes. If this is happening, it almost always means that your message definition is incorrect. If you are using v6.0 or later you will get warnings in the user trace about self-defining data.
If you are not using the MRM parser, please ignore this.

elvis: I don't think Drakcir is using the XMLNS domain.
Back to top
View user's profile Send private message
Drakcir
PostPosted: Mon May 12, 2008 12:27 pm    Post subject: Reply with quote

Newbie

Joined: 12 May 2008
Posts: 3

Thanks for your replies!

Kimbert, you are correct, I'm using the MRM domain.
The message set is created from an import of a XML Schema. A schema which I have created partly from an old schema. I have added repeating elements with attributes to distinguish them. But they don't seem to be working correctly.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon May 12, 2008 3:10 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

All very interesting, but if you want any more help you'll have to be a lot more specific.
- which version of WMB?
- what's the schema like?
- what's the instance document like?
Back to top
View user's profile Send private message
Drakcir
PostPosted: Tue May 13, 2008 9:53 pm    Post subject: Reply with quote

Newbie

Joined: 12 May 2008
Posts: 3

I'm using WMB 6.1.

I think I know what caused the problem. The message I used (a XML document) didn't match the message set and I forgot to validate the message. But one weird thing remains, two of the attributes in the message did not have @ in front of them.
Back to top
View user's profile Send private message
cjr8020
PostPosted: Tue Jan 20, 2009 6:33 pm    Post subject: Reply with quote

Newbie

Joined: 25 Sep 2006
Posts: 8

Having a similar issue.
runtime 6.0.0.8
toolkit 6.0.2

Working in MRM domain. I had trouble accessing XML attributes with ESQL code. Debuging showed that these attributes appeared with the '@' sign on the front. However, I don't understand why these attributes are treated as self-defining:
- these attributes are defined in the XSD that was used to generate the message set in use here
- I'm using the Validate node prior to the Compute where I'm accessing the attributes. This node is configured to check domain, set and type, and validate contents and value. The input passes validation.
- I can successfully validate the input message against the schema using another tool, say, XMLSpy.

I can certainly use the following syntax to access these attributes:
Code:
Element."@Attribute1"

however, I understand this is a workaround and would rather investigate why these attributes are perceived as self-defining.

Thanks
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jan 21, 2009 2:07 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Hard to say without detailed knowledge of your schema and XML doc. Have you taken a user trace?
Back to top
View user's profile Send private message
cjr8020
PostPosted: Wed Jan 21, 2009 6:05 pm    Post subject: Reply with quote

Newbie

Joined: 25 Sep 2006
Posts: 8

User trace showed that every element and attribute in the input message was self-defining. I then rebuilt the message set from scratch; and, of course, everything is good - nothing is self-defining any longer.

Still curious as to what might have caused it. About the only thing I did with the message set after it was created is that I updated it to reflect a change in the XSD by removing and recreating the corresponding message definition. But then again, this action has not caused this (self-defining) problem in the past.

Thanks again.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jan 22, 2009 12:58 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Glad it's working now. You will probably never find out what the problem was, but that's software for you. Probably a single-character error in the namespace URI or something like that.
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 » Problem with 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.