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 » namespace and mapping node

Post new topic  Reply to topic
 namespace and mapping node « View previous topic :: View next topic » 
Author Message
nize
PostPosted: Thu Oct 07, 2010 1:19 am    Post subject: namespace and mapping node Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

Hi,

I have developed a WSDL together with referenced XSDs. From the WSDL I generated a message set and deployed to a message flow. In the message flow I take the SOAP request and invoke a JMS service. The response from the JMS service is read by a MQGet node. I transform the response to SOAP using a mapping node. The SOAP response returned to the originating requester is correct. However, I would have liked to have a declaration of the namespace prefixes so that they dont need to be declared over and over again (see for example

Is there any way to do this in the mapping node or do I need to use a compute node? See this messy SOAP response!
Code:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <NS1:GetSparePartResponse xmlns:NS1="http://xmlns.rumbio.com/spareparts/contract/sparepart/v1">
         <SparePart>
            <NS2:PartId xmlns:NS2="http://xmlns.rumbio.com/spareparts/schema/sparepart/v1">1</NS2:PartId>
            <NS3:PartDescription xmlns:NS3="http://xmlns.rumbio.com/spareparts/schema/sparepart/v1">GROF</NS3:PartDescription>
            <NS4:SparePartWeight xmlns:NS4="http://xmlns.rumbio.com/spareparts/schema/sparepart/v1">1.389</NS4:SparePartWeight>
            <NS5:Suppliers xmlns:NS5="http://xmlns.rumbio.com/spareparts/schema/sparepart/v1">
               <NS5:MainSupplier>
                  <NS5:ShortSupplierId>9150</NS5:ShortSupplierId>
               </NS5:MainSupplier>
               <NS5:CurrentSupplier>
                  <NS5:ShortSupplierId>9150</NS5:ShortSupplierId>
               </NS5:CurrentSupplier>
            </NS5:Suppliers>
            <NS6:CurrentWareHouse xmlns:NS6="http://xmlns.rumbio.com/spareparts/schema/sparepart/v1">
               <NS6:CWStatus>1</NS6:CWStatus>
               <NS6:StockBalance>0</NS6:StockBalance>
               <NS6:IntroductionDate>
                  <NS7:Year xmlns:NS7="http://xmlns.rumbio.com/common/schema/time/v1">1996</NS7:Year>
                  <NS8:Month xmlns:NS8="http://xmlns.rumbio.com/common/schema/time/v1">6</NS8:Month>
               </NS6:IntroductionDate>
            </NS6:CurrentWareHouse>
            <NS9:SubstitutionInformation xmlns:NS9="http://xmlns.rumbio.com/spareparts/schema/sparepart/v1">
               <NS9:SubstitutionCode>0</NS9:SubstitutionCode>
            </NS9:SubstitutionInformation>
            <NS10:Purchaser xmlns:NS10="http://xmlns.rumbio.com/spareparts/schema/sparepart/v1">
               <NS10:PurchaserId>R2D2</NS10:PurchaserId>
               <NS10:PurchaserName>Mick</NS10:PurchaserName>
            </NS10:Purchaser>
            <NS11:SparePartDeveloper xmlns:NS11="http://xmlns.rumbio.com/spareparts/schema/sparepart/v1">
               <NS11:SparePartDeveloperCode>4</NS11:SparePartDeveloperCode>
               <NS11:SparePartDeveloperName>Ray</NS11:SparePartDeveloperName>
            </NS11:SparePartDeveloper>
         </SparePart>
      </NS1:GetSparePartResponse>
   </soapenv:Body>
</soapenv:Envelope>
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Oct 07, 2010 4:38 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You need a Compute node.
Back to top
View user's profile Send private message
nize
PostPosted: Thu Oct 07, 2010 4:50 am    Post subject: Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

Thanks! Does this mean that people doesn't bother of having multiple prefix declarations or does it mean that people tend to use compute nodes?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Oct 07, 2010 5:14 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

nize wrote:
Thanks! Does this mean that people doesn't bother of having multiple prefix declarations or does it mean that people tend to use compute nodes?


It means that the mapping node is responsible for the way your message is being output, and does not provide the level of control over the message structure that you're looking for, and thus you need to use a compute node to accomplish your design. Because the compute node *does* provide the level of control you're looking for.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Oct 07, 2010 5:32 am    Post subject: Reply with quote

Grand High Poobah

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

nize wrote:
does it mean that people tend to use compute nodes?





_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Oct 07, 2010 7:06 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

nize wrote:
Thanks! Does this mean that people doesn't bother of having multiple prefix declarations or does it mean that people tend to use compute nodes?

It means that XML does not care about single or multiple definition of the name space as it makes no difference to a machine driven parser/serializer.

It is us poor humans, who are looking for a more simple way.
Follow mqjeff's advice.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Oct 07, 2010 8:39 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

fjb_saper wrote:
Follow mqjeff's advice.

Kimbert's advice.

My explanation.
Back to top
View user's profile Send private message
nize
PostPosted: Thu Oct 07, 2010 10:49 pm    Post subject: Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

Thanks for all input! It is a shame though. The mapping node has other advantages such as the implicit loop handling and the graphical interface.
Back to top
View user's profile Send private message
crossland
PostPosted: Fri Oct 08, 2010 12:58 am    Post subject: Reply with quote

Master

Joined: 26 Jun 2001
Posts: 248

nize wrote:
Thanks for all input! It is a shame though. The mapping node has other advantages such as the implicit loop handling and the graphical interface.


However, the code that has been written by a human in a Compute node SHOULD be better than that generated by the Mapping node.
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 » namespace and mapping node
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.