I am trying to generate gsoap classes for the JIRA issue tracking system WSDL. I run these commands to generate the required classes:
$ wsdl2h -o JIRASoap.h <url to wsdl> $ soapcpp2 -C JIRASoap.h
The soapcpp2 command gives the following output, but does not indicate how to fix it.
There were errors: 3 syntax errors 1 semantic error 2 warnings
These are (most of) the errors:
JIRASoap.h(935): syntax error JIRASoap.h(934): Syntax error: input before ; skipped JIRASoap.h(940): syntax error JIRASoap.h(939): Syntax error: input before ; skipped JIRASoap.h(942): **ERROR**: Duplicate declaration of __size (already declarared at line 937) JIRASoap.h(947): syntax error JIRASoap.h(946): Syntax error: input before ; skipped
Here is the relevant portion of JIRASoap.h (lines 928-947):
/// SOAP encoded array of xs:byte[]
class ArrayOf_USCORExsd_USCOREbase64Binary
{ public:
/// SOAP encoded array of xs:byte
class
{ public:
/// Pointer to array of xsd__byte.
xsd__byte *__ptr ;
/// Size of the dynamic array.
int __size ;
/// Offset for partially transmitted arrays (uncomment only when required).
// int __offset ;
} *__ptr ;
/// 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 ;
};
When I try to compile my program, I get this error:
soapStub.h:2799: error: ISO C++ forbids declaration of ‘ArrayOf_USCORExsd_USCOREbase64Binary’ with no type
Here is the relevant section of the WSDL:
<complexType name="ArrayOf_xsd_base64Binary">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:byte[][]"/>
</restriction>
</complexContent>
</complexType>
As far as I can tell, most types are defined in soapStub.h, but ArrayOf_USCORExsd_USCOREbase64Binary is not.
When I generate C only files, I get "struct /*?*/" instead of "ArrayOf_USCORExsd_USCOREbase64Binary".