[xsd-users] XSD compiler generate bad constructor. Ambiguous call
to overloaded function
Haga, Ulf
Ulf.Haga at gyros.com
Thu Jan 31 04:22:23 EST 2013
Hi!
Our company Gyros has bought a license. If you can't find it let me know.
We problem is that the XSD compiler generate a bad constructor.
XSD:
<xs:element name="InstrumentConfigXml" id="InstrumentConfigXml" type="CInstrumentConfig" />
<xs:complexType name="CInstrumentConfig">
<xs:sequence>
<xs:element name="SystemName" type="xs:string"/>
<xs:element name="Guid" type="xs:string"/>
<xs:element name="GyrolabContent" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:any processContents="skip">
</xs:any>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
XSD Compiler generate:
...
CInstrumentConfig (const ::xercesc::DOMElement& e,
::xml_schema::flags f = 0,
::xml_schema::container* c = 0);
..
Our C++ code:
CInstrumentConfig::GyrolabContent_type gxmlGyrolab(*myDomElement);
Problem:
Visual C++ 10 compiler gives this error: GyrolabContent::GyrolabContent' : ambiguous call to overloaded function
The Visual C++ 10 compiler can't decide to use gxmlGyrolab(*myDomElement) or gxmlGyrolab(*myDomElement,0,0);
There is no compiler error with this code gxmlGyrolab(*myDomElement,0,0);
xsd.exe cxx-tree --generate-serialization -show -sloc -name space-map http://gyros.com/gyrosxml/12/03=gyrosxml_12_03 -output -dir C:\GSS\WebServiceC++\Api\src --generate-wildcard instrument_commands.xsd
Regards Ulf Haga
More information about the xsd-users
mailing list