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 » XML Attributes converted in Fields on ESQL

Post new topic  Reply to topic
 XML Attributes converted in Fields on ESQL « View previous topic :: View next topic » 
Author Message
ipujals
PostPosted: Mon Feb 04, 2013 2:42 am    Post subject: XML Attributes converted in Fields on ESQL Reply with quote

Apprentice

Joined: 26 Jun 2012
Posts: 31

Hi experts,

I have a flow where I have an ESQL compute node in order to make some changes on the input message.

My input message has some attributes:

Code:
              <MSH>
                <MSH.1 LongName="Field Separator">|</MSH.1>
                <MSH.2 LongName="Encoding Characters">^~\&amp</MSH.2>
                <MSH.3 LongName="Sending Application">
                    <HD.1 LongName="Namespace ID">SOAPUI</HD.1>
                </MSH.3>

                <MSH.4 LongName="Sending Facility">

                    <HD.2 LongName="Universal ID">SOAPUI</HD.2>

                    <HD.3 LongName="Universal ID Type">L</HD.3>

                </MSH.4>

                <MSH.6 LongName="Receiving Facility">

                    <HD.2 LongName="Universal ID">SIAP</HD.2>

                    <HD.3 LongName="Universal ID Type">L</HD.3>

                </MSH.6>
                 (..........)


The problem is that the ESQL converts these attributes into fields. My outputMessage is:

Code:
<MSH>
   <MSH.1>|</MSH.1>
   <MSH.2>^~\&</MSH.2>
   <MSH.3>
    <LongName>Sending Application</LongName>
    <HD.1>SOAPUI</HD.1>
   </MSH.3>
   <MSH.4>
    <LongName>Sending Facility</LongName>
    <HD.2>SOAPUI</HD.2>
    <HD.3>L</HD.3>
   </MSH.4>
   <MSH.6>
    <LongName>Receiving Facility</LongName>
    <HD.2>SIAP</HD.2>
    <HD.3>L</HD.3>
   </MSH.6>


I have seen that attributes are created with XMLNSC.Attribute, but my input message is really huge to do it with every element.

Can anyone help me to mantain these attributes as an attributes and not as a fields?

thank you very much!
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Mon Feb 04, 2013 2:48 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Do you have formal message definition (message set) for your output message structure? Can you share snippet (contains appropriate parts to create output message and one attribute mapping) from your ESQL code?
Back to top
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Mon Feb 04, 2013 2:54 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There is a very simple and typical method of creating exactly this problem.

You are not properly copying the message tree from input to output.

You are copying it somewhere else, that DOES NOT HAVE an XMLNSC parser attached to it. That is when you are losing the attributes.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Feb 04, 2013 3:18 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

mqjeff may be correct - there are several threads on this forum where InputRoot.XMLNSC has been copied into the (Local)Environment tree but the (Local)Environment tree was not associated with the XMLNSC parser. That will lose the attributes.

It's also possible that the OP is performing the copy in a way that overwrites the parser-specific type ( maybe using CREATE and specifying the TYPE param ).
Back to top
View user's profile Send private message
ipujals
PostPosted: Mon Feb 04, 2013 9:09 am    Post subject: Reply with quote

Apprentice

Joined: 26 Jun 2012
Posts: 31

Oh yes...

I used LocalEnvironment not properly.

* please do not use * you very much! Newbie error I think

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 » XML Attributes converted in Fields on ESQL
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.