cancel
Showing results for 
Search instead for 
Did you mean: 

Amending a XSD to add in a new field. Based of an original JSON

former_member233999
Participant
0 Kudos

Hi all

I have a interface which is json > idoc. I originally took the Json and converted it to xml, then converted that to xsd, put in the cardinality and it worked when i mapped it.1.png

Now i've got to add a new field, which i've highlighted in attachment 1 , i've tried to modify my xsd to include that new field but i get an error in sap : 'Unable to convert imported document to WSDL Reason: Element "element" is not permitted in the "/schema/element("createdDateTime")" elementCheck selected category'

Please can you advise where i've gone wrong in the creation of my xsd and show me how i can make use of that new line at the top of the file. it should have a min occurs "0" and max occurs "1" cardinatlity.

Picture 2 shows the structure of the original file that works. Picture 3 shows the xsd of picture 2. 3.png

2.png

I used to use altova xml spy but my license ran out so i've been using http://convertjson.com/json-to-xml.htm to convert but this time i cant seem to get it to work. Can you please see what might be up?

Thankyou.

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

If you only want results, you can do this through some online websites .

https://www.jsonformatting.com/json-to-xml/

former_member233999
Participant
0 Kudos

Anybody?

I may revert to using dt/mt..

sugata_bagchi2
Active Contributor

Hello George,
Why are you trying to modify the XSD? if you are using the same old JSON structure but with two new fields, then you can get the updated JSON with the new fields in it and follow the same process- convert the new JSON to XML and then convert the XML to XSD.

https://www.freeformatter.com/json-to-xml-converter.html

https://www.freeformatter.com/xsd-generator.html

Thanks

Sugata