...

Using a WSDL Data Source within IBM Cognos Virtual View Manager Guideline

by user

on
Category: Documents
1

views

Report

Comments

Transcript

Using a WSDL Data Source within IBM Cognos Virtual View Manager Guideline
Guideline
Using a WSDL Data Source within
IBM Cognos Virtual View Manager
Product(s): IBM Cognos 8, IBM Cognos Virtual View
Manager
Area of Interest: Infrastructure
Using a WSDL Data Source within IBM Cognos Virtual View Manager
2
Copyright and Trademarks
Licensed Materials - Property of IBM.
© Copyright IBM Corp. 2009
IBM, the IBM logo, and Cognos are trademarks or registered trademarks of
International Business Machines Corp., registered in many jurisdictions worldwide.
Other product and service names might be trademarks of IBM or other companies. A
current list of IBM trademarks is available on the Web at
http://www.ibm.com/legal/copytrade.shtml
While every attempt has been made to ensure that the information in this document
is accurate and complete, some typographical errors or technical inaccuracies may
exist. IBM does not accept responsibility for any kind of loss resulting from the use of
information contained in this document. The information contained in this document
is subject to change without notice.
This document is maintained by the Best Practices, Product and Technology team.
You can send comments, suggestions, and additions to [email protected]
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft
Corporation in the United States, other countries, or both.
Using a WSDL Data Source within IBM Cognos Virtual View Manager
3
Contents
1
INTRODUCTION ............................................................................................ 4
1.1
1.2
1.3
PURPOSE .............................................................................................................. 4
APPLICABILITY ....................................................................................................... 4
EXCLUSIONS AND EXCEPTIONS .................................................................................... 4
2
IMPORTING THE WSDL DATA SOURCE......................................................... 4
3
TRANSFORMING THE WSDL RESPONSE INTO TABULAR FORM ................... 6
4
PREPARING THE SOAP ENVELOPE VIA A PARAMETERIZED QUERY............. 8
5
CREATING A VIRTUAL VIEW MANAGER DATA SERVICE............................. 12
5.1
PUBLISHING THE MY_PARAMQUERY TO THE VIRTUAL VIEW MANAGER DATA SERVICES DATABASE13
6
CREATING AND CONFIGURING A VIRTUAL VIEW MANAGER DATA SOURCE
NAME (DSN) ........................................................................................................... 14
7
CREATING AND IBM COGNOS 8 DATA SOURCE AND PACKAGE.................. 16
7.1
7.2
CREATING AND IBM COGNOS 8 VIRTUAL VIEW MANAGER DATA SOURCE .............................. 16
IMPORTING THE METADATA AND CREATING A QUERY SUBJECT........................................... 16
Using a WSDL Data Source within IBM Cognos Virtual View Manager
4
1 Introduction
1.1
Purpose
This document provides step by step instructions for importing Web Services
Description Language (WSDL) as a data source within IBM Cognos Virtual
View Manager Studio. The document also provides the steps for preparing
the WSDL data for consumption via IBM Cognos 8
1.2
Applicability
The techniques and product behaviours outlined in this document apply to:
• IBM Virtual View Manager 8.4.27.23-0
• IBM Cognos 8.4.27.78-0
1.3
Exclusions and Exceptions
This import method and its required settings may change in future releases.
2 Importing the WSDL Data Source
The WSDL data source used in this example obtains the current weather
conditions of city identified by its ZIP code. The link to this WSDL is:
http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl
To import the WSDL data source within IBM Cognos Virtual View Manager
Studio:
1. Create a new data source by right mouse clicking on the Shared folder
and selecting New Data Source.
2. Within the Add Physical Data Source screen. Select the WSDL data
source driver and click Next.
Using a WSDL Data Source within IBM Cognos Virtual View Manager
3. For this example, fill in the following information and click the Next
button when completed.
Name: WeatherByZipCode
URL: http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl
4. Traverse the tree and select weatherSOAP\GetCityWeatherByZip.
Once completed, press Finish to import the data source.
5
Using a WSDL Data Source within IBM Cognos Virtual View Manager
6
Virtual View Manager Studio should now display the imported
GetCityWeatherByZip WSDL function as illustrated below.
3 Transforming the WSDL Response into Tabular Form
If the imported WSDL function is wrapped in a parameterized query prior to
performing a transformation. Any output generated by the function will be in
the form of a SOAP response. These SOAP responses will be treated by IBM
Cognos 8 as one long string, which may not be practical. To apply a
transformation to transform the response into tabular format:
1. To create a new transformation, by right mouse clicking on the
Shared folder and selecting New Transformation.
2. Within the Create Transformation Screen, select the Basic XML to
Tabular Mapping and click on the Next button.
Using a WSDL Data Source within IBM Cognos Virtual View Manager
7
3. Traverse the Shared folder and select the GetCityWeatherByZip, and
then give the transformation a name and click the Finish button. For
this example the transformation will be called
My_MyGetCityWeatherByZip.
The My_MyGetCityWeatherByZip transformation should now be visible
in the resource tree on the left hand side.
Using a WSDL Data Source within IBM Cognos Virtual View Manager
8
4 Preparing the SOAP envelope via a Parameterized
Query
The newly created transformation can be executed by providing a literal.
However, in order to make it dynamic, the transformation will need to be
wrapped in a parameterized query. To do this:
1. Right mouse click on the Shared folder and select New Parameterized
Query.
2. Give the parameterized query a name and click OK. For the purpose
of this example the name will be My_ParamQuery.
4. Select the My_GetCityWeatherByZip transformation and drag it into
the right hand pane.
The drag and drop will automatically display the following screen.
Using a WSDL Data Source within IBM Cognos Virtual View Manager
9
5. Map the input parameters to a Query Parameters by: Expanding the
folder structure, clicking on the input parameter, switching the Value
from Null to Query Parameter, and typing in a name. In this example
the parameter name will be ‘ZIPCode’ as illustrated below.
6. Once completed, press the OK button to commit the change.
7. Press the F9 key to execute the newly created My_ParamQuery.
8. When prompted, provide the ZIP code 60601 (Chicago) as the literal
value.
Using a WSDL Data Source within IBM Cognos Virtual View Manager
10
9. Click the OK button to execute the query.
Analyse the results in the bottom result screen. Notice that not all the
information returned is useful. In this example, only the Name and
Value columns are required along with the rowID value of 11 and
greater.
10. Click on the Grid tab at the bottom of the screen.
11. Within the Columns project the ID, Name and Value from the drop
down list as illustrated below.
12. On the first row for the ID projection, ensure the Output check box is
not checked.
13. On the first row for the ID projection, set criteria field to >=11
Using a WSDL Data Source within IBM Cognos Virtual View Manager
11
14. Click the save button (Diskette button) on the toolbar to save the
changes to the My_paramQuery.
15. Execute the My_paramQuery again by pressing the F9 key.
16. When prompted, provide the ZIP code 60601 (Chicago) as the literal
value. Notice the reduced result set within the bottom results pane.
Using a WSDL Data Source within IBM Cognos Virtual View Manager
12
5 Creating a Virtual View Manager Data Service
IBM Virtual View Manager Studio exposes its objects to the Virtual View Manager
Open Database Connectivity (ODBC) driver through the use of Data Services.
Only objects that have been published to a Data Service with a defined catalog
and schema can be queried by the Virtual View Manager ODBC driver. To create
a web service within Virtual View Manager Studio:
1. Within the left hand navigation screen, traverse the structure to
Desktop\Virtual View Manager Data Services and select Databases.
2. Right click and select New Virtual View Manager Data Service… from
the available menu.
3. Provide a name for the Database. For this example the name will be
WSDL.
4. Click the OK button to create the Database.
5. Within the left hand navigation pane, select the WSDL database and
right mouse click.
6. Form the available options, select New Catalog and provide a catalog
name. For this example the catalog name will by WSDLCat.
7. Within the left hand navigation pane, select the WSDLCat and right
mouse click.
8. Form the available options, select New Schema and provide a schema
name. For this example the schema name will by WSDLSch. When
completed the navigation should represent the following.
Using a WSDL Data Source within IBM Cognos Virtual View Manager
5.1
13
Publishing the My_ParamQuery to the Virtual View Manager Data
Services Database
IBM Virtual View Manager uses a publish process to add objects to a Data
Services Database. To publish an object:
1. Within the left hand navigation pane, CNTRL click the
/shared/examples/ds_inventory/inventory/informix/inventorytransactio
ns object and the /shared/My_ParamQuery object
2. With both objects highlighted, right click and select Publish from the
available menu options.
3. Within the Publish dialog box, traverse the tree structure and select
the WSDLSch schema object.
4. Click the OK button to complete the publish process.
Using a WSDL Data Source within IBM Cognos Virtual View Manager
14
6 Creating and Configuring a Virtual View Manager Data
Source Name (DSN)
IBM Cognos 8 uses the IBM Cognos Virtual View Manager ODBC driver to
retrieve data from Virtual View Manager. The Virtual View Manager ODBC
connection can be created and configured using the following steps.
1. Within the ODBC Data Source Administrator, select the system DSN
tab.
2. Click the Add button, located at the top right hand side.
3. From the available list of drivers, select Virtual View Manager 8.4 and
click the Finish button.
Using a WSDL Data Source within IBM Cognos Virtual View Manager
15
4. Provide the required information to the Virtual View Manager 8.4
ODBC Driver Configuration dialog box.
• DSN can be any name.
• VVM Host is the hostname of the Virtual View Manager Server.
• Port is the port on which Virtual View Manager listens for
ODBC connections. This can be configured within the
Administration portion of Virtual View Manager Studio. The
default is 9401.
• UserName and Password is the same credentials as logging
into the Virtual View Manager Studio.
• Domain is the security domain, unless an external security
provider has been configured for Virtual View Manager this
value will be Cognos.
• Datasource is the name of the DataServices Database created
in the studio.
• Catalog is the name of the catalog created withing the
DataServices Database.
Below is an example of a completed configuration.
Using a WSDL Data Source within IBM Cognos Virtual View Manager
16
5. Click the OK button to create the ODBC data source.
7 Creating and IBM Cognos 8 Data Source and Package
With the ODBC data source successfully defined, the Virtual View Manager data
is ready to be consumed by the IBM Cognos 8 environment.
7.1
Creating and IBM Cognos 8 Virtual View Manager Data Source
1. Launch IBM Cognos 8 Framework Manager, and click the Create a
new project link.
2. Work through the new project wizard until the Select a Data Source
dialog appears.
3. Within this dialog box click the New button.
4. Click Next.
5. Provide a name to the data source. For this example the data source
name will by MY_WSDL.
6. Click Next
7. From the Type drop down menu, select IBM Cognos Virtual View
Manager (ODBC) and click the Next button.
8. Provide the ODBC data source name. This is the same name that was
given to the DSN in the previous section.
9. The credentials will be the same user and password used to access
the Virtual View Manager Studio.
10. Click the Finish button to create the IBM Cognos 8 data source.
7.2
Importing the Metadata and Creating a Query Subject
1. Within the Select a Data Source dialog box, locate and select the
My_WSDL data source.
2. Click the next button.
3. Expand the procedures folder and select the My_ParamQuery object.
Using a WSDL Data Source within IBM Cognos Virtual View Manager
17
4. Click the Next button.
5. Click the Import button.
6. Click the Finish button to complete the import.
7. Within the left hand Project Viewer pane, double click the
My_ParamQuery query subject.
8. Within the Query Subject Definition dialog box, click the ellipses under
the value column.
9. Within the dialog box that appears type the text ?ZipCode? in the
value box.
10. Click the OK button twice.
11. When prompted, provide the ZIP code 60601 as the value.
12. Test the My_ParamQuery subject.
Fly UP