Web Services: Difference between revisions

From DataFlex Wiki
Jump to navigationJump to search
Started filling this section out properly - lots more to do...
Line 15: Line 15:




 
----


Cornerstone of a modern [[SOA|service oriented architecture]]
Cornerstone of a modern [[SOA|service oriented architecture]]
Line 25: Line 25:
[[Visual DataFlex Studio]] has a tool to use a [[Web Service]] class from dataflex code ( [[VDF Webservice Class]] )
[[Visual DataFlex Studio]] has a tool to use a [[Web Service]] class from dataflex code ( [[VDF Webservice Class]] )
The generated webservice client may use [[Call By Reference]] to return results.
The generated webservice client may use [[Call By Reference]] to return results.


= Coding webservices =
= Coding webservices =

Revision as of 17:48, 21 November 2007

Definition

Web Services are usually defined as "A standard means of interoperating between different software applications, running on a variety of platforms and/or frameworks" [1]. While many possible mechanisms could be found to satisfy this definition, in practice Web Services today (Nov 2007) are commonly implemented using two XML protcols: SOAP - the actual message formatting protocol - and WSDL - the service definition protocol. Again, many low-level transmission mechanisms might be employed to facilitate the message exchange, but in practice almost all common implementations utilise the HTTP protocol and it's POST request.

VDF Implementation

Within Visual DataFlex Web Services are implemented through two mechanisms: one for creating services and the other for creating clients.

VDF Web Services

Visual DataFlex's Web Service mechanism relies on having Microsoft's IIS (Internet Information Services) running on the "server" machine. A service is developed by first creating a WebApp project (program) within the Workspace (if one does not already exist - it is always named "WebApp" and there can be only one such in any Workspace), then creating a Web Service object which will be deployed wihin it.

In the Web Service Object (which will have a source file extension of ".wo") you then create methods (Functions and/or Procedures), which you will subsequently publish.


VDF Web Service Clients


Cornerstone of a modern service oriented architecture


Visual DataFlex Studio has a tool to use a Web Service class from dataflex code ( VDF Webservice Class ) The generated webservice client may use Call By Reference to return results.

Coding webservices

Usually , when coding webservices there are two approaches - "contract first" and "model first".

When using "Contract first" you usually get a WSDL file that your webservice must adhere to. When using "Code first" you typically write the code first and use a tool to generate the WDSL from the code.

The standard approach using Visual DataFlex is to use "code first".