The integrated Web services server makes creating ILE-based Web services as easy as 1-2-3 (well, almost as easy)!
You've all heard the hype surrounding Web services and Service-Oriented Architecture (SOA). You possibly have done some research and probably got overwhelmed by the amount of information out there and may have begun to doubt that this stuff can benefit your business. Or maybe you wanted to prototype some business function using Web services and wondered how you can implement Web services on IBM i without having to hire a cadre of consultants.
In this article, we will try to answer all these questions, but first let us define Web services and SOA and explain how they can help a business improve the bottom line.
Web Services and SOA
Let's start with some definitions. A Web service is a repeatable business task that an application can invoke over the Web. Web services are self-contained and self-described. Basically, the Web service encapsulates the business logic that is exposed to the outside world via a contract. This contract, the Web Services Definition Logic (WSDL), identifies such things as the location of the service, the transport protocol, and the operations that can be invoked. The message flow between the client and Web service is based on the eXtensible Markup Language (XML), a standard way of passing data. Note that the Web service is programming language-neutral; you can write a Web service using RPG or COBOL or any other language.
Depending on your perspective, SOA means different things. From the business perspective, SOA is a set of services that a business wants exposed within the enterprise or between clients and partners. From an architectural perspective, SOA is an architectural style that supports service orientation in which your business is integrated as linked services. From an implementation perspective, it is a programming model complete with standards, tools, methods, and technologies such as Web services. And from an operations perspective, it is a set of agreements between service requestors and service providers that specifies the quality of service and identifies key business and IT metrics.
Where Have I Heard That Before?
At this point, you may ask yourself whether this is just a rehashing of object-oriented programming, and that's a good point. But the answer is no. SOA is different from past approaches and strategies for the following reasons:
- SOA is based on standards. Broadly adopted Web services ensure well-defined interfaces. In the past, proprietary standards limited interoperability.
- SOA services are linked dynamically and flexibly. In the past, service interactions were hard-coded and dependent on the application.
- SOA services can be extensively reused to leverage existing IT assets. In the past, any reuse was within siloed applications.
- SOA services focus on business-level activities and interactions. In the past, focus was on narrow, technical sub-tasks.
So What Are the Benefits of Implementing Web Services and SOA?
There are a host of benefits, including decreased cost, reduced risk, improved flexibility, and increased revenue.
But the central, overriding benefit of SOA and Web services is making a business more nimble. A nimble business can innovate faster and has the ability to introduce new products and services, enter or create new markets, and revamp business processes--as soon as you envision them.
How Do I Get Started with Web Services on IBM i?
Web services can offer a maze of complexity for the developer, which sometimes appears overwhelming. Perhaps the industry has over-complicated the message of Web services with SOA by focusing on all the infinite possibilities and not providing a clear path. In addition, prior to December of 2007, it was not easy to create an Integrated Language Environment (ILE)-based Web service on IBM i if you did not have experience with WebSphere Application Server and WDSC. But things have changed. In December of 2007, IBM released support for Web services that is integrated as part of the operating system (this was released in i 6.1 and PTFed back to i 5.4). In order to get this support, simply load the latest HTTP group PTF for the release of the operating system you are on. To see the latest group PTF by release, go to http://www-912.ibm.com/s_dir/sline003.nsf/GroupPTFs.
The crown jewel of the integrated Web services support is the support surrounding the creation of ILE-based Web services. There are three key pieces:
- The ILE RPG and COBOL compilers
- The integrated Web services server
- The IBM Web Administration for i interface
Let us look at each of these, starting with the ILE RPG and COBOL compilers.
Enhancements were made in the RPG and COBOL compilers that allow the storing of Program Call Markup Language (PCML) data as part of the module object. PCML, which is based upon XML, is a tag syntax you use to describe the input and output parameters of program objects.
The integrated Web services server is a server that hosts Web services. It's built on the powerful yet lightweight integrated application server and best-of-breed technologies in support of Web services, which includes the Apache Axis2 Web services engine. The Web services server currently supports the following:
- Dynamic generation of WSDL documents
- WSDL 1.1 and SOAP 1.1
- SSL and basic authentication via HTTP server front-end
Finally, to bring this all together, the IBM Web Administration for i interface is the way to create Web services servers, deploy ILE-based Web services, and manage Web services. An eight-step wizard takes you through the painless process of externalizing programs or service programs as a service, and it can do this because of the PCML data attached to the module objects. It is truly that simple! Once deployed, your ILE-based Web service is ready to handle requests from any client.
An important point to keep in mind when deploying ILE-based Web services is that it is not necessarily true that you have to rewrite your business logic or modernize it in order to deploy the business logic as a Web service. Nothing could be further from the truth. Sure it would be nice, but if it works, then simply deploy as-is. Nothing prevents you from updating the business logic in the future as time allows.
That's it from the server side of things. But we would be remiss not to mention the integrated Web services client for ILE, which is a piece of technology that allows you to generate a C or C++ stub from a WSDL document. The stub hides the complexity of communicating with a Web service. These are some of the characteristics of the integrated Web services client for ILE:
- Supports document-style literal only
- Complies with Web Services Invocation (WSI) 1.1 basic profile
- Supports Secure Sockets Layer (SSL)
The C stub can be called by an RPG or COBOL application, allowing an ILE application to act as a Web service requester.
More information on the integrated Web services support can be found at
So What Are You Waiting For?
IBM i is made for business. It is rock-solid and proven. And now with the integrated Web services support, there's no reason not to hop on the bandwagon that is Web services and SOA. Give it a try. You will be surprised how easy it is. Really.