
Running XBinder from the Command-line
The XBinder distribution contains a command-line compiler executable as well as a graphical user interface (GUI) wizard that can aid in the specification of compiler options. This section describes how to run the command-line version; the operation of the GUI is described in the online help files built into the wizard.
To test if XBinder was successfully installed, enter xbinder with no parameters as follows (note: if you have not updated your PATH variable, you will need to enter the full pathname):
xbinderXBinder Compiler, Version 1.1.x Copyright (c) 2002-2005 Objective Systems, Inc. All Rights Reserved. Usage: xbinder <filename> options <filename> XML schema or WSDL source file name(s). Multiple filenames may be specified. * and ? wildcards are allowed. Basic options: -xml Generate XML encode/decode functions -c Generate C code -c++ or -cpp Generate C++ code -config <file> Specify schema bindings file. -nodecode Do not generate decode functions -noencode Do not generate encode functions -o <directory> Output file directory -I <directory> Import file directory -all Compile all dependent files -modularize Handle included schemas as separate modules -warnings Output compiler warning messages -trace Add trace diag msgs to generated code -compat <version> Generate code compatible with previous compiler version. <version> format is x.x (for example, 1.0) Options to alter generated code: -fragments Generate code to encode XML fragments (start element, contents, end element) -lax Generate code that does lax error checking -namespace Specify a namespace prefix for all generated items -noheader Do not add code to encode XML header (<? xml ...) -numDateTime Use numeric structures for all date/time types -pdu <element> Designate element to be a PDU -elemCasing <value> Set element name case to lower/upper -typeCasing <value> Set type name case to lower/upper -useNSPfx Use XSD namespace prefixes in C/C++ code Options for the generation of additional code: -genMake Generate makefile -genTest Generate test code -genWriter Generate writer test program -genReader Generate reader test program -genFree Generate memory free functions (C only) -genPrint Generate print functions -genValid Generate validation functions -soap Add logic to format/parse SOAP headers -usePDU <element> Use PDU for writer/reader test program -w32 Use with '-genMake' to generate Windows NMAKE file (default = GNU)To use the compiler, at a minimum, a single XSD or WSDL source file must be provided along with at least one set of encoding rules and a target output language. The current version of XBinder supports the generation of C (-c option) or C++ (-cpp option) source code and the generation of code to encode/decode XML (-xml). It is anticipated that additional language bindings will be added in the future (C# and Java), and additional binary encoding rules (such as ASN.1 BER and PER) to allow more compact and lightweight messages to be produced for a given schema.
The source file specification can be a full pathname or only what is necessary to qualify the file. If directory information is not provided, the user's current default directory is assumed. Multiple source filenames may be specified on the command line to compile a set of files. The wildcard characters `*' and `?' are also allowed in source filenames (for example, the command `xbinder *.xsd -c -xml' will compile all XSD files in the current working directory).
The following table lists all of the command line options in alphabetical order and what they are used for:
| Copyright © Objective Systems
2002-2005 This document may be distributed in any form, electronic or otherwise, provided that it is distributed in its entirety and that the copyright and this notice are included. |
Objective Systems, Inc. 102 Pickering Way, Suite #506 Exton, Pennsylvania 19341 http://www.obj-sys.com Phone: (484) 875-9841 Toll-free: (877) 307-6855 (US only) Fax: (484) 875-9830 info@obj-sys.com |