Forum OpenACS Development: Re: Tcl Web Services Toolkit: TWiST

Collapse
Posted by Malte Sussdorff on
More things I noticed while doing the < ws > approach:

1) The Service Description does not get updated. I guess this is because of "

# eventually must add check to delete prior namespace and wsdb code
# also might put in variable to freeze additional changes (better word?)
# this 'freeze' would operate in <ws>proc as well to silently abort and log event" in <ws>namespace init ?

Either way, rediting, I found out that I need to unfreeze my namespace 😊. So I assume that, when I want to change your demo code, I need to make sure to either not freeze the namespace or at least unfreeze it before working on it.

2) I cannot use xsd:: types directly but have to make a type declaration first. Though I am not sure why in your example for stockQuoter you have been generating identical types (::quote, ::dailyMove, ::lastMove). What am I missing here? Wouldn't it be enough to just define stock::float and then use that for the sequence definition? I mean, it worked when I tested it, but maybe there is a deeper meaning behind it which I am unaware of yet.

3) I found the documentation (more or less) for the < ws> functions. Not linked from anywhere, but it seems autogenerated using the man command. I linked it up at http://e4.cognovis.biz/twsdl/doc/api-index.html.

4) I might be wrong, but does < ws>proc check if the data type returned matches the value? I am not sure if it should, but I would probably prefer a server error on my machine than on the querying machine in case the returned type does not match the definition of the to be returned type (as an example, take the dateTime example. If you set the dateTime manually to "TWiST" then it is still returned and I could not find any error /Notice that what I was returning was not of the datetype specified.

5) How can I give a default value that does not have to be filled in. Or, lets be precise, how can I test it? I tried with the stockQuoter example of yours not to pass in the "verbose" value and failed, both with wsdl as well as the web interface. At the moment I have to fill it in, regardless what it says in the definition and this makes me wonder where the trick is.