2

I have a WCF SQL receive location and am able to get the relevant details from the database.

The xml looks like this:

<TypedPolling xmlns="http://schemas.microsoft.com/Sql/2008/05/TypedPolling/EmailNotifications">
   <TypedPollingResultSet0>
     <TypedPollingResultSet0>
       <strPortName>port name 1</strPortName>
       <LastRun_UTC>2016-01-29T10:20:10.083Z</LastRun_UTC>
     </TypedPollingResultSet0>
     <TypedPollingResultSet0>
       <strPortName>portname 2</strPortName>
       <LastRun_UTC>2016-01-29T11:37:38.82Z</LastRun_UTC>
     </TypedPollingResultSet0>
     <TypedPollingResultSet0>
       <strPortName>portname3</strPortName>
       <LastRun_UTC>2016-01-29T11:37:39.353Z</LastRun_UTC>
     </TypedPollingResultSet0>
   </TypedPollingResultSet0>
</TypedPolling>

The associated xsd is like this:

<?xml version="1.0" encoding="utf-16" ?> 
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
           targetNamespace="http://schemas.microsoft.com/Sql/2008/05/TypedPolling/EmailNotifications" 
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="TypedPolling">
    <xs:complexType>
      <xs:sequence> 
        <xs:element name="TypedPollingResultSet0">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="TypedPollingResultSet0">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="strPortName" 
                                type="xs:string" /> 
                    <xs:element name="LastRun_UTC" 
                                type="xs:dateTime" /> 
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

I want to move data from this schema to a simpler one, whose xsd looks like this:

<?xml version="1.0" encoding="utf-16" ?> 
<xs:schema xmlns="http://_024_EmailNotifications_Schemas.BizTalkDTADBExtractMod"
           xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
           targetNamespace="http://_024_EmailNotifications_Schemas.BizTalkDTADBExtractMod" 
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Root">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" 
                    name="Notification">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="strPortName" 
                          type="xs:string" /> 
              <xs:element name="LastRun_UTC" 
                          type="xs:string" /> 
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

I created a transform shape and did a one to one mapping.

The source has 4 records but after the mapping I only get one record.

Can somebody please help me to figure out what am doing wrong?

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
Deepak
  • 21
  • 1

1 Answers1

2

Add a looping functoid to your map, with the input from the repeating TypedPollingResultSet0 and the output going to Notification.

Also, avoid copying and pasting XML from a browser -it will add undesireable characters (all the -s in your question), and it'd be a good idea to include some details about your map.

Dan Field
  • 20,885
  • 5
  • 55
  • 71