JSON Document to JSON Schema Converter Tool

JSON Document to JSON Schema Converter Tool

In our Integration projects, especially nowadays on Azure Integration Services, we often work with JSON messages. And despite Logic App Designer allowing us to generate a JSON schema based on a JSON payload (or JSON message), there are many situations that we find ourselves in the need to create a JSON Schema outside the Logic App. One good example is when we are creating a map inside the new Data Mapper.

Unfortunately, there aren’t any out-of-the-box capabilities inside the new Data Mapper to generate a JSON Schema from a JSON Message, so we only have two options:

  • Create a dummy Logic App to generate the JSON Schema and then manually copy it and save in the Artifacts folder;
  • Or we will use free online tools like this one: https://www.liquid-technologies.com/online-json-to-schema-converter, but what annoys me about these online tools is that all data are stored in their log files, and sometimes for privacy/security concerns that can be a problem.

Mainly because of these reasons, I decide, along with my team, to start creating these free tools with the source code available on GitHub in order to not raise the same suspicions.

JSON Document to JSON Schema Converter Tool

JSON Document to JSON Schema Converter Tool is a straightforward Windows that allows you to generate a JSON Schema based on the sample JSON Document that we provide.
No data are stored in log files.

Where can I download

Hope you find this useful! So, if you liked the content or found it useful and want to help me write more content, you can buy (or help buy) my son a Star Wars Lego! 

Credits

  • Luis Rigueira | Member of my team and one of the persons responsible for developing this tool.
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Visual Studio BizTalk Schema Generator Wizard error: Error occurred while creating the BizTalk port configuration file

Visual Studio BizTalk Schema Generator Wizard error: Error occurred while creating the BizTalk port configuration file

After several days migrating BizTalk open-source contributions like BizTalk Mapper Extensions UtilityPack, BizTalk Pipeline Components Extensions Utility Pack, BizTalk MapperExtensions Functoid Project Template, BizTalk MapperExtensions Functoid Wizard and several tools like BizTalk Filter Finder Tool, BizTalk Bindings Exporter Tool, or BizTalk Port Multiplier Tool for BizTalk Server 2020. It is time to get back to one of my favorite topics error and warnings, cause, and solutions blog post. This time on a small development issue that I got recently while I was trying to Consume Adapter Service to generate the Oracle schemas inside Visual Studio.

I have done these thousands of times and it is a very straightforward task once you know how to communicate with Oracle system but this time I got the following error:

Error occurred while creating the BizTalk port configuration file. Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Consume Adapter Service Schema Generator BizTalk port configuration error

A curiosity is that the Wizard was able to successfully generate the Oracle Schemas. The problem occurred while it was trying to generate the Binding file.

Cause

Unfortunately, I don’t know exactly the cause reason for this error. In my view, the same occurred due to some special character coming from the Oracle resources that are being consumed or incompatibilities between Oracle data types and .NET data types and that are used to generate the Binding file.

Nevertheless, this is not a stopping issue. You still have all the necessary BizTalk resources generated by the wizard: the Oracle schemas. The only thing that is not generated is the binding file, which is extremely useful to create the receive or send port in the BizTalk Server Administration Console. However, despite this constraint, you are still able to manually create the port without requiring the binding file.

Solution

Well, you know me, it is possible to manually create the ports without requiring the binding files, however, this is an accelerator that I prefer not to lose. So, I had to investigate and solve this problem, before it appears more often.

And in fact, the solution is quite easy:

  • On the Consume Adapter Service Schema Generator Wizard, while you are configuring the connection string to Oracle, configure the URI, select the Binding Properties tab.
Consume Adapter Service Schema Generator BizTalk port configuration solution
  • On the Binding Properties tab, scroll down to the Metadata section. There you will find a property called: EnableSafeTyping.
    • This feature controls how the adapter surfaces certain Oracle data types and by default this value is false.
  • To solve this issue you need to change the EnableSafeTyping value to true.
Consume Adapter Service Schema Generator BizTalk port configuration solution

Since not all .NET and Oracle types are created equally, we occasionally need to set the value true for this property to handle some constraints around data types.

This is not a unique Oracle issue, this same error may happen when you are trying to generate schemas from SAP also.

The post Visual Studio BizTalk Schema Generator Wizard error: Error occurred while creating the BizTalk port configuration file appeared first on SANDRO PEREIRA BIZTALK BLOG.