TOC PREV NEXT INDEX


Generated Method Format and Calling Parameters


Generated encode method implementations are written to a .cpp file with a name of the following format:
<xsdFileName>Enc.cpp

where <xsdFileName> is the base name of the XSD file being parsed. For example, if code is being generated for file x.xsd, encode method implementations for each type and global element defined in the specification will be written to xEnc.cpp. If the file being processed is a WSDL file, the suffix would be WSDLEnc.cpp (for example, x.wsdl would produce xWSDLEnc.cpp).
The format of the name of each generated XML encode method is encodeXML. The calling sequence is as follows:

    status = <object>.encodeXML
 
	(OSMessageBufferIF& msgbuf, const OSUTF8CHAR* elemName, 
 
	 const OSUTF8CHAR* nsPrefix);
 

In this definition, <object> denotes an object instance of the generated class.
The msgbuf argument is used to hold a reference to the message buffer or stream to which the message is being encoded.
The elemName argument is used to pass an XML element name for the type. This name is what is included in the <name> </name> brackets used to delimit an XML item. If a null pointer (0) is passed in for this argument, then no name wrapper is added to encoded XML item.
The nsPrefix argument is used to specify a namespace prefix. If this value is null or empty, no prefix is added to element name. If a prefix is given, a qualified element name of the form nsPrefix:elemName is generated.
The method result variable returns the status of the encode operation. Status code 0 (zero) indicates success. A negative value indicates encoding failed. Return status values are defined in the rtxErrCodes.h include file. The error text and a stack trace can be displayed using the message buffer printErrorInfo method.

Copyright © Objective Systems 2002-2008
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.

55 Dowlin Forge Road
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

TOC PREV NEXT INDEX