I'm trying to build a TWiST service using the new API that you provided to deal with complex types and I've posted for reference the code at http://demo01.vestasoft.com:8001/twistsample.txt and the responses at http://demo01.vestasoft.com:8001/twistresponses.txt or you can try them live at http://demo01.vestasoft.com:8001/twist/ws/parties
The first operation parties::PartiesQuery mimicks your stock2::Stocks example and returns the complex type parties::OneParty made up of a fiew simple types. Actually, given an input request that specifies a party type, the operation queries a table and returns some attributes for every party of the given type.
With the second operation parties::PartiesQuery2 I'd like to return the complex type parties::Result made up of the simple type parties::partiesNumber, wich holds the number of parties retrieved, and the already existing complex type parties::OneParty.
The response contains only the first party of the list, ignoring the others and I don't understand if this depends from the way I constructed the returnList within the proc or from some other reasons.
I tried several variations, one of wich is parties::PartiesQuery3 where I built the resultList in a
different way, but then the system complains about "Missing value for required Element CreationDate with no default value calling ::namespace inscope
::wsdb::elements::parties::OneParty::CreationDate new".
What I'd like to do next is to create a service that accepts a parties::Parties complex type made up of a sequence of
parties:OneParty and returns a list of party_id after creating them. Do you think that this is possible with TWiST? I tried to define {OneParty:elements::parties::OneParty} as the argument of the proc, but the system complains about not finding the corresponding ::validate proc.
A last question about the automatically generated names of the Request and Response elements: do you think that they could be parameterized?
TIA,
Claudio