Json to XML Array within Array with Different Parent Names

Not applicable

I am trying to build an XML structure for a WSDL call, since there isn't a real proper way to send an arbitary size list of complex objects using the parameter passing method, I decided to use Json to XML. Here is my basic Json

school:{
    teachers : [

        {students :[{name: student1}, {name: student2}], name : teacher1},
        {students :[{name: student3}, {name: student4}], name : teacher2}
    ]
}

and what I want to see as an end result is

<school>
  <teachers>
    <name>teacher1</name>
    <students>
      <name>student1</name>
      <name>student2</name>
    </students>
  </teachers>
  <teachers>
    <name>teacher1</name>
    <students>
      <name>student1</name>
      <name>student2</name>
    </students>
  </teachers>
</school>

Using what Apigee Documentation

<ArrayRootElementName>Teachers</ArrayRootElementName>

It still would handle the Students properly, in fact it changes my Students to Teachers. Can someone help please.

Solved Solved
2 5 706
1 ACCEPTED SOLUTION

Not applicable

Hello Churk,

We also got your message on the Support Portal and we're under the impression that you will be sending us some of your files so that we can try them out here ourselves.

According to Alex Toombs of our Customer Suppport department "This could be a limitation in our conversion, and custom scripting may be required. It might also be a bug. From what I can tell, he's set it all up correctly.

If we can't find the answer (and I haven't yet), we may also need to solicit some input from Customer Success Team as this is their area of expertise."

We'll actively work with you to find a solution to your problem.

View solution in original post

5 REPLIES 5

Not applicable

Hello Churk,

We also got your message on the Support Portal and we're under the impression that you will be sending us some of your files so that we can try them out here ourselves.

According to Alex Toombs of our Customer Suppport department "This could be a limitation in our conversion, and custom scripting may be required. It might also be a bug. From what I can tell, he's set it all up correctly.

If we can't find the answer (and I haven't yet), we may also need to solicit some input from Customer Success Team as this is their area of expertise."

We'll actively work with you to find a solution to your problem.

I posted this question before I was in contact with Alex. It was toward EOD yesterday for me so I am still working on getting the sample data to him. Will be sending that shortly today. Thank you.

Not applicable

No problems, Churk as long as you are taken care of. We would like to post the answer here as well so a wider audience can know about it.

hello, can you post the answer here please?

Hello! I am very glad that I got to such a cool forum and would like to support such an interesting issue. In childhood itself, everyone wants him to have a scooter, but of course, money is not always enough for such a pleasure. Of course, those who worked in the summer could afford such a pleasure. I think of my red BMW scooter with which I drove more than 10,000 kilometers. I watched the material for a long time on the Internet and decided to order several articles on this topic at https://writingcreek.com/, where I learned a lot about myself. Therefore, if you are young. you have a day, there’s nothing to even think about - you need to go to the store and buy a scooter.