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 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.
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.
Embarcadero WSDLIMP Version 2.3 - $Rev: 22431 $
Copyright (c) 2009 Embarcadero Technologies, Inc.
Usage: WSDLIMP [options] <WSDL[File|URL]>
Language Generation Options:
-C Generate C++ code
-P Generate Pascal code
Code Generation Options [ -option{+|-} default shown ]:
-Ov+ Generate verbose information about types and interfaces
-Oo+ One out parameter is return value
-Os- Generate server implementation instead of client implementation
-Ou+ Unwind Literal Params
-Ol- Emit Literal Types
-Ow- Map String to WideString
-Od+ Generate destructors for remotable types
-Oi+ Generate warning comments
-Ok- Map pure collections to wrapper class types
-Ot+ Do not emit unused types
-Oj+ Validate Enumeration members
-Of+ Import Fault Types
-Oh+ Import Header Types
-Og- Generate interface GUIDs using COM API
-Op+ Process included and imported schemas
-Ox+ Generate class aliases as class types
-Om- Allow out parameters (Delphi only)
-Ob- Use Setters and Getters for properties
-Oa+ Process nillable and optional elements
-Oz- Use TXSString for simple nillable types
-Oe+ Generate scoped enumerations
SOAP Version Options:
Automatically determines SOAP version if not forced. (Recommended)
-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> Output directory path
-=+ Output filename after '=' in URL
@<Resp> Response file with list of WSDL
Proxy/Server Authentication:
-user:userName -pass:Password [-proxy:Proxy]
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 Object Pascal 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.
WSDLIMP Command Line Syntax
The command-line syntax for WSDLIMP is:
WSDLIMP [<options>] <Inputfile|URL>
<Inputfile> is a physical WSDL document to import.
<URL> is the URL used to access a WSDL document that is published on the Web.
<options> stand for any of the WSDLIMP command-line options.
WSDLIMP Command Line Options
The following table lists the command-line options for WSDLIMP:
| Options | Description |
|---|---|
-C |
Generate C++ code to represent the definitions in the WSDL file. You must use either this option or the -P option, but not both. |
-P |
Generate Object Pascal code to represent the definitions in the WSDL file. You must use either this option or the -C option, but not both. |
-Ov |
If this options is enabled, the WSDL importer generates information regarding type namespaces, service styles, binding names, and various other WSDL exposed data (on by default). |
-Oo |
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 (on by default). |
-Os |
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 (off by default). |
-Ol |
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 Generate 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.) (off by default) |
-Ow |
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 (off by default). |
-Ou |
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 (on by default). |
-Od |
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 (on by default). |
-Oi |
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 when Ignore Schema Errors is checked, problems encountered when unwinding literal parameters when Unwind Literal Params is checked, and so on (on by default). |
-Ok |
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 (off by default). |
-Ot |
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 (on by default). |
-Oj |
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 (-Oe+) option instead (on by default). |
-Of |
Enable this option to make the WSDL importer process types marked as fault (on by default). |
-Oh |
Enables the WSDL importer to process types marked as headers (on by default). |
-Og |
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 (off by default). |
-Op |
Enable this option to make the WSDL importer process included and imported schemas (on by default). |
-Ox |
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 (on by default). |
-Om |
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 (off by default). |
-Ob |
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 (off by default). |
-Oa |
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 (on by default). |
-Oz |
The WSDL standard allows simple types to be nil, in Delphi or NULL, in C++, while Delphi and C++ do not allow that. Enable this option to make the WSDL importer overcome this limitation by using instances of wrapper classes (off by default). |
-Oe |
When enabled, scoped enumerations will be generated. Check this option if the WSDL document contains different enumerations that define values with the same name (on by default). |
-SOAP11 |
Process only WSDL Binding extensions for the SOAP 1.1 Protocol. This option cannot be used simultaneously with -SOAP12. |
-SOAP12 |
Process only WSDL Binding extensions for the SOAP 1.2 Protocol. This option cannot be used simultaneously with -SOAP11. |
-D<path> |
Specifies the directory where WSDLIMP writes the files it generates. |
@<Resp> |
Specifies a text file where each line lists a URL or WSDL file to import. You can optionally add '=OutputFileName' after the URL or file name to specify where to place the generated code for each imported WSDL document. |
-=+ |
Interpret the equal sign (=) as introducing an output file name (see the @<path> option.) When off, an equal sign is assumed to be part of the URL (on by default). |
-user:UserName |
Using this option, specify the user name to use if the WSDL document is on a secure server that requires authentication. This option requires -password to be specified. |
-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. This option requires -user to be specified. |
-proxy:Proxy |
Specify the host names for any proxy servers that must forward requests to the specified WSDL document URL. This option requires -password and -user to be specified. |