Home  +  Forums  +  C++ and Sockets  +  C++ and SQL: MySQL, sqlite, ODBC  +  Miscellaneous Projects
Logo

    
~Sockets~
~New~
~Examples~
~Contact~

Xml Schema class generator

About | Download | Source code documentation

About

The Xml Schema class generator converts an .xsd xml schema file or a .wsdl soap service description file to C++ classes.

The source code is released under the GNU GPL license.


Implemented features

Each ComplexType definition in the schema file creates one class in the resulting source code. The built-in xml schema types are mapped to native C types. See here for a list of supported types. STL containers are used to create vector types (std::vector). Attribute groups are not supported.


Generated Code

The example below is created by:

$ ./wsdl2cpp -href conf.xsd -overwrite -namespace AJP13 -lt std::list


Dependencies


Command line options

Usage: ./wsdl2cpp [options] <.wsdl filename>
    -port <portname>       Select portType
    -namespace <ns>        Define a global namespace
    -classname <name>      Soap Client classname
    -lt <type>             Vector type (default: std::vector)
    -overwrite             Replace existing files

Datatype conversions

The built-in xml schema datatypes and their representation in the generated code.

Xml schema typeC/C++ type
stringstd::string
datestd::string
dateTimestd::string
anySimpleTypestd::string
anyURIstd::string
timestd::string
booleanbool
bytechar
decimaldouble
integerint
unsignedByteunsigned char
unsignedIntunsigned int
unsignedShortunsigned short




Page, code, and content Copyright (C) 2013 by Anders Hedström
"A hacker does for love what others would not do for money."