Planning for web services

Web services is a computing technique that uses XML to exchange data or information between computers and computer programs. You can create multiple web services to display various slices of data in your Collaboration Server system to other applications and to facilitate loosely coupled integrations and service-oriented architecture (SOA). IBM® InfoSphere® Master Data Management Collaboration Server - Collaborative Edition provides some standard integration capabilities, for example Data Access Service (DAS) to help you integrate with upstream and downstream systems easily.

A web service is a software component that is described in XML and Web Services Description Language (WSDL). You can access web services through standard network protocols, typically SOAP over HTTP.

A web service that you create in IBM InfoSphere Master Data Management Collaboration Server - Collaborative Edition is based on WSDL and works with standard SOAP over HTTP protocol.

InfoSphere Master Data Management Collaboration Server - Collaborative Edition supports SOAP over HTTP web services by using Axis, an open source implementation of SOAP. You can host both RPC or encoded and document or literal style web services within the InfoSphere Master Data Management Collaboration Server - Collaborative Edition application server. This allows other external clients or applications to interact within InfoSphere Master Data Management Collaboration Server - Collaborative Edition exactly as required by the external clients. You can write the web services either by using scripts or in Java™.

Each web service in InfoSphere Master Data Management Collaboration Server - Collaborative Edition has a scripting handle that is associated with the following:
  • Decodes the incoming request parameters
  • Runs a query against the data model to fetch the appropriate information
  • Formulates a response message

You can host simple web services to access Collaboration Server system entities without the need for extensive familiarity with Axis and other web service tools. In addition, experienced web service developers can host more complex web service scenarios by handling the deployment details themselves.

Factors to consider when you plan for web services

When you are implementing web services, you must consider and understand the following things:
Service-oriented architecture (SOA)
The service-oriented architecture (SOA) and how you can implement web services to achieve SOA.
General advantages and disadvantages of using web services
Web services are good for real-time small data transfers (over HTTP) but might not be viable for large amounts of data. Depending on the business requirement, a solution architect must determine what is the best mode of integration: web services, WebSphere MQ, or flat files.
Overall timeline and budget impact
Even though you can display any part of your Collaboration Server system data model by using web services, you need to invest effort to construct and test the web services.
Number and type of web services
The number and type of web services that you need to provide depend on the following factors:
Client readiness
Most of the clients who implement the Collaboration Server system use a traditional system environment where the preferred integration solution is flat files. As a solution architect, you must analyze and consider the time that is needed to implement a web service (by the design team) to implement necessary hooks (by the clients), and to complete the integration testing (by the design team).
Real-time versus batch requirements
Web services support real-time requirements. If you do not have real-time requirements, then you can fulfill requirements by using alternatives solutions that run in a batch, such as WebSphere MQ and flat files.
Web services granularity
As a solution architect, you might need to plan for these considerations:
Amount of data that is returned as a web service response
You must consider the limitations of web Services. You can consider implementing a web service to return 2,000 attributes that are associated to an item or a subset (20 attributes). You must not recommend a web service solution to return a huge volume of records.
Number of requests that are handled by a web service
You can decide between creating a parametrized web service such that one web service can cater to multiple types of requests and creating individual web services for each request. This decision does not affect the total amount of work.

Services provided by the web services

Web service is a real-time integration mechanism. InfoSphere Master Data Management Collaboration Server - Collaborative Edition has the ability to not only expose data by using the web services, but also to invoke web services that are implemented by other systems.

Portal integration is a typical example of an incoming web service call. A typical example of an outgoing web service call is when InfoSphere Master Data Management Collaboration Server - Collaborative Edition checks for some information in the customer's backend system to determine some actions.

Some of the things that the web services offer are:
Real-time integration
Web services supports real-time integration and loosely-coupled integration.
Running queries
Web services supports running of queries. You can run queries in InfoSphere Master Data Management Collaboration Server - Collaborative Edition by using the web services.
Note:
Do not run queries directly on the InfoSphere Master Data Management Collaboration Server - Collaborative Edition databases because of the way data is stored.

Web Service Description Language (WSDL)

For both scripts and Java-based web services, you must specify a web Service Description Language (WSDL). A WSDL definition describes in XML how to access the web service and what methods web service will provide. The WSDL definition also serves as the input or output contract for messages between the web service and the client that invokes that web service.

You can create a web service in one of two ways:
By complying

Create a web service to comply with a third-party WSDL that defines your web service.

By coding

Start with a functional design from which you code the Java and then derive the WSDL.

Web services Deployment Descriptor (WSDD)

In addition to WSDL, the web service description must include the fully-qualified Java implementation class (as included in your deployed user .jar) and might include custom WSDD (Web Services Deployment Descriptor). WSDD is another XML definition that tells Axis how to construct the web service from your Java code. Part of this definition involves specifying for each message element, the Java method that it must call and the parameters it must provide to obtain the appropriately formatted data for compliance with the WSDL. The WSDD provides the bridge between the Java object and the message format that is specified in the WSDL.

You can author your own WSDD.

If the WSDD is unspecified, or is specified but does not contain directives, Axis will use the JAX-RPC specification as its guide to determine how to map simple Java types to or from XML. For example, JAX-RPC maps xsd:int to java.lang.Integer.