I am generating a wsdl file from a C header file while contains similar types of structures. Using soapcpp2, I am able to generate wsdl file which contains duplicate complexTypes as some structures were similar. Is there any way to get of redundant complexTypes?
Because when I am using wsdl2h to generate C++ header file, it contains the class definition for same class multiple times and soapcpp2 does not like it and throws some semantic errors (due to redefinition of class).
for example, a complexType in wsdl file :
<complexType name="ArrayOfint">
<complexContent>
<restriction base="SOAP-ENC:Array">
<sequence>
<element name="item" type="xsd:int" minOccurs="0" maxOccurs="unbounded" nillable="false"/>
</sequence>
<attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="xsd:int[]"/>
</restriction>
</complexContent>
</complexType>
In C++ header after using wsdl2h,
/// class ArrayOfint operations:
/// - soap_new_ArrayOfint(soap*) allocate
/// - soap_new_ArrayOfint(soap*, int num) allocate array
/// - soap_new_req_ArrayOfint(soap*, ...) allocate, set required members
/// - soap_new_set_ArrayOfint(soap*, ...) allocate, set all public members
/// - int soap_read_ArrayOfint(soap*, ArrayOfint*) deserialize from a stream
/// - int soap_write_ArrayOfint(soap, ArrayOfint*) serialize to a stream
/// SOAP encoded array of xs:int.
class ArrayOfint
{ public:
/// Pointer to array of int.
int *__ptritem ;
/// Size of the dynamic array.
int __size ;
/// Offset for partially transmitted arrays (uncomment only when required).
// int __offset ;
/// A handle to the soap struct that manages this instance (automatically set).
struct soap *soap ;
};