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 » Mapping Node Conversion

Post new topic  Reply to topic Goto page 1, 2  Next
 Mapping Node Conversion « View previous topic :: View next topic » 
Author Message
shashivarungupta
PostPosted: Sun Sep 14, 2014 4:41 pm    Post subject: Mapping Node Conversion Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

Hi,

A very simple mapping conversion is getting applied in the message flow that takes the input and maps it with the output schema (XML).
I wonder why in the output message assembly another field is getting added under ADDRESSRESPONSE, saying.. (please suggest)
out:CHARACTER:http://localhost:7800/MapSchemaOut
as shown below.
Code:

XMLNSC
   ADDRESSRESPONSE
         CITYNAME
         COUNTRYNAME
         out:CHARACTER:http://localhost:7800/MapSchemaOut

(No LocalMap is applied between the ADDRESSREQUEST and ADDRESSRESPONSE !!)
(Scope has got both the XSD files for Input and output Message assembly !!)
(Mapping Operating is just 'Move' !!)
Following was the input xml(for example), passed as input schema to the map node. And it gets parsed correctly at the MQInput node.
Code:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ADDRESSREQUEST>
   <CITY>Wellington</CITY>
   <COUNTRY>NZ</COUNTRY>
</ADDRESSREQUEST>


Flow is like MQInput(XMLNSC) > Map Node > Compute Node > MQOutput.
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Mon Sep 15, 2014 4:10 am    Post subject: Reply with quote

Grand High Poobah

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

and the broker version is for us to guess right?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Sep 15, 2014 5:22 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

And the actual XML that is output shows that this "additional field" is actually an XML *element*?

Or is it a *namespace declaration*.
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Mon Sep 15, 2014 12:33 pm    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

fjb_saper wrote:
and the broker version is for us to guess right?
v8.0.0.4
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
shashivarungupta
PostPosted: Mon Sep 15, 2014 12:38 pm    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

mqjeff wrote:
And the actual XML that is output shows that this "additional field" is actually an XML *element*?

Or is it a *namespace declaration*.


That I notice in the "Namespaces" properties of Mapping Node. (which populates automatically after I do select/add the schema for input & output under "Scope" , [ Observation : If XSD has got those Namespaces mentioned in it, it will get populated under "Generated" section of "Namespaces" of Mapping Node. ]

_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Sep 15, 2014 12:48 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I didn't ask about the mapping node.

I asked about the rendering of the "extra" field in the serialized XML document.
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Mon Sep 15, 2014 12:59 pm    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

mqjeff wrote:
I didn't ask about the mapping node.

I asked about the rendering of the "extra" field in the serialized XML document.


Here are the input and output schema documents that are used.. and the "extra" rendering field is not the xml element. If not misunderstood again, hope this will help.

Input Schema
Code:

<xsd:schema targetNamespace="http://localhost:7800/MapSchemaIn" xmlns:tns="http://localhost:7800/MapSchemaIn" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"  elementFormDefault="qualified">
    <xsd:element name="ADDRESSREQUEST">
    <xsd:complexType>
       <xsd:sequence>
          <xsd:element name="CITY" type="xsd:string"></xsd:element>
          <xsd:element name="COUNTRY" type="xsd:string"></xsd:element>   
       </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
</xsd:schema>


Output Schema
Code:

<xsd:schema targetNamespace="http://localhost:7800/MapSchemaOut" xmlns:tns="http://localhost:7800/MapSchemaOut" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"  elementFormDefault="qualified">
   <xsd:element name="ADDRESSRESPONSE">
    <xsd:complexType>
       <xsd:sequence>
          <xsd:element name="CITYNAME" type="xsd:string"></xsd:element>
          <xsd:element name="COUNTRYNAME" type="xsd:string"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
</xsd:schema>

_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Sep 15, 2014 1:09 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I also don't care about the schema.

When you send the message tree to an OUTPUT node, of some kind, that serializes the message tree into a real XML document, what do you see?

Do you see
Code:
<ADDRESSRESPONSE xmlns:NS1="http://localhost:7800/MapSchemaOut">
         <CITYNAME>Wellington</CITYNAME>
         <COUNTRYNAME>NZ</COUNTRYNAME>
</ADDRESSRESPONSE>

?
Or do you see
Code:
<ADDRESSRESPONSE >
         <CITYNAME>Wellington</CITYNAME>
         <COUNTRYNAME>NZ</COUNTRYNAME>
         <out>http://localhost:7800/MapSchemaOut</out>
</ADDRESSRESPONSE>
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Mon Sep 15, 2014 1:29 pm    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

the funny side is.. none of those.. whereas I would like to see it some what as you've mentioned in first code.

its giving like this now..

Code:

<out:ADDRESSRESPONSE xmlns:out="http://localhost:7800/MapSchemaOut">
 <out:CITYNAME/>
 <out:COUNTRYNAME/>
</out:ADDRESSRESPONSE>

_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Sep 15, 2014 1:54 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

shashivarungupta wrote:
the funny side is.. none of those.. whereas I would like to see it some what as you've mentioned in first code.

its giving like this now..

Code:

<out:ADDRESSRESPONSE xmlns:out="http://localhost:7800/TestMapSchema2">
 <out:CITYNAME/>
 <out:COUNTRYNAME/>
</out:ADDRESSRESPONSE>


Yes, that's perfectly and exactly correct according to the Schema.

Your map is working correctly.

You have configured the mapping node to assign a namespace prefix of "out" to the namespace "http://localhost:7800/TestMapSchema2".

This DOES NOT REPRESENT "another field".
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Mon Sep 15, 2014 2:04 pm    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

mqjeff wrote:
Your map is working correctly.

I wonder, why the elements' value is empty, that are coming as Input XML, and those are not getting populated into Output XML elements ?
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Mon Sep 15, 2014 6:54 pm    Post subject: Reply with quote

Grand High Poobah

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

shashivarungupta wrote:
mqjeff wrote:
Your map is working correctly.

I wonder, why the elements' value is empty, that are coming as Input XML, and those are not getting populated into Output XML elements ?


Possibly because they have a different namespace from the one defined in the input xsd?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
martinb
PostPosted: Tue Sep 16, 2014 12:14 pm    Post subject: Reply with quote

Master

Joined: 09 Nov 2006
Posts: 210
Location: UK

Quote:
I wonder, why the elements' value is empty, that are coming as Input XML, and those are not getting populated into Output XML elements ?


The Mapping node executes according to the schema model you gave it.

Consider turning on validation while you are in development to ensure you data does match the schema model.

Turn on User Trace and you'll get confirmation of what the schema model the map is built from has directed it to read:

Code:
UserTrace   BIP3959I: The Mapping node is traversing the input tree using the path <....>'. The number of matching elements is ''<n>''.
Back to top
View user's profile Send private message
sunilkdj
PostPosted: Wed Jul 04, 2018 3:06 am    Post subject: Mappig node issue where getting extra field added Reply with quote

Newbie

Joined: 01 Mar 2013
Posts: 7

Hi. We are migrating from WMB7 to IIB10. We are getting similar issue and message tree after Mapping node is as below:
<ADDRESSRESPONSE >
<CITYNAME>Wellington</CITYNAME>
<COUNTRYNAME>NZ</COUNTRYNAME>
<out>http://localhost:7800/MapSchemaOut</out>
</ADDRESSRESPONSE>

'out' is populating as a new field which is not part of the output schema.

Kindly help.
Back to top
View user's profile Send private message
timber
PostPosted: Wed Jul 04, 2018 4:20 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

So the namespace declaration is being written out as a tag, and not an xmlns attribute? Are you copying the output message to/from the Environment or LocalEnvironment at any point?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Mapping Node Conversion
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.