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 » Strange problem about attributes ...

Post new topic  Reply to topic
 Strange problem about attributes ... « View previous topic :: View next topic » 
Author Message
ferloz
PostPosted: Mon Oct 10, 2005 4:58 am    Post subject: Strange problem about attributes ... Reply with quote

Novice

Joined: 26 May 2005
Posts: 23

Hi all,
i've a strange question about XML atrributes .
In the following input message the type attribute appear
in the mSwCriteriaA tag .

<Payload>
<mTaskRefS>mytask_2</mTaskRefS>
<mSwCriteriaA type="com.swift.inaws.swclasses.SwTaskCriterium">
.....

But after the MQINPUT node the XML seem to be the following one :

<mSwCriteriaA>
<type>com.swift.inaws.swclasses.SwTaskCriterium</type>
<mValueS>U</mValueS>

The properties of the node are :
Message domain XML
Message Set / Type / Format : blank.


Anyone can suggest where i'm wrong ?

Thanks

P.
_________________
fkid
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Oct 10, 2005 5:00 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You haven't read the documentation and understood the difference between the physical message and the logical message tree.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ferloz
PostPosted: Mon Oct 10, 2005 5:05 am    Post subject: Reply with quote

Novice

Joined: 26 May 2005
Posts: 23

Thanks i'll look in this direction.



Paolo
_________________
fkid
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Oct 10, 2005 5:07 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

XML.Attribute is merely a different physical format for a logical element.

If you used the Trace node and wrote out to a file, you'd see that the number before type was different than the number before Payload.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ferloz
PostPosted: Mon Oct 10, 2005 5:14 am    Post subject: Reply with quote

Novice

Joined: 26 May 2005
Posts: 23

Sorry again.

My "empasse" with the english language don't give me the capability to be clear as i want .

The problem i have is generate in a complex flow (i'm writing ) that take from an MQINPUT an xml message, create an envelope in XMLNS and imbed the <Payload> tag ( with it's structure ) into the message itself . After this "remap" reset the node content and write out the new message .

The two examples in the firt note of the topic are on the two edges ( in and Out).

Please accept my excuses if i was rude ..

Paolo
_________________
fkid
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Oct 10, 2005 5:21 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Nah. Excuse me for misunderstanding.

This is mostly simple.

Set the Input node to XMLNS - it will handle non-namespaced XML just fine (and the XML domain is being phased away).

Then write ESQL to create the output message you want, by creating new fields in OutputRoot and then copying from InputRoot. Use CopyMessageHeaders not CopyEntireMessage.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ferloz
PostPosted: Tue Oct 11, 2005 5:06 am    Post subject: Reply with quote

Novice

Joined: 26 May 2005
Posts: 23

Dear jefflowrey,
you gave me the right idea.

Following your suggestion i've inserted a trace node just after the MQInput node and another before the MQPut .

The results are in line with your first comment ( different record ID ) like this one ( post MQGet ) :

Quote:
(0x01000000):Payload = (
(0x02000000): = '
'
(0x01000000):mTaskRefS = (
(0x02000000): = 'mytask_2'
)
(0x02000000): = '
'
(0x01000000):mSwCriteriaA = (
(0x03000000):type = 'com.swift.inaws.swclasses.SwTaskCriterium'
(0x02000000): = '
'


For passing without problems thru the different stages i'm saving the input area in an environment variable .

You can see below the result :

Quote:


(0x01000000):Payload = (
(0x03000000):mTaskRefS = 'mytask_2'
(0x01000000):mSwCriteriaA = (
(0x03000000):type = 'com.swift.inaws.swclasses.SwTaskCriterium'
(0x03000000):mValueS = 'U'
(0x03000000):mOperatorS = 'EQL'
(0x03000000):mFieldNameS = 'DEAL_Deal_Status'
(0x03000000):mKeywordS = ''
)

and this is the code:
Quote:

if trim(InputRoot.XMLNS.ExchangeArea.Payload) <> '' then
set Environment.Variables.User.Payload = InputRoot.XMLNS.ExchangeArea.Payload;
else
set Environment.Variables.User.Payload[] = InputRoot.XMLNS.ExchangeArea.Payload[] ;
end if;


Can you suggest me where i've the bug.

thanks a lot in advance.

Paolo
_________________
fkid
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Oct 11, 2005 6:22 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

When you execute this line:

set Environment.Variables.User.Payload = InputRoot.XMLNS.ExchangeArea.Payload;

This does not copy the parser from the source to the destination. To make this work you must create an XMLNS (in your case) parser in the Environment tree, something like:

CREATE LASTCHILD OF Environment.Variables DOMAIN 'XMLNS' NAME XMLNS

The you can do something like:

set Environment.Variables.XMLNS.User.Payload = InputRoot.XMLNS.ExchangeArea.Payload;

you only need to do this once, as the top of the your XMLNS tree in the environment.


Regards,
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Strange problem about 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.