WsdCodeGen Command Line Syntax
WsdCodeGen has two functions: generating configuration files and generating source code for WSDAPI client and host applications. This topic gives the command line syntax used to perform each task.
Generating a Configuration File
Syntax
WSDCODEGEN.EXE /generateconfig:{client|host|all} [/outputfile:ConfigFileName] WSDLFileNameList
Parameters
-
/generateconfig:{client | host | all}
-
The type of code that the output configuration file will generate. /generateconfig:client is used to generate a configuration file for generating client code, /generateconfig:host is used to generate a configuration file for generating host code, and /generateconfig:all is used to generate a configuration file for generating both client and host code.
-
**/outputfile:**ConfigFileName
-
This optional parameter is used to specify the file name of the output configuration file. If this parameter is excluded, the name of the output configuration file is codegen.config.
-
/pnpx
-
Include a PnP-X template in the configuration file.
-
WSDLFileNameList
-
A space-delimited list of the WSDL file(s) to be processed by WsdCodeGen.
Generating Source Code
Syntax
WSDCODEGEN.EXE /generatecode [/download] [/gbc] [outputroot:path] [/writeaccess:command] ConfigFileName
Parameters
-
/generatecode
-
Directs WsdCodeGen to generate source code. This is the default mode if no mode is specified.
-
/download
-
Downloads imported documents referenced by the configuration file. This parameter is optional.
-
/gbc
-
Adds comments to the source code that indicates the code was generated. These comments are prefixed with the phrase "Generated by". This parameter is optional.
-
**/outputroot:**path
-
The output location for generated files. path can be an absolute or relative path. This parameter is optional.
-
**/writeaccess:**command
-
Directs WsdCodeGen to execute the specified command before it modifies any existing files on disk. Output files that are identical to those on disk will not receive this command, nor will they be written to. If the command contains the sequence "{0}", this sequence will be replaced with the filename of the file to be modified. If not, the filename will be appended to the command.
Examples:
/writeaccess:"attrib -r"
/writeaccess:"attrib -r {0}"
/writeaccess:"copy {0} ..\backup\"
-
ConfigFileName
-
The name of the configuration file to process before generating code.
Formatting Legend
Format | Meaning |
---|---|
Italic | Information that the user must provide |
Bold | Elements that the user must type exactly as shown |
Between brackets ([]) | Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} | Set of choices from which the user must choose only one |
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |