I use soapcpp2 compiler to create .wsdl files from manually created .h - files.
It is very good way to describe wsdl in simple familiar way, I like it very much )
But I have some issues. I do not know how to describe complexType that is a restrinction of other complexType.
I have base complexType "HrefItem" with string element,
and I need to have restricted type based on "HrefItem"
How to do it with "C++-like defenitoion" ?
In .wsdl I can write the things like this:
<complexType name="HrefItem"><!-- ns__HrefItem --> <sequence> <element name="typeName" type="xsd:string" minOccurs="0" maxOccurs="1"/> <sequence> </complexType> ... <simpleType name="ScheduledReportEventNameValue"> <restriction base="xsd:string"> <pattern value="ScheduledReportEvent"/> </restriction> </simpleType> ... <complexType name="ScheduledReportEventHref"> <complexContent> <restriction base="ns:HrefItem"> <sequence> <element name="typeName" type="ns:ScheduledReportEventNameValue" minOccurs="1" maxOccurs="1" default="ScheduledReportEvent"/> </sequence> </restriction> </complexContent> </complexType>
But I do not know a way to write an .h defenitiions to create the " complexType / complexContent / restriction " elements, that are listed below.
if I use
class ns__ScheduledReportEventHref : public ns__HrefItem ...
It will create extention of complexType and " complexType / complexContent / extention ". tags in wsdl.
That should I do to describe restriction of complex type ?
Right now, inheritence is always by extension even though you can override the value space of members, which can make them more restrictive. Perhaps another type annotation can do this or checking if the derived type only overrides members will do. But that still leaves some potential misuses possible such as adding members in the derived class, meaning it would be an advanced feature that requires some skill to write. Not sure if this is 100% desirable.