Board index » delphi » Specify multiple values

Specify multiple values


2006-02-06 08:33:03 PM
delphi129
Hello,
i have imported a WSDL and the following type was generated:
aOptionType = (Option1, Option2, Option3, Option4, Option5);
Additionally the is a property in one of the generated classes:
property Options: aOptionType;
When i set "Options := Option1" i get the following tag in the request:
<Options>Option1</Options>
According to the documentaion of this server the following can be possible:
<Options>Option1</Options>
<Options>Option3</Options>
<Options>Option5</Options>
This should set Option1, Option2 and Option5.
With the imported WSDL this is not possible, i think (as a workaround i have
defines additional types, some option type and a set of these option types,
and create these tags with some string processing before the request goes to
the server).
Is there any way in Delphi to create multiple tags in such a situation for a
single property?
Thanks in advance,
Ralf
 
 

Re:Specify multiple values

I have the same serious problem :-(
I experienced that Delphi has a problem with importing
maxOccurs="unbounded"
It always generates a simple Type instead of an array or set.
The WSDL-Importer has this bug since several years! I found the first bug
report
about 2001.
"Ralf Kaiser" <XXXX@XXXXX.COM>schrieb im Newsbeitrag
Quote
Hello,

i have imported a WSDL and the following type was generated:

aOptionType = (Option1, Option2, Option3, Option4, Option5);

Additionally the is a property in one of the generated classes:

property Options: aOptionType;

When i set "Options := Option1" i get the following tag in the request:

<Options>Option1</Options>

According to the documentaion of this server the following can be
possible:

<Options>Option1</Options>
<Options>Option3</Options>
<Options>Option5</Options>

This should set Option1, Option2 and Option5.

With the imported WSDL this is not possible, i think (as a workaround i
have
defines additional types, some option type and a set of these option
types,
and create these tags with some string processing before the request goes
to
the server).

Is there any way in Delphi to create multiple tags in such a situation for
a
single property?

Thanks in advance,
Ralf

 

Re:Specify multiple values

"Hoffmann" <XXXX@XXXXX.COM>schrieb im Newsbeitrag
Quote
I have the same serious problem :-(
I experienced that Delphi has a problem with importing
maxOccurs="unbounded"
It always generates a simple Type instead of an array or set.

The WSDL-Importer has this bug since several years! I found the first bug
report
about 2001.

Hi,
my current solution is to override the methods "SOAPToObject" and
"ObjectToSOAP" of the TRemoteable descendant where i have the problem.
Inside these methods i can parse the given text or iterate throgh the
childnodes of the given XMLNode to set/read the values (additionally i have
added some new helper properties to store the additional infos)
Hope this idea helps you too.
Ciao,
Ralf