Call Oracle UCM Web Service in SSIS (Read XML SOAP API)

Introduction

In this post we will learn how to access data from Oracle UCM Web Service (Middle layer for WebLogic) and load into SQL Server or any other target. We will use SSIS XML Source to achieve this result.

 

 

Prerequisites

Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
  1. SSIS designer installed. Sometimes it is referred to as BIDS or SSDT (download it from the Microsoft site).
  2. Basic knowledge of SSIS package development using Microsoft SQL Server Integration Services.
  3. Make sure ZappySys SSIS PowerPack is installed (download it, if you haven't already).
  4. (Optional step). Read this article, if you are planning to deploy packages to a server and schedule their execution later.

About Oracle UCM Web Service

If you are not sure what is SOAP Web Service and how to call in SSIS, First read this article to understand general concepts of calling SOAP API in SSIS.

UCM Web Service offers calling various commands. You have to send XML Request and server will send you XML response with requested data. We will use Array Transformation Technique (Key / Value Pattern) to extract complex nested XML data.

Step-By-Step

Now let’s look at how to call Oracle UCM SOAP API in SSIS.

Read from Oracle UCM Web Service using XML Source

  1. Drag Data Flow Task in SSIS Designer
  2. Inside Data flow drag ZS SSIS XML Source from toolbox
  3. First enter URL as below (Replace INSTANCE ID with your own instance)
  4. Now Check Use Credentials and select new ZS-HTTP connection
  5. Enter your User ID and Password to call Web Service using Basic Authentication. Click OK to save.
    Configure HTTP Connection - Call Oracle UCM Web Service (SOAP XML)

    Configure HTTP Connection – Call Oracle UCM Web Service (SOAP XML)

  6. On XML Source UI Select Content Type = XML (text / xml, charset=UTF-8)
  7. Select Request Method as POST
  8. Click Enter Raw Edit for HTTP Headers and enter below
  9. Click on Edit Body and enter your Request Body in XML format.For example to call GET_SEARCH_RESULTS service to retrieve the search results for the passed query text you can submit Request Body as below.
    NOTICE:  String in Search Text was surrounded by backtick (  `  ). Single tick / double quote didn’t work in our case.
  10. Now Select Filter (Browse upto Fields under SearchResult node. Once you click OK try to edit your Expression so it looks like below. As you may notice we changed ResultSet[*] to ResultSet[?(@@name==’SearchResults’)]
    This will ensure that we extract records from only SearchResult Node and not other nodes such as UserAttribInfo or EnterpriseSearchResults
    Select Filter

    Select Filter

  11. Now go to 2D Array Tab. Select Key / Value Pattern Option.
  12. Select Column Names / Value Filters as below. You can Use Browse Option to navigate to that field or just type below directly. Below expression will Transform Rows into Column. Foreach attribute name we will get one column.Column Name Filter =>  $.ns2:Field[*].@name
    Column Value Filter =>  $.ns2:Field[*].#text
  13. Now Click Preview to confirm it works
  14. That’s it, you can now click OK to close UI.

Loading Oracle UCM SOAP API data into SQL Server / Other Target

Now let's look at how to load data into target like SQL Server, Oracle or Flat File. In below example we will see loading data into SQL Server database but steps may remain same for other targets which can be accessed using OLEDB Drivers (e.g. Oracle).
  1. Inside Data Flow, Drag and drop Upsert Destination Component from SSIS Toolbox
  2. Connect our Source component to Upsert Destination
  3. Double click Upsert Destination to configure it
  4. Select Target Connection or click NEW to create new connectionConfigure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS
  5. Select Target Table or click NEW to create new table based on source columns
  6. Click on Mappings Tab to Auto map columns by name. You can change mappings as you need SSIS Upsert Destination - Columns Mappings SSIS Upsert Destination - Columns Mappings
  7. Click OK to Save Upsert Destination Settings
  8. That's it, You are now ready to run data flow. NOTE: If you wish to debug data flow and see records when you run, add data viewer by right click on blue arrow > Click Enable Data Viewer
  9. To execute data flow, Right click anywhere inside Data Flow Surface and click Execute Task
 

Conclusion

In this post we saw how easy it is to consume XML SOAP Web Service in SSIS. We called SOAP Service for Oracle UCM Web Service and loaded data into target like SQL Server. You can download SSIS PowerPack and try many other scenarios like this using 70+ other SSIS Tasks /Components not mentioned in this article.

Posted in HTTP Connection, REST API Integration, SSIS XML Source (File / SOAP) and tagged .