Biztalk 2010: mapeando un xsd con muchos elementos con el mismo nombre
En Bitzalk 2010, debería asignar de una entrada a un XML con la siguiente estructura:
<REQUEST>
<PROGRAM name="PROGRAM123">
<INPUT>
<INSTRUCT name="INSTR1">
<FIELD name="FIELD11">VALUE1</FIELD>
<FIELD name="FIELD12">VALUE2</FIELD>
<FIELD name="FIELD13">VALUE3</FIELD>
</INSTRUCT>
<INSTRUCT name="INSTR2">
<FIELD name="FIELD21">VALUE4</FIELD>
<FIELD name="FIELD22">VALUE5</FIELD>
<FIELD name="FIELD23">VALUE6</FIELD>
<FIELD name="FIELD24">VALUE7</FIELD>
</INSTRUCT>
<INSTRUCT name="INSTR2">
<FIELD name="FIELD21">VALUE8</FIELD>
<FIELD name="FIELD22">VALUE9</FIELD>
<FIELD name="FIELD23">VALUE10</FIELD>
<FIELD name="FIELD24">VALUE11</FIELD>
</INSTRUCT>
</INPUT>
</PROGRAM>
</REQUEST>
El XSD generado era así:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="REQUEST" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="REQUEST" msdata:IsDataSet="true" msdata:Locale="en-US">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="PROGRAM">
<xs:complexType>
<xs:sequence>
<xs:element name="INPUT" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="INSTRUCT" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="FIELD" nillable="true" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent msdata:ColumnName="FIELD_Text" msdata:Ordinal="1">
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
La estructura generada era simplemente "general" y tendría que usar el functoid de bucle de tabla para mapearlo en Biztalk. Tengo la información de esta solución:http://hestia.typepad.com/flatlander/2007/01/mapping_fixed_e.html Pero esto me parece muy engorroso (tengo 40 campos con algunos valores constantes).
Otra posibilidad sería usar XSLT. Pero no tengo ninguna experiencia con él y preferiría mapearlo directamente en Biztalk (sin XSLT)
¿Existe la posibilidad de crear un esquema XSD, por lo que tendría todos los campos en el editor de mapas y crearía el mapeo allí (sin utilizar el functoid de bucle de tabla).
Cualquier idea / comentario sería apreciada (incluso si la respuesta es: "use XSLT")