Tutorial 2009-01: WebService Part1 - What are WebServices
This is the first part (3 in total) of the Tutorial "4GL WebServices in a Nutshell"
What are WebServices
A WebService is defined by the W3C as "a software system designed to support interoperable machine-to-machine interaction over a network". Web services are frequently just Internet application programming interfaces (API) that can be accessed over a network, such as the Internet, and executed on a remote system hosting the requested services. Other approaches with nearly the same functionality as web services are Object Management Group's (OMG) Common Object Request Broker Architecture (CORBA), Microsoft's Distributed Component Object Model (DCOM) or SUN's Java/Remote Method Invocation (RMI).
The W3C Web service definition encompasses many different systems, but in common usage the term refers to clients and servers that communicate over the HTTP protocol used on the Web. Such services tend to fall into one of two camps: Big Web Services and RESTful Web Services.
"Big Web Services" use Extensible Markup Language (XML) messages that follow the Simple Object Access Protocol (SOAP) standard and have been popular with traditional enterprise. In such systems, there is often a machine-readable description of the operations offered by the service written in the Web Services Description Language (WSDL). The latter is not a requirement of a SOAP endpoint, but it is a prerequisite for automated client-side code generation in many Java and .NET SOAP frameworks (frameworks such as Spring, Apache Axis2 and Apache CXF being notable exceptions). Some industry organizations, such as the WS-I, mandate both SOAP and WSDL in their definition of a Web service.
More recently, REpresentational State Transfer (RESTful) Web services have been regaining popularity, particularly with Internet companies. These also meet the W3C definition, and are often better integrated with Hypertext Transfer Protocol (HTTP) than SOAP-based services. They do not require XML messages or WSDL service-API definitions.
What do you really need to know and learn about WebServices?
This really depends on what tool you are using.
With most tools (not Querix), you need to learn about :
WebService Concept Architecture
Relationship between Web Service Standards

Web Service Protocol Stack

Web Service Standards and Terminology
- WS-Security
- A set of specifications providing end-point security.
- WS-Policy
- Allows services to advertise their policies and policy requirements
- WS-ReliableMessaging
- WS-Coordination
- WS-Transaction
- Atomic Transaction or Business Activity
Now, we can use a simplified explanation: what you need to know when using Querix :
‘What is a WebServices – Simplified Definition’
With Querix, you don’t need to know or bother about any of these. To make WebServices “As simple as possible, and not simpler” (Albert Einstein), we created a new generation of WebService tools which are simple to use, but still powerful and compliant to the world of WebServices.
With the 4GL Lycia development tools, providing and accessing WebServices are means of clicking a few buttons with the provided WebService Accessor and Deployment Wizzards
Cutting through all the terminology, Web Services are quite simply a means of allowing one system to ‘talk’ to another, accessing its functionality, without having to worry about how the other system is implemented.
You can see it like a stored procedure or a function in an external libray. A WebService can be called at any time by knowing it’s identifier, may be with arguments and you know if it returns data, the order, quantity and datatype of the returned data return.
Web Services are typically defined as a system enabling interaction between systems over networking. The most widely accepted standard for messaging between systems is SOAP
Different systems are able to communicate with each other by calling methods via TCP/IP. Interaction occurs independently of the operating system, or the implementation language.
Once a system is enabled for Web Services, there are no significant further costs of integration, no matter how complex the system becomes.
What is a WebService Client - Simplified
4GL applications can access any WebService methods provided by third party service providers like Google to utilize real time information like Maps, currency conversion and stock exchange market data. An example would be to display the geographical location of a customer in your contact management application including the calculation of routes.
What is a WebService Provider (Server) - Simplified
WebService provider functionality allows you to offer any of your business logic modules to be used by any other application written in 4GL or other development languages like Java or C++.
So, when do we need WebServices?
In the fast changing IT world, it is often necessary, for various sociological factors, to integrate systems into a larger system. Where the systems we integrate are not homogeneous, this can present very difficult decisions … i.e. to rewrite the existing logic, or to adapt the logic.
There are many situations where WebServices are required to integrate systems such as:
- The need to provide data to a third party or access data provided by a third party source
- eg. Stock market, currency exchange rate, google services such as search engines, maps, …
- Companies merge
- Company A & B merge. Both have got their own applications to manage their business
- Company has got different departments which communicate via ‘Paper’
- Company opens new department in different geographical location
The classical concerns when integrating systems
- Rewriting components has a high cost
- Sociological factors may change.
- New Departments emerge
- Business may expand to new areas
- Adapting components increases in cost as systems are added
We will demonstrate this now by an extraction of a simple, small case study.
Small Example Case Study
A small/simplified demonstration on how this could apply to the real world. We take a fictional company called ‘BigDollar Stationary’
‘BigDollar Stationary’
- ‘BigDollar Stationary’ founded in 1985, specialised in supplying local business in the the State Michigan with Stationary. They developed their own ‘Warehousing’ application using Informix 4GL running on Informix Online / Solaris.
- In 1991, the orders department, overwhelmed with paperwork, purchases an order tracking system from ‘LittleShipSmart inc.’
- 1998, ‘BigDollar’ acquired ‘BigEuro Stationary’ which has got an existing accounting system. BigDollar chooses to use the accounting system in their head office.
- Now, ‘BigDollar’ wants to create their own online ordering system.
What is the impact of this new System?
- Currently, orders are received by telephone and by mail, and are processed by the sales staff.
- Staff members are able to access the different company systems from their workstations.
- Upon receiving an order, the sales staff will first check stock availability by accessing the warehousing system, or by calling the warehouse department.
- Once stock is allocated, an invoice is prepared, and passed to the accounts department.
- An online ordering system needs to process an order instantly – there is no human involvement.
- The ordering system needs to automatically allocate stock, and invoice.
- The ordering system also needs to be able to automatically process payment, if the order is not on account.
The ‘Online Ordering’ system needs to process an order instantly
‘BigDollar Stationary’ Apps. System

Option 1: Integrate by Re-write
- Entire system is re-engineered
- o Everything has to be written in the same language may be even for one individual OS
- All Databases have to be merged
- Sales, Accounting, Orders, Etc…
- Staff has to be re-trained to use new system.
- Classical Teething problems
- If nothing changes, everything is fine but in the real world…

Now, BigDollar needs to integrate another new system..

The never ending story!
This solution did not address the real problem!
Option 2: Integrate using SOA
- Individual systems are modified to expose required functions.
- New systems access the functionality (functions) in the existing systems using SOAP or HTTP.
- Adding more systems will require no further changes.
‘BigDollar Stationary’ Apps. System using WebServices
The advantage is clear - The application does not require to be re-engineered if it is required to integrate a new system:
Big Dollar System with another system:

So, let’s look a little closer at SOAP
What is SOAP
- Service Oriented Architecture.
- Business processes are packaged as services.
- Systems are comprised of services, which interact through discrete messages.
Benefits of SOAP
-
• Allows application systems to communicate with each other, regardless of:
-
o Operating sytem (e.g. Windows, Linux, AIX, etc).
-
o Development language (4GL, Java, C#, etc).
-
• Low cost of adding components to system.
SOA Terminology
Things you don’t have to care about…
-
• REST
-
o Representational State Transfer
-
• SOAP
-
o Simple Object Access Protocol
-
• MTOM
-
o Message Transmission Optimization Mechanism
-
• SOAP with Attachment
-
o SOAP message with one or more attachments
All you need to know…
Web Service Requester & Provider
See them simply as:
- external functions which you can access or
- your own functions which you want to make available for others to use.
WSDL
WebService Description Language
Well, you only need to know that WSDL describes the communication with the corresponding WebService.
What did ‘BigDollar Stationary’ do?
- The ordering system needs to trigger the invoicing system to create an invoice
- The invoice system needs to trigger the warehouse to ship the items.
- The ordering system requires information on the availability of the stock items from the warehousing system.
- The accounting system requires the shipping and billing address of the ordering system.
- The warehousing system requires the shipping address from the ordering system.
WebService Systems Interaction
Some example messages between the systems…



