Hello,
I have built my RO-server, where its services are primarily consumed via BinMessage. So, there is 3rd party application, which needs consume my services via SOAP protocol. Due to SOAP message content validation, 3rd party application have to know if elements inside of message are required or not. Usually, according to common XML schema conventions, this is done with “minOccurs/maxOccurs” pair of xs-attributes, but I have not found a way how to include such information in WSDL document, which is exposed from my RO-server.
Lets have a piece of RODL:
<Struct name="MyStruct">
<Elements>
<Element name="MyRequiredField" DataType="Integer">
<Element name="MyOptionalField" DataType="Integer">
</Elements>
</Struct>
Inside of WSDL, this structure is exposed as follows:
<xs:complexType name="MyStruct">
<xs:sequence>
<xs:element name="MyRequiredField" type="xs:int" />
<xs:element name="MyOptionalField" type="xs:int" />
</xs:sequence>
</xs:complexType>
In this scenario, 3rd party application has no chance to discover that “MyOptionalField” is really optional, not required, value for this element could not be provided. So, I need to change WSDL document in this way:
<xs:complexType name="MyStruct">
<xs:sequence>
<xs:element name="MyRequiredField" type="xs:int" />
<xs:element name="MyOptionalField" type="xs:int" minOccurs="0" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
Any ideas how to do this?
Thanks, regards from Prague
Jaroslav