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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

BizTalk360
BizTalk Server

Over 500+ customers across
30+ countries depend on BizTalk360

Learn More
Serverless360
Azure

Manage and monitor serverless
components effortlessly

Learn More
Atomicscope
Business Users

Monitor your Business Activity in iPaaS
or Hybrid integration solutions

Learn More

Back to Top