Skip to content

Latest commit

 

History

History
47 lines (37 loc) · 2.83 KB

README.md

File metadata and controls

47 lines (37 loc) · 2.83 KB

wcg

SOAP Webservice Code Generator

Like wsdl.exe and xsd.exe merged together but better.

Usage

wcg.exe -xsd="C:\your_path\directory_containing_wsdls_and_xsds" -out="C:\other_path\output_directory" -i -v -debug

Command Line Args

All args can be prefixed with "-", "--", or "/" and may be followed by a space " ", colon ":", or equals "=" before the value. Boolean arguments do not require a value. String arguments require quotes only if they contain spaces.

  • /wsdl:"dir" - The directory containing .wsdl files (default: xsd dir or the cwd if neither present)
  • /xsd:"dir" - The directory containing .xsd files (default: wsdl dir or the cwd if neither present)
  • /out:"dir" | /o:"dir" - The directory where generated code files will be placed. If not empty, the operation will be cancelled unless interactive is enabled then it will prompt.
  • /namespace | /ns - The namespace to use for all generated code files. (default: 'Wcg.Generated')
  • /interactive | /i - Interactive prompts regarding file overwriting and program dismissal. (default: false)
  • /recursive | /r - Search subdirectories of the 'wsdl' and 'xsd' paths for files. (default: false)
  • /verbose | /v - Increased verbosity of console output. (default: false)
  • /debug | /dbg - Display program stack trace information for bug reporting. (default: false)
  • /help | /? - Display a help page.

Features

  • Task API async methods - also exposes synchronous calls. Removes/hides the callback and event -based Async methods.
  • Multiple namespaces - a base namespace is created and a child namespace for each XSD and WSDL are used. Types are located with usings when they reside outside the current file.
  • Creates multiple files - currently one file per WSDL and XSD.
  • Fast - as in Console output is the primary bottleneck.
  • Color output - not even optional! Uses Console.ForegroundColor and Console.BackgroundColor API so redirection to files isn't cluttered with ANSI escape sequences.

Wish List

  • Fetch files from URLs if not present on disk
  • Expose the ability to provide a custom attribute (for those wishing to add logging, etc.)
  • Generate a project and solution
  • Generate new { get; set; } style properties
  • Reduce namespace usings to only the portion that is required
  • Reduce Task API and Serialization attribute verbosity via a using statement
  • C# style naming of properties with serialization overrides to convert back to the defined casing
  • Folder per WSDL and XSD with file per class/enum output
  • Drop "specified" fields by using nullable types
  • Support for List<T> instead of T[] types
  • Better handling of descriminators (instead of object with several XmlElementAttributes, perhaps have ignored properties of the correct type that modify the underlying field.
  • Kill all the <remarks/>