Total Pageviews

Friday, July 8, 2016

How to Generate Xml Schema from JSON message

Now a day’s most of the partners are using JSON message for the communication because it is light weight and requires less memory. Since BizTalk Server 2013 R2, it became very easy to generate xml schema against the JSON message. Follow below steps to do so.

1)      Let us say partner provide below JSON message format and you have to consume it in BizTalk.  Copy below in notepad file and save it as .json file.

{
    "Name": {
      "Fname": "Fname_0",
      "Lname": "Lname_0"
    },
    "Address": {
      "Street": "Street_0",
      "City": "City_1",
      "Address": "Address_2"
    }
}

2)      Right click on project->Add New Itemàselect JSON Schema Wizard and give name of the schema and click Add.



3)       In Instance file, browse the location of json file you saved in step 1. Provide the root node name and target namespace as you want. Click on finish.




4)      You will find the document schema generated in the project. 

No comments:

Post a Comment