Web Services Overview:
Web Services are services available over the web that enables communication and provide a standard protocol for communication. To enable the communication, we need a medium (HTTP) and a format (XML/JSON).
There are two parties to the web services, namely Service Provider and Service Consumer. A web service provider develops/implements the application (web service) and makes it available over the internet (web). Service Provider publishes an interface for the web services that describes all the attributes of the web service. Service Consumer consumes the web service. For the Consumer to consume the web service, the consumer has to know the services available, request and response parameters, how to call the services and so on.
Hence we can define Web Service as a standardized way of integrating web desk applications using XML, SOAP, WSDL and UDDI open standards over an internet protocol backbone. XML is used to tag the data. SOAP is used to transfer the data. WSDL is used for describing the services available and UDDI is used for listing what services are available.
Why Web Services
Web Services is used mainly for two reasons:
- Platform agnostic communication
- Two different applications can talk to each other and exchange data using web services
PowerCenter Web Hub and Web Services
InformaticaPowerCenter has the ability to expose its job (workflow) as a SOAP web service which can be utilized from external applications to access the data integration functionalities even outside Informatica PowerCenter.
This blog post gives an overview of web service, explains how to create web source and targets, create workflows and test the functionality from Web Service Hub.
- InformaticaPowerCenter Repository and Integration Service up and running
- InformaticaPowerCenter Web Service Provider Valid License
- Administrative privileges to create Web Service Hub
Figure 1: Informatica Web Service Provider Architecture
Step by Step Process
Web Service Hub Creation Steps:
Log into Informatica Administrator Console. Right Click on the Domain and choose Web Service Hub and provide the Name, port, and License. Choose the repository service where your web service workflow has been created. Also, make sure the Web Service Hub is enabled.
Creating a WebService Provider Source and Target using Web Service Provider
Go to Source Analyzer click on Web Services Provider * Create Web Service Definition if you want to provide the port names manually or you can choose Import from WSDL which contains SOAP Request and Response message object
Creating a Mapping
Create a PowerCenter mapping which involves the set of transformations which you want to perform. The mapping must have only one WebService Provider Source and Target. In this example, Name, when passed as an input, tries to retrieve the Type and Key.
Creating a Session and Workflow
Create a session task and plug that into a Workflow. Go to Workflow properties and Enable Web Services. Click on the Config Service and select the properties accordingly.
Service Name: Provide a service name which will be visible under RealTime WebService Hub.
Maximum Run Count per Hub:Refers the maximum number of Workflow instances that can run at the same time for one particular Web Service. If the first instance of the workflow takes longer than the Service Time threshold, a second instance will be started.
Timeout: Set the transaction Timeout in seconds.
Web Service Hubs: Choose the hub(s) where you want your service to be exposed.
Protected: Check this when you service request requires authentication. Not every web service client can access when it is set to Protected.
Visible: This has to be checked, only then the service will be listed in Web Service Hub and WSDL can be generated out of that.
Runnable: If runnable, a web service client can start the workflow or invoke the service while the workflow is running. If not runnable, a web service client can invoke the service while the workflow is running, but cannot start the workflow.
Testing your service:
Open the service URL provided in the hub. Choose your service under Valid WebService and click on Try it and send your Name SOAP Request
You should be getting the SOAP Response with Key, Type for the matching Name.
This concludes the Informatica WebService Provider configuration. We can export the WSDL out of it which can then be accessed by any of the external Web Service clients. We can also make it as a secured Web Service by enabling https while creating the Web Service Hub.