Forum OpenACS Development: Re: TWiST OpenACS package

Collapse
Posted by Tom Jackson on
Claudio,

The new version of TWiST is 0.9.5, hopefully if you are using the OpenACS wrapper, you can update by changing the version number and restarting OpenACS. The older version will remain in place, and you can switch back if you find a bug.

Here is what the new version adds: with <ws>proc, the ability to use a complexType element name in place of the procArgsList and/or the returnList.

Example (from stockquoter):

# Create input element complexType
<ws>element sequence stock::StocksToQuote {
    {Symbol:stockquoter::symbol {maxOccurs 8 default "MSFT"}}
    {Verbose:stockquoter::verbose {minOccurs 0 default "1"}}
}

# Create output element complexType <ws>element sequence stock::StocksQuoted { {StockResponse:elements::stock::StockResponse {maxOccurs 8}} }

# Use complexType element name in place of lists <ws>proc ::stock::Stocks { StocksToQuote } { set resultList [list] foreach symbol $Symbol { lappend resultList [Stock $symbol $Verbose] } return $resultList } returns StocksQuoted

The result is that the user now has control of the names of the input and output elements.

Collapse
Posted by Claudio Pasolini on
Tom,

the upgrade to version 0.9.5 worked very well and the ability to use an arbitrary complexType element name as input/output of the procs is very useful.

For a number of simple web services this is enough, while as you already pointed out we need something as the announced <ws>operation to deal with more complex cases.