Using SOAP "choice" type

Hi,

I’m trying to connect to a WebService which has some complex types designed as this:

<xs:element name="FeedbackResponse">
  <xs:complexType>
    <xs:choice>
      <xs:element name="NoFeedback" type="EmptyType" />
      <xs:element name="Feedback" type="FeedbackType" maxOccurs="unbounded" />
    </xs:choice>
  </xs:complexType>
</xs:element>
<xs:complexType name="EmptyType"/>
<xs:complexType name="FeedbackType">
  <xs:sequence>
    <xs:element name="ainteger" type="xs:integer"/>
    <xs:element name="astring" type="xs:string"/>
  </xs:sequence>
</xs:complexType>

I tried to import the WSDL with Service Builder but it wasn’t able to manage those types.
So, my questions are: is it possible to describe them in RODL way and convert them to a Delphi interface ? If not, is it, at least, possible to write the interface by myself ? (and, if yes, how? :smile:)

I tought about using a Struct with nillable parts but I’m not sure.

Hello

Could you please provide (via support@ ) gull WSDL that uses this data type?

Thanks in advance

Hi,

I just send it

Thanks for your help.

Hello

Thank you for the WSDL. We narrowed down and fixed the issue. Also I sent you the converted RODL back.

Regards

Hi,

thanks a lot for the RODL.

If I understand correctly, the solution is to have two optional parameters and let the WebService send one or the other. But, from RO side, we’ll be able to handle all scenarii: one parameter, and also no or two parameters (i.e. buggy webservice). But there will be no check to ensure there’s one-and-only-one parameter.
Is that correct ?