.Net DLL/WSDL Importer for Delphi

This tool also called .Net Assemblies/WSDL Import Utility for Delphi is used for importing .Net Assemblies such as dll or exe files, WSDL or web service XML schema and for generating Delphi classes from the .Net types of the imported assemblies.

Download Buy



Note: This utility is included in the .Net Runtime Library for Delphi Professional Edition.

Import .Net Assemblies Wizard

This wizard is used for importing .Net assemblies and for generating Delphi classes from the types of the imported assemblies.

How to import .Net Assemblies and generate Delphi classes from the imported assemblies

Step 1: Click on the add button to add .Net Assembly files to the Assembly Names list. The assemblies can be removed by selecting the assemblies on the list and subsequently clicking on the remove button.


The right part of the screen above displays the properties of the assemblies to be imported. The Delphi unit name for the assembly can be changed from the property display section. For instance, the name of the above assembly on the list has been changed from System.Xml to SystemXmlUnit.

To load assemblies from the Global Assembly Cache (GAC), click on the GAC button and the GAC assembly form below will be shown.


Select the assemblies to import from the GAC assembly form above and click the Ok button to add the selected assemblies to the list.

Click the Next button and go to step 2.

Step 2: This screen allows you to specify which types and the members of the types of the assemblies you want to import. The members of the type includes the Constructors, Fields, Properties, Methods and Events. In the screen below, the XmlDocument type has been selected and atleast one member item has also been selected for each member of the type.


You can change the class names of the assembly types by clicking on the Modify Class Name button. The screen below will be shown where you can change the default class names of the assembly types.

Click the Next button and go to step 3.

Step 3: This screen allows you to determine how the imported assemblies should be loaded by the host library at runtime. There are four load assembly options; These are:

  • Load from GAC using Qualified Assembly Name: Selecting this option allows the host library to load the assembly from the Global Assembly Cache using the qualified assembly name. Example: System.Data, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b78a5c561856e089
  • Load from GAC using Partial Assembly Name: Selecting this option allows the host library to load the assembly from the Global Assembly Cache using the partial name of the assembly. Considering the above example, instead of specifying the full qualified name, you can specify only the name of the assembly. Example: System.Data
  • Load from File Location: Selecting this option allows the host library to load the assembly from the specified file location.
  • Load from EXE location: Selecting this option allows the host library to load the assembly from the location of the Delphi executing file. You can copy your .net assembly files to the Delphi executable file directory and select this option.

Click the Next button and go to step 4.

Step 4: This screen allows you to specify the directory where the generated Delphi files will be stored after import. You can also select the option(s) for importing the assembly types. These options are:

  • Separate larger generated Delphi units into different units: Selecting this option allows the process to automatically separates the Delphi unit to be generated into smaller units if the unit to be generated from the assembly types will be larger and contains volumnous lines of code making it difficult to debug in Delphi.
  • Optimize process: Selecting this option allows the process to perform a number of Delphi code optimization.
  • Exclude public field members of the selected types: Selecting this option allows the process to exclude public field members of the selected types to be imported.
  • Search and include type references in other assemblies to be imported: Selecting this option allows the process to search for any dependencies in the list of assemblies to be imported and use the referenced type rather than specifying a default value or creating a class for the referenced type.
  • Convert .Net Generics to its equivalent in Delphi: Selecting this option allows the process to convert .Net Generic List and Nullable types to equivalent Generic List and Nullable types in Delphi.

Click the Finish Button to start the process.

After the process is complete, atleast 3 files or Delphi units will have been generated for each assembly file imported. These units are:
  • Constant Unit: This Delphi unit contains the string constant variables of the assembly ID, the assembly load option path and the fullnames of the .net assembly types imported. This unit file name is the combination of the name of the class unit and Const.
  • Interface Unit: Contains the types and members of the types imported from the .net assembly file which is represented as interfaces in this unit. These interfaces are inherited by the classes generated and saved in the Class Unit.
  • Class Unit: Contains the types and members of the types imported from the .net assembly file which is represented as classes in this unit. More than one class unit can be generated if the option "Separate larger generated Delphi units into different units" is selected and the assembly file to be imported will result in a larger and voluminous lines of code in a single unit.
  • Enums Unit: This Delphi unit contains the enumeration types defined in the imported assembly types. If the assemblies to be imported do not have any enumeration types, this unit will not be generated. This unit file name is the combination of the name of the class unit and Enums.

Import WSDL/Web Services Wizard

This wizard is used for importing Web Service Description language file/url or XML schema and for generating Delphi classes from the types of the imported wsdl assemblies.


How to import WSDL/XML Web Service and generate Delphi classes from the imported wsdl assemblies

Step 1: Enter either a WSDL file name or the URL where the document is published (WSDL Document). Click the ellipsis button next to the edit box to browse for a file location. After entering a file name or URL, select the protocol type (By default SOAP protocol is selected) used to communicate with the WSDL document or XML Web services.
The following are the types of protocol:
  • Process only WSDL Binding extensions for SOAP Protocol: The process communicates with the service using the latest SOAP protocol.
  • Process only WSDL Binding extensions for HTTP POST Protocol: The process communicates with the service using HTTP POST protocol.
  • Process only WSDL Binding extensions for HTTP GET Protocol: The process communicates with the service using HTTP GET protocol.
  • Process only WSDL Binding extensions for HTTP SOAP Protocol: The process communicates with the service using HTTP SOAP protocol.
If the WSDL document requires a credential for authentication, then specify:
  • Domain: Indicates the domain to use if the WSDL document is on a secure server that requires authentication. (Optional).
  • UserName: Indicates the username to use if the WSDL document is on a secure server that requires authentication.
  • Password: Indicates the password to use with User Name when the WSDL document is on a secure server that requires authentication.

Click the Next button and go to step 2.

Step 2: This screen displays the loaded wsdl assemblies in the WSDL Assembly Names list. The assemblies on the list can be removed by selecting the assemblies to remove and subsequently clicking on the remove button.

The right part of the screen above displays the properties of the wsdl assemblies to be imported. It is recommended to change the unit name of the WSDL assembly since the assembly name of the wsdl is randomly generated. For instance, the unit name for the wsdl assembly above has been changed from obmnycr5 to WebService1.

Click the Next button and go to step 3.

Step 3: This screen allows you to specify which types and the members of the types of the wsdl assemblies you want to import. The members of the type includes the Constructors, Fields, Properties, Methods and Events. In the screen below, the Service1 type has been selected and atleast one member item has also been selected for each member of the type.

You can change the class names of the assembly types by clicking on the Modify Class Name button. The screen below will be shown where you can change the default class names of the assembly types.

Click the Next button and go to step 4.

Step 4: This screen allows you to specify the directory where the generated Delphi files will be stored after import. You can also select the option(s) for importing the assembly types. These options are:

  • Separate larger generated Delphi units into different units: Selecting this option allows the process to automatically separates the Delphi unit to be generated into smaller units if the unit to be generated from the assembly types will be larger and contains volumnous lines of code making it difficult to debug in Delphi.
  • Optimize process: Selecting this option allows the process to perform a number of Delphi code optimization.
  • Exclude public field members of the selected types: Selecting this option allows the process to exclude public field members of the selected types to be imported.
  • Search and include type references in other assemblies to be imported: Selecting this option allows the process to search for any dependencies in the list of assemblies to be imported and use the referenced type rather than specifying a default value or creating a class for the referenced type.
  • Convert .Net Generics to its equivalent in Delphi: Selecting this option allows the process to convert .Net Generic List and Nullable types to equivalent Generic List and Nullable types in Delphi.

Click the Finish Button to start the process.

After the process is complete, atleast 3 files or Delphi units will have been generated for each assembly file imported. These units are:
  • Constant Unit: This Delphi unit contains the string constant variables of the assembly ID, the WSDL Url or File Location and the fullnames of the .net assembly types imported. This unit file name is the combination of the name of the class unit and Const.
  • Interface Unit: Contains the types and members of the types imported from the .net assembly file which is represented as interfaces in this unit. These interfaces are inherited by the classes generated and saved in the Class Unit.
  • Class Unit: Contains the types and members of the types imported from the .net assembly file which is represented as classes in this unit. More than one class unit can be generated if the option "Separate larger generated Delphi units into different units" is selected and the assembly file to be imported will result in a larger and voluminous lines of code in a single unit.
  • Enums Unit: This Delphi unit contains the enumeration types defined in the imported wsdl assembly types. If the assemblies to be imported do not have any enumeration types, this unit will not be generated. This unit file name is the combination of the name of the class unit and Enums.