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 » How to map to array target using IBM XML Mapping Editor?

Post new topic  Reply to topic
 How to map to array target using IBM XML Mapping Editor? « View previous topic :: View next topic » 
Author Message
bureaucrat
PostPosted: Wed Dec 28, 2011 6:40 am    Post subject: How to map to array target using IBM XML Mapping Editor? Reply with quote

Newbie

Joined: 28 Dec 2011
Posts: 3

Dear friends,

I want to map to array target using IBM XML Mapping Editor, I tried so many ways which turns out to be infructuous.

Requirement is pretty simple, target XML schema will be like this:


Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cbe="http://www.ibm.com/AC/commonbaseevent1_0_1" targetNamespace="http://www.ibm.com/AC/commonbaseevent1_0_1" elementFormDefault="qualified" version="1.0.1">
   <xsd:complexType name="CommonBaseEventType">
      <xsd:sequence>
         <xsd:element name="extendedDataElements" type="cbe:ExtendedDataElementType" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
   </xsd:complexType>
   <xsd:complexType name="ExtendedDataElementType">
      <xsd:sequence>
         <xsd:choice minOccurs="0" maxOccurs="1">
            <xsd:element name="values" minOccurs="1" maxOccurs="unbounded">
               <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                     <xsd:maxLength value="1024"/>
                  </xsd:restriction>
               </xsd:simpleType>
            </xsd:element>
            <xsd:element name="hexValue" type="xsd:hexBinary" minOccurs="1" maxOccurs="1"/>
         </xsd:choice>
      </xsd:sequence>
      <xsd:attribute name="name" use="required">
         <xsd:simpleType>
            <xsd:restriction base="xsd:string">
               <xsd:maxLength value="64"/>
            </xsd:restriction>
         </xsd:simpleType>
      </xsd:attribute>
      <xsd:attribute name="type" use="required">
         <xsd:simpleType>
            <xsd:restriction base="xsd:string">
               <xsd:enumeration value="int"/>
               <xsd:enumeration value="double"/>
               <xsd:enumeration value="string"/>
            </xsd:restriction>
         </xsd:simpleType>
      </xsd:attribute>
   </xsd:complexType>
</xsd:schema>


in IBM XML Mapping Editor, the element will be like :




You may noticed that the element 'extendedDataElements' is unbounded.

And I want a output be like this:


Quote:
<extendedDataElements name="Type" type="string">
<values>Technical</values>
</extendedDataElements>
<extendedDataElements name="Report" type="stringArray">
<values>Error Message</values>
</extendedDataElements>


Would you kindly give some ideas?

PS: I knew mapping node could accomplish this easily
PPS: For some reasons, I have to use XSLT to do this ...
Back to top
View user's profile Send private message
bureaucrat
PostPosted: Wed Dec 28, 2011 9:26 pm    Post subject: Reply with quote

Newbie

Joined: 28 Dec 2011
Posts: 3

while mapforce has fallibility like this :

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 » How to map to array target using IBM XML Mapping Editor?
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.