Datasports on Software Development

Articles and updates from Datasports about the craft of software

Archive for November 2010

Datasports WebServiceListener Adapter

with one comment

1. Overview

NOTE: This article documents a component that is available via the StreamBase Component Exchange (SBX).

The Datasports WebServiceListener adapater is a sample adapter that shows how to create an input adapter which exposes a webservice. It is not a general-purpose component as-is, since the webservice interface is not particularly useful and is specified in code. It is meant as a guide or tutorial used in conjunction with this article.

The adapter features a configurable URI for the webservice, optional run time control interface, and a webservice that exposes 2 methods, with a corresponding output port for each. A remote call to either webmethod results in a tuple being sent out from the corresponding output port. The methods signatures are:

public boolean NewMessage(String notificationMessage)
public boolean SetValue(String key, String value)

Both methods return a boolean indicating success in processing the call. For instructional and experimental purposes, both methods will fail (and return false) if the first parameter contains the string literal “FAIL” (case insensitive).

In addition to the adapter project and a StreamBase application that contains it, this package includes both Java and .Net clients for testing. The Java client is a non-GUI application with hard-coded test values, the .Net client is a WinForms application that lets the user enter parameters, invoke methods, and see results through a GUI.
Read the rest of this entry »

Written by datasports

Nov 16, 2010 at 8:07 PM

Posted in Adapters, SBX, Tutorials