WSDLIMP.EXE, the Command Line WSDL Import Tool
Go Up to Command-Line Utilities Index
WSDLIMP generates code to represent the types and APIs defined by a WSDL document. This code can be used to write client applications that call on the Web Service that the WSDL (Web Services Description Language) document describes. If you want to write a server that implements the Web Service, one of the command-line options tells the importer to generate implementation classes that you can then complete by filling in the bodies of the generated methods. See also Import WSDL Wizard.
Note: WSDLIMP ignores any definitions in the WSDL document for which it cannot generate code. That is, it can only import Web Services that use SOAP or document literal encoding.
WSDLIMP.EXE imports a WSDL document, generating code that lets your application call on the Web Service that the WSDL document describes. This is the command-line version of the Web Services importer, which is available on the Web Services tab of the new items dialog.
You can configure the output using the WSDLIMP command-line options when you start the program. These options let you specify whether the importer generates Delphi or C++ code, whether you want to generate implementation classes because you are writing a server, and how to handle various types of definitions in the WSDL document.
Contents
Command-Line Syntax
The command-line syntax for WSDLIMP is:
WSDLIMP [<options>] <InputWSDLfile|URL>
To display command-line help, enter:
WSDLIMP
or
WSDLIMP -?
Command-Line Elements
The following elements can be used in WSDLIMP command lines:
Element | Description |
---|---|
<InputWSDLfile> |
Defines the physical WSDL file name to import. |
<URL> |
Defines the URL to access a WSDL document that is published on the Web. |
<options> |
The WSDLIMP command-line options. |
Command-Line Options
The following table lists the command-line options for WSDLIMP. Most of the WSDLIMP command-line options have corresponding options in the integrated Import WSDL Wizard. We provide names of such options in the Wizard's Option Name column of the table.
The table uses:
- A plus symbol
+
after an option to show that the option is ON by default. - A hyphen symbol (
-
) after an option to show that the option is OFF by default.
WSDLIMP Options
Option | Wizard's Option Name | Description |
---|---|---|
Language Generation Options: | ||
-C |
Generate C++ code to represent the definitions in the WSDL file. | |
-P |
Generate Delphi code to represent the definitions in the WSDL file. | |
Code Generation Options: | ||
-Oa+ |
Process nillable and optional elements |
Enable this option to make the WSDL importer generate relevant information about optional and nillable properties. This information is used by the SOAP runtime to allow certain properties be nil. |
-Ob- |
Use Setters and Getters for properties |
By default, the WSDL importer generates properties that map directly to the fields in the generated classes. By enabling this option, you can force the WSDL importer to generate setter and getter methods instead. |
-Od+ |
Generate destructors for remotable types |
When enabled, the importer generates destructors on the classes that represent types. These destructors free any nested members whose types are classes or arrays of classes. The generated destructors simplify the work you must do when freeing instances of classes that represent types, because you do not need to explicitly free class members that also use classes to represent the remotable type. |
-Oe+ |
Generate scoped enumerations |
Generate scoped enumerations. |
-Of+ |
Import Fault Types |
Enable this option to make the WSDL importer process types marked as fault. |
-Og- |
Generate interface GUIDs using COM API |
Enables the WSDL importer to assign unique GUIDs each time a Service is imported. If this option is disabled, the GUID generated to each Service remains the same every time the WSDL importer generates code for that Service. In most cases, we recommend that this option be disabled. |
-Oh+ |
Import Header Types |
Enables the WSDL importer to process types marked as headers. |
-Oi+ |
Generate warnings comments |
When enabled, the importer adds warning messages to the comments it puts at the top of generated files. These warnings describe problems such as invalid type definitions in the WSDL document, problems encountered when unwinding literal parameters when Unwind Literal Params is checked, and so on. |
-Oj+ |
Validate Enumeration members |
Enable this option to ensure that the WSDL importer uses a global symbol list when generating enumeration members. This option prevents name clashes between enumeration members of enumerated types declared in the WSDL document. Since Delphi 2009, we recommend you enable the Generate scoped enumerations |
-Ok- |
Map pure collections to wrapper class types |
Enable this option to enable the WSDL importer to map the imported array types to wrapper classes. This option is mainly provided for C++Builder, where array types cannot be directly mapped to WSDL array types, thus requiring a wrapper collection class. |
-Ol- |
Emit Literal Types |
In document literal encoding, the Web Service does not describe operations. Rather, it describes two records, one that presents the expected input and one that presents the output. When Emit Literal Types is enabled, the importer generates type definitions for these two records, even if it converts them to method calls (that is, even if Unwind Literal Params is checked.) |
-Om- |
Allow out parameters |
This option controls whether the WSDL importer generates methods that use out parameters when returning multiple parts of a SOAP message. If this option is disabled, out parameters are not generated; the WSDL importer generates wrapper classes for multipart SOAP messages. |
-Oo+ |
One out parameter is return value |
When enabled, the importer maps operations with a single output message into functions, where the output message is the return value. If this is not checked, the output message is mapped to an output parameter. |
-Op+ |
Process included and imported schemas |
Enable this option to make the WSDL importer process included and imported schemas. |
-Or- |
Generate alias for the element of pure collections |
This backward-compatible switch generates code as previous product versions did. To re-enable the generation of an alias type as before, turn this option ON. OFF by default. For more information, see WSDL -Or- Option. |
-Os- |
Generate server implementation instead of client implementation |
When enabled, the importer generates implementation classes for the imported interfaces. Use this option when writing a server that implements a Web Service that is already defined in a WSDL document. |
-Ot+ |
Do not emit unused types |
If this option is enabled, the WSDL importer does not generate code for types declared in the WSDL document, but not used in any exposed Service. Note that classes may not follow this rule, because a Service may return an instance of a derived class where the base class is expected. In this case, code for both the base class and the derived one is generated. |
-Ou+ |
Unwind Literal Params |
In document literal encoding, the Web Service does not describe operations. It rather describes two records, one that presents the expected input and one that presents the output. When Unwind Literal Params is enabled, the importer converts these two records into method calls. |
-Ov+ |
Generate verbose information about types and interfaces |
If this options is enabled, the WSDL importer generates information regarding type namespaces, service styles, binding names, and various other WSDL exposed data. |
-Ow- |
Map String to WideString |
When enabled, the importer maps all string types to WideString values. When unchecked, the importer uses the string type instead. WideString values may be required to handle values that use extended characters. If string values do not use extended characters, it is more efficient to use the string type. |
-Ox+ |
Generate class aliases as class types |
Enable this option to make the WSDL importer generate class types instead of weak aliases. This option makes sure that generated alias classes have RTTI (Run-Time Type Information) different from the base type's one. |
-Oz- |
Use TXSString for simple nillable types |
Use TXSString for simple nillable types. |
SOAP Version Options: | ||
-SOAP11 |
Process only WSDL Binding extensions for the SOAP 1.1 Protocol. | |
-SOAP12 |
Process only WSDL Binding extensions for the SOAP 1.2 Protocol. | |
File Options: | ||
-D<path> |
Specifies the | |
@<RespFile> |
The | |
-=<OutputFileName>+ |
Interpret the equal sign | |
Proxy/Server Authentication: | ||
-user:UserName |
User Name |
Using this option, specify the user name to use if the WSDL document is on a secure server that requires authentication. |
-pass:Password |
Password |
Using this option, specify the password to use with User Name when the WSDL document is on a secure server that requires authentication. |
-proxy:Proxy |
Proxy |
Specify the host names for any proxy servers that must forward requests to the specified WSDL document URL. |
WSDLIMP Command-Line Examples
For WSDLIMP command-line examples, see Using the WSDL Importer.