
Running XBinder from the Command-line
The XBinder distribution contains a command-line compiler executable as well as a graphical user interface (GUI) wizard (Windows version only) 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.0.x Copyright (c) 2002-2004 Objective Systems, Inc. All Rights Reserved. Usage: xbinder <filename> options <filename> XML schema source file name options: -xml generate XML encode/decode functions -soap add logic to format/parse SOAP headers -trace add trace diag msgs to generated code -c generate C code -c++ or -cpp generate C++ code -config <file> specify configuration file -nodecode do not generate decode functions -noencode do not generate encode functions -warnings Output compiler warning messages -o <directory> Output file directory -I <directory> Import file directory -all Compile all dependent files -w32 Generate Windows code (default = GNU) -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 namespace prefixes in C/C++ code -modularize Handle included schemas as separate modules additional code generation options: -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 [<filename>] or -print [<filename>] generate print functions -usePDU <element> use PDU for writer/reader test programTo 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:
Objective Systems, Inc.102 Pickering Way, Suite #506Exton, 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 |