on 09-20-2017 11:54 PM
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
I doubt that below blog will not be helpful in your case as once your provide "tabela" as array type, the enhanced settings are going to consider as array no matter if it having one element or other(nome,ocorrencia..etc)
https://blogs.sap.com/2016/01/13/rest-adapter-in-sap-pipo-enhanced-xmljson-conversion/
you may use java mapping to convert the xml to json as it is based on the sub elements condition.
But simple solution would be ask the target to have different name if it is possible from target side to make the structure change.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.