Think of writing Windows applications that use Web Services. Probably most applications will display the result data to the end user. How will it be displayed? traditionally, you would use textboxes and listboxes to display data to the end user. Very boring. Wouldn't be better to embed a webbrowser ActiveX control on your form and generate HTML to display your Web Service results as formatted text and graphics? We all know that power of HTML by now. HSP and WOW now make it possible to effectively use HTML in your Windows applications thereby adding style to your applications like never before. Why use traditional, boring display mediums when you can use HTML?
Our WOW and HSP sample downloads include the GetWeather Web Service sample that demonstrates what we are saying. Below is an actual screenshot from the sample. The program calls the tempuri.org GetWeather web service and uses HSP to run an ASP webpage to generate the HTML you see below.
As an example, suppose you have an application that
embeds IEX controls and uses HSP. And suppose that your
application uses and database and you keep a persistent
ADO connection in a global variable to be used throughout
your program. Rather than having to create new, separate
ADO Connection objects in your ASP pages every time they
run, you can inject the program's ADO object into the HSP
scope via the Server object's SessionVar property.
This is actually the same "Session Variables"
collection you access via the Session object in your ASP
Example. In your VB code, you have a global ADO
Connection object named "g_dbCnn", and an
embedded IEX control named "ieUserGroup". Here's
how you would use this feature.
As you can see, this sort of display is quite
compelling. Using WOW and its border properties, no one
need even know its an embedded webbrowser control.
There are several ways you can use HSP with Web
Services and achieve the same result.
For example, in a C#, C++ or
VB program, you could:
Call the service in your application code, get
the results, and 1) format the results into HTML in
your code and set the "Text" property of the
WOW control, or 2) load an ASP page, passing the
results as query strings for the code in the ASP
page to pick up and use.
Create a COM object that calls the service
(or just use the SOAP Client COM object) and use this
object in ASP code to call the service, provide the
results and display them in ASP.
Call the service entirely through script in an ASP
page by building the XML SOAP message in your code and
display the results.
HSP is the ideal tool to use with Web Services.
Embedding the IE web browser control makes it much easier
and attractive to display graphics and text data from Web
Services in your Windows applications.