Skip to Content
0
Sep 20, 2017 at 10:54 PM

REST Receiver Adapter (ARRAY) - 2 elements with same name

414 Views Last edit Sep 22, 2017 at 01:46 PM 4 rev

Hey

I have the next integration:
SAP ECC-->PO-->REST Receiver

I am facing a problem, where I have 2 elements with same name in my structure.

My structure:

<xsd:element name="fonte" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="nome" type="xsd:string" minOccurs="0" />
<xsd:element name="registro" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="tabela" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="nome" type="xsd:string" minOccurs="0" />
<xsd:element name="ocorrencia" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="atributo" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="nome" type="xsd:string" minOccurs="0" />
<xsd:element name="valor" type="xsd:string" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="tabela" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="nome" type="xsd:string" minOccurs="0" />

As you can see above, I have twice the element tabela, in the first time this element is not array 0..1 , but in the second time is a array 0..unbounded.

How can I specify just the element tabela 0..unbounded as array in my REST Receiver Adapter?

Regards.,

Cleyber Santos