My favorites | Sign in
Project Logo
                
Search
for
Updated Jan 04, 2008 by gerald.lester
Labels: Featured, User_Guide
WSServer  

Web Service Server Side -- Creating a Tcl Web Service

Introduction

The Web Services package, WS::Server, is not a standalone application, but rather is designed be a "module" of TclHttpd. The following command is normally placed in httpdthread.tcl:

Loading the Web Services Server Package

To load the web services server package, do:

 package require WS::Server

This command will only load the server the first time it is used, so it causes no ill effects to put this in each file declaring a service or service procedure.

Defining a Service

The code that defines a service is normally placed in one or more files in the custom directory.

Procedure Name: ::WS::Server::Service

Description: Declare a Web Service, the following URLs will exist

  1. /service/ServiceName
  2. Displays an HTML page describing the service
  3. /service/ServiceName/wsdl
  4. Returns a WSDL describing the service
  5. /service/ServiceName/op
  6. Invoke an operation

Arguments: this procedure uses position independed arguments, they are:

Returns: Nothing

Side-Effects: None

Exception Conditions:

Pre-requisite Conditions: None

Defining an Operation (aka a Service Procedure)

Procedure Name: ::WS::Server::ServiceProc

Description: Register an operation for a service and declare the procedure to handle the operations.

Arguments:

where typeName can be any simple or defined type and commentString is a quoted string describing the field

Returns: Nothing

Side-Effects:

  1. A proceedure named ServiceName::OperationName defined
  2. A type name with the name OperationNameResult is defined.

Exception Conditions: None

Pre-requisite Conditions: ::WS::Server::Server must have been called for the ServiceName

Declaring Complex Types

See: Creating a Web Service Type from Tcl


Comment by lvirden, Jun 11, 2009

Is the flag "-decription" or "-description"?


Sign in to add a comment
Hosted by Google Code