The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Exposing a Web Service

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Exposing a Web Service Posted: Oct 3, 2005 12:52 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Exposing a Web Service
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

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:

Browser View at start

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:

Initial Wizard View

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:

Select the API

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:

Defining the Interface

Next, we tell the wizard what to call the class that will support the actual server API, and what package to shove it into:

Generating the Server

Next, we tell it to generate a client for us:

Generating the Client

With that done, the wizard hands us some code suitable for use as a simple test case, in a workspace:

Initial Wizard View

Last, we want it to generate some WSDL, so that other tools (or even another Smalltalk image) can talk to this service:

Generating WSDL

Once we've done all that, you should have a client and server suitable for testing - as seen below:

Generated code in a Browser

And that's pretty much it - it works the same way for more complex cases. All in all, pretty easy to work with.

Read: Exposing a Web Service

Topic: Splogging the engines Previous Topic   Next Topic Topic: New BottomFeeder 4.0 Build coming

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use