I should do a screencast on this, but I don't have time for one today. This is the other side of the client demo I showed off a week or so ago. Let's say you want to expose some Smalltalk service as a web service - how does that work? Well, let's posit a class like this one, with a simple API. These are all reduced size images; you can click through any of them for a full size image:
So what we have is a simple class, with a method that answers a Timestamp. What we want to do is expose that as a service. So, we grab the wizard from the launcher after loading the WSDL Wizard support, and select the appropriate option:
Then, we select the class we want to expose, and select the method(s) (via the list of protocols) that we want to make available:
Next, we have to define the service interface - Smalltalk is dynamically typed, but not everything in the world is - so we have to define the type information that this API will expose. The wizard supports defining complex data types, but this example posits a simple one - Timestamp:
Next, we tell the wizard what to call the class that will support the actual server API, and what package to shove it into:
Next, we tell it to generate a client for us:
With that done, the wizard hands us some code suitable for use as a simple test case, in a workspace:
Last, we want it to generate some WSDL, so that other tools (or even another Smalltalk image) can talk to this service:
Once we've done all that, you should have a client and server suitable for testing - as seen below:
And that's pretty much it - it works the same way for more complex cases. All in all, pretty easy to work with.