Planning for web services
You can create multiple web services to display various slices of data in your IBM® Product Master server system to other applications and to facilitate loosely coupled integrations and service-oriented architecture (SOA). Product Master provides some standard integration capabilities, for example Data Access Service (DAS) to help you integrate with upstream and downstream systems easily.
Types of web services
You can host simple web services without the needing complex setup. In addition, experienced web service developers can host more complex services by handling the deployment details themselves.
- Simple web services
- In simple web services, only simple types, such as String and Int, are sent and received as arguments and returns from methods, you need to inform Product Master of the Java™ class that provides the implementation for the web service. Product Master handles the optional generation of Web Services Description Language (WSDL) and creation of Web Services Deployment Descriptor (WSDD) for the deployment of the service.
- Complex web services
- In complex web services, WSDD can be supplied to configure the ability to send and receive more
than simple types. The WSDD must be authored and supplied to Product Master in the WSDD entry
field in the Web Service Console by using either Java API, or through the
WebService::setWsddDocPath()
method of script API. Product Master uses the WSDD that is supplied in this manner to deploy the defined service, rather than using built-in WSDD. To author your own WSDD, you must have a good understanding of web services, the Java2WSDL, and WSDL2Java tools.Important: If you are using the Java API, you should become familiar with creating, deploying, and starting web services. You should understand the following concepts: web services, XML, WSDL, WSDD, SOAP, Axis, RPC/Encoded, Document/Literal, and JAX-RPC.
Web Service Description Language (WSDL)
- Create a web service to comply with a third-party WSDL that defines your web service.
- Start with a functional design from which you code the Java and then derive the WSDL.
Web services Deployment Descriptor (WSDD)
WSDD is 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 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.
Web services features
Product Master 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 Product Master application server. This allows other external clients or applications to interact within Product Master exactly as required by the external clients.
- Decodes the incoming request parameters,
- Runs a query against the data model to fetch the appropriate information,
- Formulates a response message.
- Web services support real-time integration and loosely coupled integration.
- Web services support running of queries. You can run queries in Product Master by using the web services. Note: Do not run queries directly on the Product Master databases because of the way data is stored.
Factors for web services
- Service-oriented architecture (SOA)
- How you can implement web services to achieve SOA..
- Advantages and disadvantages
- Web services are good for real-time small data transfers (over HTTP) but might not be viable for large amounts of data.
- Overall timeline and budget impact
- Though you can display any part of your Product Master 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
- Depends on the following factors:
- Client readiness - Most of the clients who implement the Product Master 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 IBM MQ and flat files.
- Web services granularity
- As a solution architect, you might need to plan for these consideration,
- Amount of data that is returned as a web service response. 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.