You are on page 1of 36

Informatica MDM Multidomain Edition

(Version 10.0.0 HotFix 1)

Composite Services Guide

Informatica MDM Multidomain Edition Composite Services Guide


Version 10.0.0 HotFix 1
March 2015
Copyright (c) 1993-2015 Informatica Corporation. All rights reserved.
This software and documentation contain proprietary information of Informatica Corporation and are provided under a license agreement containing restrictions on use
and disclosure and are also protected by copyright law. Reverse engineering of the software is prohibited. No part of this document may be reproduced or transmitted in
any form, by any means (electronic, photocopying, recording or otherwise) without prior consent of Informatica Corporation. This Software may be protected by U.S.
and/or international Patents and other Patents Pending.
Use, duplication, or disclosure of the Software by the U.S. Government is subject to the restrictions set forth in the applicable software license agreement and as
provided in DFARS 227.7202-1(a) and 227.7702-3(a) (1995), DFARS 252.227-7013(1)(ii) (OCT 1988), FAR 12.212(a) (1995), FAR 52.227-19, or FAR 52.227-14
(ALT III), as applicable.
The information in this product or documentation is subject to change without notice. If you find any problems in this product or documentation, please report them to us
in writing.
Informatica, Informatica Platform, Informatica Data Services, PowerCenter, PowerCenterRT, PowerCenter Connect, PowerCenter Data Analyzer, PowerExchange,
PowerMart, Metadata Manager, Informatica Data Quality, Informatica Data Explorer, Informatica B2B Data Transformation, Informatica B2B Data Exchange Informatica
On Demand, Informatica Identity Resolution, Informatica Application Information Lifecycle Management, Informatica Complex Event Processing, Ultra Messaging and
Informatica Master Data Management are trademarks or registered trademarks of Informatica Corporation in the United States and in jurisdictions throughout the world.
All other company and product names may be trade names or trademarks of their respective owners.
Portions of this software and/or documentation are subject to copyright held by third parties, including without limitation: Copyright DataDirect Technologies. All rights
reserved. Copyright Sun Microsystems. All rights reserved. Copyright RSA Security Inc. All Rights Reserved. Copyright Ordinal Technology Corp. All rights
reserved.Copyright Aandacht c.v. All rights reserved. Copyright Genivia, Inc. All rights reserved. Copyright Isomorphic Software. All rights reserved. Copyright Meta
Integration Technology, Inc. All rights reserved. Copyright Intalio. All rights reserved. Copyright Oracle. All rights reserved. Copyright Adobe Systems
Incorporated. All rights reserved. Copyright DataArt, Inc. All rights reserved. Copyright ComponentSource. All rights reserved. Copyright Microsoft Corporation. All
rights reserved. Copyright Rogue Wave Software, Inc. All rights reserved. Copyright Teradata Corporation. All rights reserved. Copyright Yahoo! Inc. All rights
reserved. Copyright Glyph & Cog, LLC. All rights reserved. Copyright Thinkmap, Inc. All rights reserved. Copyright Clearpace Software Limited. All rights
reserved. Copyright Information Builders, Inc. All rights reserved. Copyright OSS Nokalva, Inc. All rights reserved. Copyright Edifecs, Inc. All rights reserved.
Copyright Cleo Communications, Inc. All rights reserved. Copyright International Organization for Standardization 1986. All rights reserved. Copyright ejtechnologies GmbH. All rights reserved. Copyright Jaspersoft Corporation. All rights reserved. Copyright International Business Machines Corporation. All rights
reserved. Copyright yWorks GmbH. All rights reserved. Copyright Lucent Technologies. All rights reserved. Copyright (c) University of Toronto. All rights reserved.
Copyright Daniel Veillard. All rights reserved. Copyright Unicode, Inc. Copyright IBM Corp. All rights reserved. Copyright MicroQuill Software Publishing, Inc. All
rights reserved. Copyright PassMark Software Pty Ltd. All rights reserved. Copyright LogiXML, Inc. All rights reserved. Copyright 2003-2010 Lorenzi Davide, All
rights reserved. Copyright Red Hat, Inc. All rights reserved. Copyright The Board of Trustees of the Leland Stanford Junior University. All rights reserved. Copyright
EMC Corporation. All rights reserved. Copyright Flexera Software. All rights reserved. Copyright Jinfonet Software. All rights reserved. Copyright Apple Inc. All
rights reserved. Copyright Telerik Inc. All rights reserved. Copyright BEA Systems. All rights reserved. Copyright PDFlib GmbH. All rights reserved. Copyright
Orientation in Objects GmbH. All rights reserved. Copyright Tanuki Software, Ltd. All rights reserved. Copyright Ricebridge. All rights reserved. Copyright Sencha,
Inc. All rights reserved. Copyright Scalable Systems, Inc. All rights reserved. Copyright jQWidgets. All rights reserved. Copyright Tableau Software, Inc. All rights
reserved. Copyright MaxMind, Inc. All Rights Reserved. Copyright TMate Software s.r.o. All rights reserved.
This product includes software developed by the Apache Software Foundation (http://www.apache.org/), and/or other software which is licensed under various versions
of the Apache License (the "License"). You may obtain a copy of these Licenses at http://www.apache.org/licenses/. Unless required by applicable law or agreed to in
writing, software distributed under these Licenses is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the Licenses for the specific language governing permissions and limitations under the Licenses.
This product includes software which was developed by Mozilla (http://www.mozilla.org/), software copyright The JBoss Group, LLC, all rights reserved; software
copyright 1999-2006 by Bruno Lowagie and Paulo Soares and other software which is licensed under various versions of the GNU Lesser General Public License
Agreement, which may be found at http:// www.gnu.org/licenses/lgpl.html. The materials are provided free of charge by Informatica, "as-is", without warranty of any
kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose.
The product includes ACE(TM) and TAO(TM) software copyrighted by Douglas C. Schmidt and his research group at Washington University, University of California,
Irvine, and Vanderbilt University, Copyright () 1993-2006, all rights reserved.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (copyright The OpenSSL Project. All Rights Reserved) and
redistribution of this software is subject to terms available at http://www.openssl.org and http://www.openssl.org/source/license.html.
This product includes Curl software which is Copyright 1996-2013, Daniel Stenberg, <daniel@haxx.se>. All Rights Reserved. Permissions and limitations regarding this
software are subject to terms available at http://curl.haxx.se/docs/copyright.html. Permission to use, copy, modify, and distribute this software for any purpose with or
without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
The product includes software copyright 2001-2005 () MetaStuff, Ltd. All Rights Reserved. Permissions and limitations regarding this software are subject to terms
available at http://www.dom4j.org/ license.html.
The product includes software copyright 2004-2007, The Dojo Foundation. All Rights Reserved. Permissions and limitations regarding this software are subject to
terms available at http://dojotoolkit.org/license.
This product includes ICU software which is copyright International Business Machines Corporation and others. All rights reserved. Permissions and limitations
regarding this software are subject to terms available at http://source.icu-project.org/repos/icu/icu/trunk/license.html.
This product includes software copyright 1996-2006 Per Bothner. All rights reserved. Your right to use such materials is set forth in the license which may be found at
http:// www.gnu.org/software/ kawa/Software-License.html.
This product includes OSSP UUID software which is Copyright 2002 Ralf S. Engelschall, Copyright 2002 The OSSP Project Copyright 2002 Cable & Wireless
Deutschland. Permissions and limitations regarding this software are subject to terms available at http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by Boost (http://www.boost.org/) or under the Boost software license. Permissions and limitations regarding this software are
subject to terms available at http:/ /www.boost.org/LICENSE_1_0.txt.
This product includes software copyright 1997-2007 University of Cambridge. Permissions and limitations regarding this software are subject to terms available at
http:// www.pcre.org/license.txt.
This product includes software copyright 2007 The Eclipse Foundation. All Rights Reserved. Permissions and limitations regarding this software are subject to terms
available at http:// www.eclipse.org/org/documents/epl-v10.php and at http://www.eclipse.org/org/documents/edl-v10.php.
This product includes software licensed under the terms at http://www.tcl.tk/software/tcltk/license.html, http://www.bosrup.com/web/overlib/?License, http://
www.stlport.org/doc/ license.html, http://asm.ow2.org/license.html, http://www.cryptix.org/LICENSE.TXT, http://hsqldb.org/web/hsqlLicense.html, http://

httpunit.sourceforge.net/doc/ license.html, http://jung.sourceforge.net/license.txt , http://www.gzip.org/zlib/zlib_license.html, http://www.openldap.org/software/release/


license.html, http://www.libssh2.org, http://slf4j.org/license.html, http://www.sente.ch/software/OpenSourceLicense.html, http://fusesource.com/downloads/licenseagreements/fuse-message-broker-v-5-3- license-agreement; http://antlr.org/license.html; http://aopalliance.sourceforge.net/; http://www.bouncycastle.org/licence.html;
http://www.jgraph.com/jgraphdownload.html; http://www.jcraft.com/jsch/LICENSE.txt; http://jotm.objectweb.org/bsd_license.html; . http://www.w3.org/Consortium/Legal/
2002/copyright-software-20021231; http://www.slf4j.org/license.html; http://nanoxml.sourceforge.net/orig/copyright.html; http://www.json.org/license.html; http://
forge.ow2.org/projects/javaservice/, http://www.postgresql.org/about/licence.html, http://www.sqlite.org/copyright.html, http://www.tcl.tk/software/tcltk/license.html, http://
www.jaxen.org/faq.html, http://www.jdom.org/docs/faq.html, http://www.slf4j.org/license.html; http://www.iodbc.org/dataspace/iodbc/wiki/iODBC/License; http://
www.keplerproject.org/md5/license.html; http://www.toedter.com/en/jcalendar/license.html; http://www.edankert.com/bounce/index.html; http://www.net-snmp.org/about/
license.html; http://www.openmdx.org/#FAQ; http://www.php.net/license/3_01.txt; http://srp.stanford.edu/license.txt; http://www.schneier.com/blowfish.html; http://
www.jmock.org/license.html; http://xsom.java.net; http://benalman.com/about/license/; https://github.com/CreateJS/EaselJS/blob/master/src/easeljs/display/Bitmap.js;
http://www.h2database.com/html/license.html#summary; http://jsoncpp.sourceforge.net/LICENSE; http://jdbc.postgresql.org/license.html; http://
protobuf.googlecode.com/svn/trunk/src/google/protobuf/descriptor.proto; https://github.com/rantav/hector/blob/master/LICENSE; http://web.mit.edu/Kerberos/krb5current/doc/mitK5license.html; http://jibx.sourceforge.net/jibx-license.html; https://github.com/lyokato/libgeohash/blob/master/LICENSE; https://github.com/hjiang/jsonxx/
blob/master/LICENSE; https://code.google.com/p/lz4/; https://github.com/jedisct1/libsodium/blob/master/LICENSE; http://one-jar.sourceforge.net/index.php?
page=documents&file=license; https://github.com/EsotericSoftware/kryo/blob/master/license.txt; http://www.scala-lang.org/license.html; https://github.com/tinkerpop/
blueprints/blob/master/LICENSE.txt; and http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html.
This product includes software licensed under the Academic Free License (http://www.opensource.org/licenses/afl-3.0.php), the Common Development and Distribution
License (http://www.opensource.org/licenses/cddl1.php) the Common Public License (http://www.opensource.org/licenses/cpl1.0.php), the Sun Binary Code License
Agreement Supplemental License Terms, the BSD License (http:// www.opensource.org/licenses/bsd-license.php), the new BSD License (http://opensource.org/
licenses/BSD-3-Clause), the MIT License (http://www.opensource.org/licenses/mit-license.php), the Artistic License (http://www.opensource.org/licenses/artisticlicense-1.0) and the Initial Developers Public License Version 1.0 (http://www.firebirdsql.org/en/initial-developer-s-public-license-version-1-0/).
This product includes software copyright 2003-2006 Joe WaInes, 2006-2007 XStream Committers. All rights reserved. Permissions and limitations regarding this
software are subject to terms available at http://xstream.codehaus.org/license.html. This product includes software developed by the Indiana University Extreme! Lab.
For further information please visit http://www.extreme.indiana.edu/.
This product includes software Copyright (c) 2013 Frank Balluffi and Markus Moeller. All rights reserved. Permissions and limitations regarding this software are subject
to terms of the MIT license.
This Software is protected by U.S. Patent Numbers 5,794,246; 6,014,670; 6,016,501; 6,029,178; 6,032,158; 6,035,307; 6,044,374; 6,092,086; 6,208,990; 6,339,775;
6,640,226; 6,789,096; 6,823,373; 6,850,947; 6,895,471; 7,117,215; 7,162,643; 7,243,110; 7,254,590; 7,281,001; 7,421,458; 7,496,588; 7,523,121; 7,584,422;
7,676,516; 7,720,842; 7,721,270; 7,774,791; 8,065,266; 8,150,803; 8,166,048; 8,166,071; 8,200,622; 8,224,873; 8,271,477; 8,327,419; 8,386,435; 8,392,460;
8,453,159; 8,458,230; 8,707,336; 8,886,617 and RE44,478, International Patents and other Patents Pending.
DISCLAIMER: Informatica Corporation provides this documentation "as is" without warranty of any kind, either express or implied, including, but not limited to, the
implied warranties of noninfringement, merchantability, or use for a particular purpose. Informatica Corporation does not warrant that this software or documentation is
error free. The information provided in this software or documentation may include technical inaccuracies or typographical errors. The information in this software and
documentation is subject to change at any time without notice.
NOTICES
This Informatica product (the "Software") includes certain drivers (the "DataDirect Drivers") from DataDirect Technologies, an operating company of Progress Software
Corporation ("DataDirect") which are subject to the following terms and conditions:
1. THE DATADIRECT DRIVERS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
2. IN NO EVENT WILL DATADIRECT OR ITS THIRD PARTY SUPPLIERS BE LIABLE TO THE END-USER CUSTOMER FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, CONSEQUENTIAL OR OTHER DAMAGES ARISING OUT OF THE USE OF THE ODBC DRIVERS, WHETHER OR NOT
INFORMED OF THE POSSIBILITIES OF DAMAGES IN ADVANCE. THESE LIMITATIONS APPLY TO ALL CAUSES OF ACTION, INCLUDING, WITHOUT
LIMITATION, BREACH OF CONTRACT, BREACH OF WARRANTY, NEGLIGENCE, STRICT LIABILITY, MISREPRESENTATION AND OTHER TORTS.
Part Number: MDM-CSG-100000-HF1-0001

Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Informatica Resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Informatica My Support Portal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Informatica Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Informatica Product Availability Matrixes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Informatica Web Site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Informatica How-To Library. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Informatica Knowledge Base. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Informatica Support YouTube Channel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Informatica Marketplace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Informatica Velocity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Informatica Global Customer Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Chapter 1: Introduction to Composite Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9


Composite Services Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Composite Service Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
ReadCO Step. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
WriteCO Step. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
SearchCO Step. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Composite Service Configuration Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Composite Service Configuration File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
REST Composite Service Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Write Composite Service Configuration File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Search Composite Service Configuration File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Composite Service Endpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Enterprise JavaBeans Endpoint for Composite Services. . . . . . . . . . . . . . . . . . . . . . . . . . 15
REST Endpoint for Composite Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Chapter 2: Enterprise Java Bean Composite Service Calls. . . . . . . . . . . . . . . . . . . . . 16


Enterprise Java Bean Composite Service Calls Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Java Code Example with standard SDO Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Java Code Example with Generated SDO Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Chapter 3: Representational State Transfer Composite Service Calls. . . . . . . . . . . 24


REST Composite Service Calls Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
REST Composite Service Call Restrictions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Web Application Description Language File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
REST Uniform Resource Locator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Viewing Input and Output Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
JavaScript Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Table of Contents

JavaScript Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Configuring WebLogic to Run Composite Service REST Calls. . . . . . . . . . . . . . . . . . . . . . . . . 30

Chapter 4: Custom Composite Service Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32


Custom Composite Service Steps Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Step 1. Write the Java Code for the Service Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Step 2. Create an XML Schema for Custom Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Step 3. Register the Custom Step in the Composite Service Configuration File. . . . . . . . . . . . . . 33
Step 4. Add the Custom Service Steps to a Composite Service Definition. . . . . . . . . . . . . . . . . . 34
Step 5. Configure the REST Call for the Custom Composite Service. . . . . . . . . . . . . . . . . . . . . 34
Step 6. Validate the Operational Reference Store Metadata. . . . . . . . . . . . . . . . . . . . . . . . . . 35

Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Table of Contents

Preface
Welcome to the Informatica MDM Multidomain Edition Composite Services Guide. This guide explains how to
make composite service calls to operate on composite objects in the MDM Hub.
This guide is intended for technical specialists who are responsible for configuring custom user interfaces to
make composite service calls to the MDM Hub.

Informatica Resources
Informatica My Support Portal
As an Informatica customer, you can access the Informatica My Support Portal at
http://mysupport.informatica.com.
The site contains product information, user group information, newsletters, access to the Informatica
customer support case management system (ATLAS), the Informatica How-To Library, the Informatica
Knowledge Base, Informatica Product Documentation, and access to the Informatica user community.
The site contains product information, user group information, newsletters, access to the Informatica How-To
Library, the Informatica Knowledge Base, Informatica Product Documentation, and access to the Informatica
user community.

Informatica Documentation
The Informatica Documentation team makes every effort to create accurate, usable documentation. If you
have questions, comments, or ideas about this documentation, contact the Informatica Documentation team
through email at infa_documentation@informatica.com. We will use your feedback to improve our
documentation. Let us know if we can contact you regarding your comments.
The Documentation team updates documentation as needed. To get the latest documentation for your
product, navigate to Product Documentation from http://mysupport.informatica.com.

Informatica Product Availability Matrixes


Product Availability Matrixes (PAMs) indicate the versions of operating systems, databases, and other types
of data sources and targets that a product release supports. You can access the PAMs on the Informatica My
Support Portal at https://mysupport.informatica.com/community/my-support/product-availability-matrices.

Informatica Web Site


You can access the Informatica corporate web site at http://www.informatica.com. The site contains
information about Informatica, its background, upcoming events, and sales offices. You will also find product
and partner information. The services area of the site includes important information about technical support,
training and education, and implementation services.

Informatica How-To Library


As an Informatica customer, you can access the Informatica How-To Library at
http://mysupport.informatica.com. The How-To Library is a collection of resources to help you learn more
about Informatica products and features. It includes articles and interactive demonstrations that provide
solutions to common problems, compare features and behaviors, and guide you through performing specific
real-world tasks.

Informatica Knowledge Base


As an Informatica customer, you can access the Informatica Knowledge Base at
http://mysupport.informatica.com. Use the Knowledge Base to search for documented solutions to known
technical issues about Informatica products. You can also find answers to frequently asked questions,
technical white papers, and technical tips. If you have questions, comments, or ideas about the Knowledge
Base, contact the Informatica Knowledge Base team through email at KB_Feedback@informatica.com.

Informatica Support YouTube Channel


You can access the Informatica Support YouTube channel at http://www.youtube.com/user/INFASupport. The
Informatica Support YouTube channel includes videos about solutions that guide you through performing
specific tasks. If you have questions, comments, or ideas about the Informatica Support YouTube channel,
contact the Support YouTube team through email at supportvideos@informatica.com or send a tweet to
@INFASupport.

Informatica Marketplace
The Informatica Marketplace is a forum where developers and partners can share solutions that augment,
extend, or enhance data integration implementations. By leveraging any of the hundreds of solutions
available on the Marketplace, you can improve your productivity and speed up time to implementation on
your projects. You can access Informatica Marketplace at http://www.informaticamarketplace.com.

Informatica Velocity
You can access Informatica Velocity at http://mysupport.informatica.com. Developed from the real-world
experience of hundreds of data management projects, Informatica Velocity represents the collective
knowledge of our consultants who have worked with organizations from around the world to plan, develop,
deploy, and maintain successful data management solutions. If you have questions, comments, or ideas
about Informatica Velocity, contact Informatica Professional Services at ips@informatica.com.

Informatica Global Customer Support


You can contact a Customer Support Center by telephone or through the Online Support.
Online Support requires a user name and password. You can request a user name and password at
http://mysupport.informatica.com.

Preface

The telephone numbers for Informatica Global Customer Support are available from the Informatica web site
at http://www.informatica.com/us/services-and-training/support-services/global-support-centers/.

Preface

CHAPTER 1

Introduction to Composite
Services
This chapter includes the following topics:

Composite Services Overview, 9

Composite Service Steps, 10

Composite Service Configuration Files, 10

Composite Service Endpoints, 15

Composite Services Overview


A composite service is a set of operations that run MDM Hub code to create, update, delete, and search for
base object records in a composite object. You can develop a custom user interface that can run Java code
or JavaScript code to make composite service calls.
For example, you can create a composite service to augment a supplier record with Dun and Bradstreet data.
Configure the composite service to take the supplier record as an input, retrieve some information from Dun
and Bradstreet, update the record, and then output the updated supplier record.
Base objects in a composite object have the following composite services:
Read
Each base object in a composite object has a composite service to perform a read operation.
Write
Each base object in a composite object has a composite service to perform a write operation.
Search
Any base object that has searchable fields has a composite service to perform a search operation.
For example, a Person base object has searchable fields. The MDM Hub generates a ReadPerson,
WritePerson, and SearchPerson composite service. The read, write, and search composite service steps
allow you to read, create, update, delete, and search for records in a composite object.

Composite Service Steps


A service step performs an operation in a composite service. You can use the ReadCO, WriteCO, and
SearchCO steps.
An incoming request passes through each service step. The output of one step is an input for the next step.
The output of a step can pass information to the input of the following step. All composite service steps run
as one Enterprise Java Bean call in a single transaction. The MDM Hub handles exceptions.

ReadCO Step
The ReadCO composite service step reads data from a base object record in a composite object.
You can specify pagination parameters with the ReadCO step to set the number of records to return and the
page of results to view.
The results of the ReadCO step do not include soft-deleted records.
If you do not pass the EffectiveDate parameter in the composite service request, the MDM Hub assumes a
NULL effective date and the composite service reads data from the base object. If you pass the EffectiveDate
parameter, the MDM Hub calculates the best version of the truth from cross-reference records and the read
composite service returns the up-to-date best version of the truth.

WriteCO Step
The WriteCO step can update the data in a composite object element, create a child composite object
element, or delete child composite object elements.
If you do not pass the EffectivePeriod parameter, the MDM Hub assumes an unbounded period.
The MDM Hub does not check that there is alignment for effective periods between the parent base objects
and child base objects. When you create or update records, ensure the effective periods of the parent record
and child records align.

SearchCO Step
Use the SearchCO step to search for a base object record in a composite object.
For information on configuring composite objects for smart search, see the Informatica MDM Multidomain
Edition Configuration Guide.

Composite Service Configuration Files


The composite service configuration files are XML files that the MDM Hub generates based on the
Informatica Data Director application configuration. The MDM Hub generates the composite service
configuration based on the composite object configuration. The Repository Manager in the Hub Console
validates each XML configuration file.
The MDM Hub generates the composite service configuration files when you save the Informatica Data
Director configuration in Configuration Manager. The composite service configuration file is located in the
repository table C_REPOS_CO_CS_CONFIG. For more information, see the Informatica MDM Multidomain
Edition Informatica Data Director Configuration Manager Online Help.

10

Chapter 1: Introduction to Composite Services

The MDM Hub has the following composite service configurations:


Representational State Transfer (REST) Composite Service Configuration
Defines how the REST URLs are mapped to the Enterprise Java Bean composite service calls. The
CONFIG_TYPE value in the repository table is REST_SERVICES.
Composite Services
Configuration for all composite services. The CONFIG_TYPE value in the repository table is
COMPOSITE_SERVICES.
The composite services configuration file contains the following composite service configurations:

Composite service step configuration for read, write, search, and custom composite service steps.

Read composite service configuration for each base object in a composite object.

Write composite service configuration for each base object in a composite object.

Search composite service configuration for each base object in a composite object that has at least
one searchable field.

Write Composite Service


Contains the write composite service configuration. The CONFIG_TYPE value in the repository table is
WRITE_CO.
Search Composite Service
Contains the search composite service configuration. The CONFIG_TYPE value in the repository table is
SEARCHABLE_CO.
Custom Composite Service
Contains the Java code for custom composite services. The CONFIG_TYPE value in the repository table
is CUSTOM_JAVA_CLASSES.
Custom Types
Contains the XML schema that defines custom objects. The CONFIG_TYPE value in the repository table
is CUSTOM_XML_SCHEMA.

Composite Service Configuration File


The composite service configuration file defines the three composite service steps to read, write, and search
base object records. The composite service configuration file also defines the composite service parameters
for each base object in the composite object. If you manually add composite objects to the composite object
configuration, you must also add the related composite services.
The following code shows the configuration for the read composite service configuration for the Organization
base object:
<service name="ReadOrganization">
<parameter type="CoFilter" uri="urn:cs-base.informatica.mdm" required="true"
directionKind="IN" name="coFilter"/>
<parameter type="Date" uri="commonj.sdo" required="false" directionKind="IN"
name="effectiveDate"/>
<parameter type="Boolean" uri="commonj.sdo" required="false" directionKind="IN"
name="readSystemFields"/>
<output type="Organization" uri="urn:co-ors.informatica.mdm"/>
<execution>
<execute name="s1" target="ReadCO" type="SERVICE"/>
</execution>
</service>

Composite Service Configuration Files

11

The following code shows the configuration for the write composite service configuration for the Organization
base object:
<service name="WriteOrganization">
<parameter type="String" uri="commonj.sdo" required="true" directionKind="IN"
name="systemName"/>
<parameter type="String" uri="commonj.sdo" required="false" directionKind="IN_OUT"
name="interactionId"/>
<parameter type="EffectivePeriod" uri="urn:cs-base.informatica.mdm"
required="false" directionKind="IN" name="effectivePeriod"/>
<input type="Organization" uri="urn:co-ors.informatica.mdm"/>
<output type="Organization" uri="urn:co-ors.informatica.mdm"/>
<execution>
<execute name="s1" target="WriteCO" type="SERVICE"/>
</execution>
</service>
The following code shows the configuration for the search composite service configuration for the
Organization base object:
<service name="SearchOrganization">
<parameter type="String" uri="commonj.sdo" required="true" directionKind="IN"
name="query"/>
<parameter type="CoFilter" uri="urn:cs-base.informatica.mdm" required="false"
directionKind="IN" name="coFilter"/>
<parameter type="Pager" uri="urn:cs-base.informatica.mdm" required="false"
directionKind="IN" name="pager"/>
<output type="Organization.Pager" uri="urn:co-ors.informatica.mdm"/>
<execution>
<execute name="s1" target="SearchCO" type="SERVICE">
<parameter name="coName">
<stringValue>Organization</stringValue>
</parameter>
</execute>
</execution>
</service>

REST Composite Service Configuration File


The MDM Hub generates the Representational State Transfer (REST) composite service configuration based
on the composite object configuration that Informatica Data Director Configuration Manager generates. If you
manually add composite objects to the configuration and want to make REST calls, you must manually
configure their REST composite services.
The following code sample shows the read composite service REST configuration for the Person composite
object:
<request name="ReadPerson">
<pattern>
<httpMethod>GET</httpMethod>
<path>
<co identities="OPTIONAL">/Person/(.+)</co>
<static>(\.json|\.xml)?</static>
</path>
</pattern>
<invoke service="ReadPerson">
<parameter name="coFilter" parser="CoFilterFromUrl"/>
<parameter name="effectiveDate" queryParam="effectiveDate"/>
<parameter name="readSystemFields" queryParam="readSystemFields"/>
</invoke>
<output>
<process processor="ExtractResponseObject"/>
<process processor="AddPagerLinks"/>
<process processor="AddChildrenLinks"/>
<process processor="AddParentLink"/>
<process processor="AddSelfLink"/>
<process processor="CompactResult"/>
<write writer="SdoToBody"/>

12

Chapter 1: Introduction to Composite Services

</output>
</request>
The following code sample shows the write composite service REST configuration for the Person composite
object:
<request name="WritePerson">
<pattern>
<httpMethod>PUT</httpMethod>
<httpMethod>POST</httpMethod>
<httpMethod>DELETE</httpMethod>
<path>
<co identities="OPTIONAL">/Person(/.*)?</co>
<static>(\.json|\.xml)?</static>
</path>
</pattern>
<invoke service="WritePerson">
<input parser="CoSdoFromUrlAndBody"/>
<parameter name="systemName" queryParam="systemName"/>
<parameter name="interactionId" queryParam="interactionId"/>
<parameter name="effectivePeriod" parser="EffectivePeriodFromUrl"/>
</invoke>
<output>
<process processor="ExtractResponseObject"/>
<write writer="SdoToBody"/>
</output>
The following code sample shows the search composite service REST configuration for the Person
composite object:
<request name="SearchPerson">
<pattern>
<httpMethod>GET</httpMethod>
<path>
<co identities="PROHIBITED">/Person</co>
<static>(\.json|\.xml)?</static>
</path>
</pattern>
<invoke service="SearchPerson">
<parameter name="query" queryParam="q"/>
<parameter name="pager" parser="PagerFromUrl"/>
</invoke>
<output>
<process processor="ExtractResponseObject"/>
<process processor="AddCoPagerLinks"/>
<process processor="AddChildrenLinks"/>
<process processor="AddParentLink"/>
<process processor="AddSelfLink"/>
<write writer="SdoToBody"/>
</output>
</request>

Write Composite Service Configuration File


The write composite service configuration file contains settings that determine how the MDM Hub creates,
updates, and deletes child base object records.
You can configure the following WriteCO step parameters:

identifyingStrategy
Determines how the MDM Hub checks for an existing child record. When you add a child record to a
composite object, the MDM Hub determines if the record is new or already exists.
You can configure the following identifyingStrategy attributes:
oneRow
Determines the behavior when a record exists.

Composite Service Configuration Files

13

The oneRow attribute can have the following values:


ACCEPT
The MDM Hub does not create a child record. Default is ACCEPT.
CREATE
The MDM Hub creates a child record.
ERROR
The MDM Hub does not create a child record. An error occurs.
noRow
Determines the behavior when a record does not exist.
The noRow attribute can have the following values:
CREATE
The MDM Hub creates a child record.
ERROR
The MDM Hub does not create a child record. An error occurs.
identifyingStrategy can have the following nested elements:
byRowId
Identifies existing records by the ROWID_OBJECT value. The byRowId strategy is implicit and always
used.
byPkSourceSystem
Identifies existing records by the primary key and source system. The byPkSourceSystem strategy is
implicit and always used.
byUniqueColumn
Identifies existing records by the value in the unique column.

deleteStrategy
Determines the behavior when you delete a child record.
The type attribute of deleteStrategy can have the following values:
DISASSOCIATE
Records remain active but the foreign key is set to null. Default is DISASSOCIATE.
SOFT_DELETE
Soft-deletes the record. The MDM Hub sets the HUB_STATE_IND to -1.
DELETE_PARENT
Deletes the record from the relationship table. The child record is not deleted.

Search Composite Service Configuration File


The search composite service configuration indicates which base object fields are searchable.
The search composite services configuration is required for Smart Search. For information on configuring
smart search, see the Informatica MDM Multidomain Edition Configuration Guide.

14

Chapter 1: Introduction to Composite Services

Composite Service Endpoints


You can access composite services through an Enterprise JavaBeans (EJB) endpoint or a Representational
State Transfer (REST) endpoint.
REST endpoints are built upon an EJB standpoint. The REST composite service configuration defines how
the REST URLs are mapped to the EJB composite service calls.

Enterprise JavaBeans Endpoint for Composite Services


The Enterprise JavaBeans (EJB) endpoint is the underlying endpoint for all types of composite service calls.
All other endpoints are mapped to the EJB endpoint
Composite services are exposed as a stateless EJB. A stateless EJB container can pool instances, allocate
instances, and apply load balancing strategies to distribute the load across different servers within the
domain.
An EJB endpoint accepts a user name and password for authentication.

REST Endpoint for Composite Services


Representational State Transfer Endpoint (REST) calls make composite services available as web services.
A Web Application Description Language (WADL) files contain XML descriptions of the REST web services,
all the REST URLs, and all REST parameters. The MDM Hub generates a WADL file for each Operational
Reference Store.
You can download the WADL files for each Operational Reference Store from the following location:
http:://<host>:<port>/cmx/csfiles

Composite Service Endpoints

15

CHAPTER 2

Enterprise Java Bean Composite


Service Calls
This chapter includes the following topics:

Enterprise Java Bean Composite Service Calls Overview, 16

Java Code Example with standard SDO Classes, 16

Java Code Example with Generated SDO Classes, 20

Enterprise Java Bean Composite Service Calls


Overview
You can make Enterprise Java Bean (EJB) composite service calls to create, update, delete, and search for
base object records in a composite object. You can create Java code to run EJB composite service calls.
You can create Java code based on standard Service Data Objects (SDO) classes or you can create Java
code based on java classes that the MDM Hub generates based on the composite object and composite
services configuration.

Java Code Example with standard SDO Classes


The example shows Java code to run Enterprise Java Bean (EJB) calls based on standard Service Data
Objects (SDO) classes.
The example is in the following file in the resource kit: C:\<infamdm installation directory>\hub
\resourcekit\samples\COS\source\java\com\informatica\mdm\sample\cs\DynamicSDO.java
The following Java code is based on standard SDO classes and runs EJB composite service calls to create a
person base object record, add multiple child records, delete one child record, and then delete the person
record and all child records:
package com.informatica.mdm.sample.cs;
import
import
import
import
import

16

com.informatica.mdm.cs.CallContext;
com.informatica.mdm.cs.api.CompositeServiceException;
com.informatica.mdm.cs.client.CompositeServiceClient;
com.siperian.sif.client.EjbSiperianClient;
com.siperian.sif.client.SiperianClient;

import
import
import
import
import

commonj.sdo.DataObject;
commonj.sdo.Property;
commonj.sdo.Type;
commonj.sdo.helper.DataFactory;
commonj.sdo.helper.HelperContext;

import java.io.PrintStream;
import java.util.Arrays;
import java.util.Properties;
public class DynamicSDO {
public static void main(String[] args) throws CompositeServiceException {
if(args.length != 3) {
System.err.println("USAGE: DynamicSDO <ors> <user> <pass>");
return;
}
}

new DynamicSDO(args[0], args[1], args[2]).execute();

private
private
private
private
private

String orsId;
String user;
String pass;
HelperContext helperContext;
PrintStream out = System.out;

public DynamicSDO(String orsId, String user, String pass) {


this.orsId = orsId;
this.user = user;
this.pass = pass;
}
public void execute() throws CompositeServiceException {
String systemName = "Admin";
Properties config = new Properties();
config.put(SiperianClient.SIPERIANCLIENT_PROTOCOL,
EjbSiperianClient.PROTOCOL_NAME);
CompositeServiceClient client =
CompositeServiceClient.newCompositeServiceClient(config);
CallContext callContext = new CallContext(orsId, user, pass);
helperContext = client.getHelperContext(callContext);
DataFactory dataFactory = helperContext.getDataFactory();
// types for Read requests
Type coFilterType = helperContext.getTypeHelper().getType("urn:csbase.informatica.mdm", "CoFilter");
Type coFilterNodeType = helperContext.getTypeHelper().getType("urn:csbase.informatica.mdm", "CoFilterNode");
Type keyType = helperContext.getTypeHelper().getType("urn:csbase.informatica.mdm", "Key");
// ReadCO & WriteCO request types
Type readPersonType = helperContext.getTypeHelper().getType("urn:csors.informatica.mdm", "ReadPerson");
Type writePersonType = helperContext.getTypeHelper().getType("urn:csors.informatica.mdm", "WritePerson");
// 1. Create new person
DataObject createPerson = dataFactory.create(writePersonType);
DataObject createPersonParameters = createPerson.createDataObject("parameters");
createPersonParameters.setString("systemName", systemName);
DataObject person = createPerson.createDataObject("object");

Java Code Example with standard SDO Classes

17

person.getChangeSummary().beginLogging();
DataObject personRoot = person.createDataObject("Person");
personRoot.setString("firstName", "John");
personRoot.setString("lastName", "Smith");
person.getChangeSummary().endLogging();
dump("*** CREATE NEW PERSON ...", createPerson);
DataObject createPersonResponse = client.process(callContext, createPerson);
dump("*** PERSON CREATED:", createPersonResponse);
String personRowId = createPersonResponse.getString("object/Person/
rowidObject");
DataObject readPerson = dataFactory.create(readPersonType);
DataObject readPersonParameters = readPerson.createDataObject("parameters");
DataObject coFilter = readPersonParameters.createDataObject("coFilter");
DataObject coFilterNode = coFilter.createDataObject("object");
coFilterNode.set("name", "Person");
DataObject key = coFilterNode.createDataObject("key");
key.set("rowid", personRowId);
dump("*** READ CREATED PERSON...", readPerson);
DataObject readPersonResponse = client.process(callContext, readPerson);
dump("*** READ RESULT:", readPersonResponse);
person = readPersonResponse.getDataObject("object");
person.detach();
person.getChangeSummary().beginLogging();
personRoot = person.getDataObject("Person");
// add new 'one' child
DataObject genderCd = personRoot.createDataObject("genderCd");
genderCd.setString("genderCode", "M");
// add two 'many' children
DataObject phonePager = personRoot.createDataObject("TelephoneNumbers");
Property item = phonePager.getInstanceProperty("item");
Type phoneType = item.getType();
DataObject phone1 = dataFactory.create(phoneType);
phone1.setString("phoneNumber", "111-11-11");
DataObject phone2 = dataFactory.create(phoneType);
phone2.setString("phoneNumber", "222-22-22");
phonePager.setList(item, Arrays.asList(phone1, phone2));
person.getChangeSummary().endLogging();
DataObject updatePerson = dataFactory.create(writePersonType);
updatePerson.setDataObject("object", person);
DataObject updatePersonParameters = updatePerson.createDataObject("parameters");
updatePersonParameters.setString("systemName", systemName);
updatePersonParameters.setString("interactionId", "");
dump("*** UPDATE PERSON...", updatePerson);
DataObject updatePersonResponse = client.process(callContext, updatePerson);
dump("*** PERSON UPDATED:", updatePersonResponse);
coFilterNode.set("depth", 3);
readPersonParameters.setBoolean("readSystemFields", true);

18

Chapter 2: Enterprise Java Bean Composite Service Calls

dump("*** READ UPDATED PERSON WITH CHILDREN...", readPerson);


readPersonResponse = client.process(callContext, readPerson);
dump("*** READ RESULT:", readPersonResponse);
person = readPersonResponse.getDataObject("object");
person.detach();
person.getChangeSummary().beginLogging();
genderCd = person.getDataObject("Person").createDataObject("genderCd");
genderCd.setString("genderCode", "F");
// delete one phone
DataObject phoneItem = person.getDataObject("Person/TelephoneNumbers/item[1]");
phoneItem.delete();
person.getChangeSummary().endLogging();
DataObject deletePhone = dataFactory.create(writePersonType);
deletePhone.setDataObject("object", person);
DataObject deletePhoneParameters = deletePhone.createDataObject("parameters");
deletePhoneParameters.setString("systemName", systemName);
dump("*** DELETE CHILD...", deletePhone);
DataObject deletePhoneResponse = client.process(callContext, deletePhone);
dump("*** CHILD DELETED:", deletePhoneResponse);
readPersonParameters.setBoolean("readSystemFields", false);
dump("*** READ PERSON AFTER CHILD WAS DELETEED...", readPerson);
readPersonResponse = client.process(callContext, readPerson);
dump("*** READ RESULT:", readPersonResponse);
person = readPersonResponse.getDataObject("object");
person.detach();
person.getChangeSummary().beginLogging();
person.getDataObject("Person").detach();
person.getChangeSummary().endLogging();
DataObject deletePerson = dataFactory.create(writePersonType);
deletePerson.setDataObject("object", person);
DataObject deletePersonParameters = deletePerson.createDataObject("parameters");
deletePersonParameters.setString("systemName", systemName);
dump("*** DELETE PERSON...", deletePerson);
DataObject deletePersonResponse = client.process(callContext, deletePerson);
dump("*** PERSON DELETED:", deletePersonResponse);
dump("*** TRY TO READ PERSON AFTER DELETE", readPerson);
try {
readPersonResponse = client.process(callContext, readPerson);
dump("*** READ RESULT:", readPersonResponse);
} catch (CompositeServiceException e) {
out.println("*** READ RESULT: " + e.getLocalizedMessage());
}
}

Java Code Example with standard SDO Classes

19

private void dump(String title, DataObject dataObject) {


String xml = helperContext.getXMLHelper().save(
dataObject,
dataObject.getType().getURI(),
dataObject.getType().getName());
out.println(title);
out.println(xml);
out.println();
}
}

Java Code Example with Generated SDO Classes


The example shows Java code to run Enterprise Java Bean (EJB) calls based on Java classes that the MDM
Hub generates based on the composite object and composite services configuration.
The example is in the following file in the resource kit: C:\<infamdm installation directory>\hub
\resourcekit\samples\COS\source\java\com\informatica\mdm\sample\cs\GeneratedSDO.java
The following Java code is based on generated classes and runs EJB composite service calls to create a
person base object record, add multiple child records, delete one child record, and then delete the person
record and all child records:
package com.informatica.mdm.sample.cs;
import
import
import
import
import
import
import
import
import
import
import
import
import

com.informatica.mdm.cs.CallContext;
com.informatica.mdm.cs.api.CompositeServiceException;
com.informatica.mdm.cs.client.CompositeServiceClient;
com.informatica.mdm.sdo.cs.base.CoFilter;
com.informatica.mdm.sdo.cs.base.CoFilterNode;
com.informatica.mdm.sdo.cs.base.Key;
com.siperian.sif.client.EjbSiperianClient;
com.siperian.sif.client.SiperianClient;
commonj.sdo.DataObject;
commonj.sdo.helper.DataFactory;
commonj.sdo.helper.HelperContext;
mdm.informatica.co_ors.*;
mdm.informatica.cs_ors.*;

import java.io.PrintStream;
import java.util.Arrays;
import java.util.Properties;
public class GeneratedSDO {
public static void main(String[] args) throws CompositeServiceException {
if(args.length != 3) {
System.err.println("USAGE: GeneratedSDO <ors> <user> <pass>");
return;
}
}

new GeneratedSDO(args[0], args[1], args[2]).execute();

private
private
private
private
private

20

String orsId;
String user;
String pass;
HelperContext helperContext;
PrintStream out = System.out;

Chapter 2: Enterprise Java Bean Composite Service Calls

public GeneratedSDO(String orsId, String user, String pass) {


this.orsId = orsId;
this.user = user;
this.pass = pass;
}
public void execute() throws CompositeServiceException {
String systemName = "Admin";
Properties config = new Properties();
config.put(SiperianClient.SIPERIANCLIENT_PROTOCOL,
EjbSiperianClient.PROTOCOL_NAME);
CompositeServiceClient client =
CompositeServiceClient.newCompositeServiceClient(config);
CallContext callContext = new CallContext(orsId, user, pass);
helperContext = client.getHelperContext(callContext);
DataFactory dataFactory = helperContext.getDataFactory();
// 1. Create new person
WritePerson createPerson = (WritePerson)dataFactory.create(WritePerson.class);
WritePersonParameters createPersonParameters =
(WritePersonParameters)dataFactory.create(WritePersonParameters.class);
createPersonParameters.setSystemName(systemName);
createPerson.setParameters(createPersonParameters);
Person person = (Person)dataFactory.create(Person.class);
createPerson.setObject(person);
person.getChangeSummary().beginLogging();
PersonRoot personRoot = (PersonRoot)dataFactory.create(PersonRoot.class);
personRoot.setFirstName("John");
personRoot.setLastName("Smith");
person.setPerson(personRoot);
person.getChangeSummary().endLogging();
dump("*** CREATE NEW PERSON ...", createPerson);
WritePersonReturn createPersonResponse =
(WritePersonReturn)client.process(callContext, (DataObject)createPerson);
dump("*** PERSON CREATED:", createPersonResponse);
String personRowId =
createPersonResponse.getObject().getPerson().getRowidObject();
Key key = (Key)dataFactory.create(Key.class);
key.setRowid(personRowId);
CoFilterNode coFilterNode =
(CoFilterNode)dataFactory.create(CoFilterNode.class);
coFilterNode.setName(Person.class.getSimpleName());
coFilterNode.setKey(key);
CoFilter coFilter = (CoFilter)dataFactory.create(CoFilter.class);
coFilter.setObject(coFilterNode);
ReadPersonParameters readPersonParameters =
(ReadPersonParameters)dataFactory.create(ReadPersonParameters.class);
readPersonParameters.setCoFilter(coFilter);
ReadPerson readPerson = (ReadPerson)dataFactory.create(ReadPerson.class);
readPerson.setParameters(readPersonParameters);
dump("*** READ CREATED PERSON...", readPerson);
ReadPersonReturn readPersonResponse =
(ReadPersonReturn)client.process(callContext, (DataObject)readPerson);

Java Code Example with Generated SDO Classes

21

dump("*** READ RESULT:", readPersonResponse);


person = readPersonResponse.getObject();
((DataObject)person).detach();
person.getChangeSummary().beginLogging();
personRoot = person.getPerson();
// add new 'one' child
LUGenderLookup genderCd =
(LUGenderLookup)dataFactory.create(LUGenderLookup.class);
genderCd.setGenderCode("M");
personRoot.setGenderCd(genderCd);
// add two 'many' children
PersonTelephoneNumbersPager phonePager =
(PersonTelephoneNumbersPager)dataFactory.create(PersonTelephoneNumbersPager.class);
PersonTelephoneNumbers phone1 =
(PersonTelephoneNumbers)dataFactory.create(PersonTelephoneNumbers.class);
phone1.setPhoneNumber("111-11-11");
PersonTelephoneNumbers phone2 =
(PersonTelephoneNumbers)dataFactory.create(PersonTelephoneNumbers.class);
phone2.setPhoneNumber("222-22-22");
phonePager.setItem(Arrays.asList(phone1, phone2));
personRoot.setTelephoneNumbers(phonePager);
person.getChangeSummary().endLogging();
WritePerson updatePerson = (WritePerson)dataFactory.create(WritePerson.class);
updatePerson.setObject(person);
WritePersonParameters updatePersonParameters =
(WritePersonParameters)dataFactory.create(WritePersonParameters.class);
updatePersonParameters.setSystemName(systemName);
updatePersonParameters.setInteractionId("");
updatePerson.setParameters(updatePersonParameters);
dump("*** UPDATE PERSON...", updatePerson);
WritePersonReturn updatePersonResponse =
(WritePersonReturn)client.process(callContext, (DataObject)updatePerson);
dump("*** PERSON UPDATED:", updatePersonResponse);
coFilterNode.setDepth(3);
readPersonParameters.setReadSystemFields(true);
dump("*** READ UPDATED PERSON WITH CHILDREN (with system fields)...",
readPerson);
readPersonResponse = (ReadPersonReturn)client.process(callContext,
(DataObject)readPerson);
dump("*** READ RESULT:", readPersonResponse);
person = readPersonResponse.getObject();
((DataObject)person).detach();
person.getChangeSummary().beginLogging();
// delete one phone
person.getPerson().getTelephoneNumbers().getItem().remove(0);
// change gender
genderCd = (LUGenderLookup)dataFactory.create(LUGenderLookup.class);
genderCd.setGenderCode("F");
personRoot.setGenderCd(genderCd);
person.getChangeSummary().endLogging();

22

Chapter 2: Enterprise Java Bean Composite Service Calls

WritePerson deletePhone = (WritePerson)dataFactory.create(WritePerson.class);


deletePhone.setObject(person);
WritePersonParameters deletePhoneParameters =
(WritePersonParameters)dataFactory.create(WritePersonParameters.class);
deletePhoneParameters.setSystemName(systemName);
deletePhone.setParameters(deletePhoneParameters);
dump("*** DELETE CHILD...", deletePhone);
WritePersonReturn deletePhoneResponse =
(WritePersonReturn)client.process(callContext, (DataObject)deletePhone);
dump("*** CHILD DELETED:", deletePhoneResponse);
readPersonParameters.setReadSystemFields(false);
dump("*** READ PERSON AFTER CHILD WAS DELETEED...", readPerson);
readPersonResponse = (ReadPersonReturn)client.process(callContext,
(DataObject)readPerson);
dump("*** READ RESULT:", readPersonResponse);
person = readPersonResponse.getObject();
((DataObject)person).detach();
person.getChangeSummary().beginLogging();
((DataObject)person.getPerson()).delete();
person.getChangeSummary().endLogging();
WritePerson deletePerson = (WritePerson)dataFactory.create(WritePerson.class);
deletePerson.setObject(person);
WritePersonParameters deletePersonParameters =
(WritePersonParameters)dataFactory.create(WritePersonParameters.class);
deletePersonParameters.setSystemName(systemName);
deletePerson.setParameters(deletePersonParameters);
dump("*** DELETE PERSON...", deletePerson);
WritePersonReturn deletePersonResponse =
(WritePersonReturn)client.process(callContext, (DataObject)deletePerson);
dump("*** PERSON DELETED:", deletePersonResponse);
dump("*** TRY TO READ PERSON AFTER DELETE", readPerson);
try {
readPersonResponse = (ReadPersonReturn)client.process(callContext,
(DataObject)readPerson);
dump("*** READ RESULT:", readPersonResponse);
} catch (CompositeServiceException e) {
out.println("*** READ RESULT: " + e.getLocalizedMessage());
}
}

private void dump(String title, Object object) {


DataObject dataObject = (DataObject)object;
String xml = helperContext.getXMLHelper().save(
dataObject,
dataObject.getType().getURI(),
dataObject.getType().getName());
out.println(title);
out.println(xml);
out.println();
}

Java Code Example with Generated SDO Classes

23

CHAPTER 3

Representational State Transfer


Composite Service Calls
This chapter includes the following topics:

REST Composite Service Calls Overview, 24

REST Composite Service Call Restrictions, 24

Web Application Description Language File, 25

REST Uniform Resource Locator, 26

Viewing Input and Output Parameters, 27

JavaScript Template, 28

JavaScript Example, 28

Configuring WebLogic to Run Composite Service REST Calls, 30

REST Composite Service Calls Overview


You can make Representational State Transfer (REST) composite service calls to create, update, delete, and
search for base object records in a composite object. REST composite service calls allow you to create a
custom user interface that runs JavaScript to make REST calls.
A REST composite service call is a web service request in the form of a Uniform Resource Locator (URL).
The MDM Hub assigns a unique URL for each base object in a composite object. You can use the unique
URL to identify which base object to update or delete.
Web Application Description Language (WADL) files contain XML descriptions of the REST web services.
The MDM Hub generates a WADL file for each Operational Reference Store. The WADL file contains
important information such as which REST parameters are available.

REST Composite Service Call Restrictions


Representational State Transfer (REST) composite service calls have restrictions when compared to
Enterprise Java Bean (EJB) calls. EJB calls can operate on any base object records within a composite

24

object. REST calls can either operate on all the base object records or all the base object records in a single
child branch.

Example of REST Composite Service Call Restrictions


For example, a composite object has an Organization base object as a root node. The Organization base
object has Address, Employee, and Account child base objects. The Employee base object has Phone child
and Electronic Address base objects.
The following image shows the structure of a composite object with multiple branches:

You can make a REST composite service call to operate on all the base objects in the composite object or
you can make a REST composite service call to operate on a single child branch. For example, you can
make a REST composite service call to update Electronic Address, Employee, and Organization. You cannot
update Account and Address in a single REST composite service call because they are in different branches
because you cannot make a REST composite service call to operate on multiple child branches.

Web Application Description Language File


Web Application Description Language (WADL) files contain XML descriptions of the REST web services, all
the REST URLs, and all REST parameters. The MDM Hub generates a WADL file for each Operational
Reference Store.
The WADL files for each Operational Reference Store are in the following location:
http:://<host>:<port>/cmx/csfiles

Web Application Description Language File

25

The following image shows the location where you can download the WADL file for the Operational
Reference Stores:

1. Link to download the WADL file for the SUPPLIER_HUB_COCS Operational Reference Store
2. Link to download the WADL file for the DS_UI1 Operational Reference Store

REST Uniform Resource Locator


You use a Representational State Transfer (REST) Uniform Resource Locator (URL) to make REST
composite service calls.
The REST URL has the following syntax:
http://<host>:<port>/<context>/<database ID>/<path>
The URL has the following fields:
host
The host that is running the database.
port
Port number that the database listener uses.
context
The context is always cmx/cs.

26

Chapter 3: Representational State Transfer Composite Service Calls

database ID
The database ID appears in the database properties in the MDM Hub databases tool and is in the format
<database name>-<Operational Reference Store>.
path
If the URL is for a root record, the path is the root object name followed by a unique identifier. An
example of a path for a Person root record is Person/798243.json.
If the URL is for a record that is a direct child of the root object, the path also includes the child record
name and a unique identifier. An example of a path for a billing address record that is a child of a Person
root record is Person/798243/BillAddresses/121522.json.
If the URL is for a child record that is at a depth of two or greater, the path also includes the depth. An
example of a path for child record with a depth of two or more is Person/798243/BillAddresses/
121522.json?depth=2.
The following URL is an example of a REST URL for a child record with a depth of 2:
http://localhost:8080/cmx/cs/localhost-orcl-DS_UI1/Person/798243/BillAddresses/121522.json?
depth=2
Note: Parameters are case sensitive. Ensure the case of the parameter names in the REST URL matches
the case of the parameter names in the REST configuration.

Viewing Input and Output Parameters


You can use a functional testing tool such as SoapUI to view the REST API input and output parameters.
Download the WADL file and then import the file into your functional testing tool to create a REST project.
The following image shows the input parameters in the SoapUI for the createPerson REST API:

1.

Input parameters for createPerson REST API

Note: The WADL file produced in Websphere environments might not import correctly into SoapUI. If the
input parameters do not appear in SoapUI, edit the WADL file to remove the xmlns attribute from each param
element and then import the WADL file again.

Viewing Input and Output Parameters

27

JavaScript Template
The following code sample shows a basic template that you can modify to create JavaScript code to run
REST composite service calls:
(function ($) {
window.CSClient = window.CSClient || {
baseUrl: "/cmx/cs/" + "[siperian-client.orsId]",
user: "[siperian-client.username]",
pass: "[siperian-client.password]",
process: function (method, url, body, params) {
var fullUrl = this.baseUrl + url + ".json?" + $.param(params);
return $.ajax({
method: method,
url: fullUrl,
data: JSON.stringify(body),
beforeSend: function (xhr) {
xhr.setRequestHeader("Authorization", "Basic " + btoa(CSClient.user
+ ":" + CSClient.pass));
}
});
},
readCo: function (url, params) {
return this.process("GET", url, null, params);
},
createCo: function (url, body, params) {
return this.process("POST", url, body, params);
},
updateCo: function (url, body, params) {
return this.process("PUT", url, body, params);
},
deleteCo: function (url, params) {
return this.process("DELETE", url, null, params);
}

};
})(jQuery);

JavaScript Example
The example shows Javascript code to run Representational State Transfer (REST) composite service calls.
The example is in the following file in the resource kit: C:\<infamdm installation directory>C:\hub
\resourcekit\samples\COS\source\resources\webapp\rest-api.html
The following code show the JavaScript code to run REST API calls to create a person base object record,
add multiple child records, delete one child record, and then delete the person record and all child records:
<html>
<head>
<script type="text/javascript" src="jquery-1.11.1.js"></script>
<script type="text/javascript" src="cs-client.js"></script>
</head>
<body>
<script type="text/javascript" language="javascript">
$(document).ready(function () {
$("#run").click(function () {
log = function(msg, json) {
$('#log').before("<hr/><b>" + msg + "</b>");

28

Chapter 3: Representational State Transfer Composite Service Calls

pre>");

$('#log').before("<pre>" + JSON.stringify(json, undefined, 2) + "</


};

CSClient.createCo(
"/Person",
{
firstName: "John",
lastName: "Smith"
},
{
systemName: "Admin"
}
).then(
function (result) {
log("PERSON CREATED:", result);
return CSClient.readCo(
"/Person/" + result.Person.rowidObject.trim(),
{
depth: 1
}
);
}
).then(
function (result) {
log("READ CREATED PERSON:", result);
return CSClient.updateCo(
"/Person/" + result.rowidObject.trim(),
{
genderCd: {
genderCode: "M"
},
TelephoneNumbers: {
item: [
{
phoneNumber: "111-11-11"
},
{
phoneNumber: "222-22-22"
}
]
}
},
{
systemName: "Admin"
}
);
}
).then(
function (result) {
log("PERSON UPDATED:", result);
return CSClient.readCo(
"/Person/" + result.Person.rowidObject.trim(),
{
depth: 3,
readSystemFields: true
}
);
}
).then(
function (result) {
log("READ UPDATED PERSON:", result);
return CSClient.deleteCo(
"/Person/" + result.rowidObject.trim() + "/
TelephoneNumbers/" + result.TelephoneNumbers.item[0].rowidObject.trim(),
{
systemName: "Admin"
}
);
}
).then(

JavaScript Example

29

).then(

).then(

).then(

});

);

function (result) {
log("TELEPHONE DELETED:", result);
return CSClient.readCo(
"/Person/" + result.Person.rowidObject.trim(),
{
depth: 3
}
);
}
function (result) {
log("READ PERSON AFTER TELEPHONE IS DELETED:", result);
return CSClient.deleteCo(
"/Person/" + result.rowidObject.trim(),
{
systemName: "Admin"
}
);
}
function (result) {
log("PERSON DELETED:", result);
return CSClient.readCo(
"/Person/" + result.Person.rowidObject.trim(),
{
depth: 1,
recordStates: "ACTIVE,PENDING,DELETED",
readSystemFields: true
}
);
}
function (result) {
log("READ PERSON AFTER DELETE (HSI -1):", result);
}

});
</script>
<input type="button" id="run" value="Run..."/>
<p/>
<div id="log"></div>
</body>
</html>

Configuring WebLogic to Run Composite Service


REST Calls
To configure WebLogic to run composite service REST calls, edit the WebLogic config.xml file.
1.

Navigate to the following WebLogic directory:


On UNIX.
<WebLogic installation directory>/user_projects/domains/base_domain/config
On Windows.
<WebLogic installation directory>\user_projects\domains\base_domain\config

2.

Open the following file in a text editor:


config.xml

30

Chapter 3: Representational State Transfer Composite Service Calls

3.

Before the closing </security-configuration> tag, add the following XML code:
<enforce-valid-basic-auth-credentials>
false
</enforce-valid-basic-auth-credentials>

Configuring WebLogic to Run Composite Service REST Calls

31

CHAPTER 4

Custom Composite Service Steps


This chapter includes the following topics:

Custom Composite Service Steps Overview, 32

Step 1. Write the Java Code for the Service Steps, 32

Step 2. Create an XML Schema for Custom Objects , 33

Step 3. Register the Custom Step in the Composite Service Configuration File, 33

Step 4. Add the Custom Service Steps to a Composite Service Definition, 34

Step 5. Configure the REST Call for the Custom Composite Service, 34

Step 6. Validate the Operational Reference Store Metadata, 35

Custom Composite Service Steps Overview


A custom composite service step runs custom Java code during a composite service call. To configure a
custom composite service step, you must develop the Java code for the step and then register the step in the
composite service.
For example, you can develop custom composite service steps to transform data. You might transform data
so that the child object and grandchild object in a many-to-many relationship appear as a single object in the
Entity 360 view.

Step 1. Write the Java Code for the Service Steps


Write the Java code that you want to run during the composite service call. The Java code for custom service
steps implements the com.informatica.mdm.spi.cs.ServiceStep interface.
Package the Java code in one of the following file formats:
JAR
Contains the step class and any related classes in a single JAR file.
ZIP
Contains the JAR file of the step class and the JAR files of any dependencies.
Use a database tool that can accommodate the BLOB data type to upload the JAR or ZIP file to repository
table C_REPOS_CO_CS_CONFIG. In repository table C_REPOS_CO_CS_CONFIG, specify a value of
CUSTOM_JAVA_CLASSES for the CONFIG_TYPE value.

32

The Resource Kit contains custom Java code samples in <Resource Kit installation directory>
\samples\CustomCsStep\source\java\com\sample.
The following Java code samples in the Resource Kit transform the object BillAddresses and the object
Addresses into a single object:
TransformPersonFilterStep.Java
Java code that transforms the request for the Read composite service.
TransformPersonStep.Java
Java code that transforms the response for the Read composite service.

Step 2. Create an XML Schema for Custom Objects


You must create an XML schema if the custom composite service step returns a custom object.
Use a database tool that can accommodate the BLOB data type to upload the XSD file to repository table
C_REPOS_CO_CS_CONFIG. In repository table C_REPOS_CO_CS_CONFIG, specify a value of
CUSTOM_XML_SCHEMA for the CONFIG_TYPE value.
For a sample of an XML schema that defines a custom object that consists of columns from the object
BillingAddress and the object Addresses, see the custom.xsd file in <Resource Kit installation
directory>\samples\CustomCsStep\source\resources.

Step 3. Register the Custom Step in the Composite


Service Configuration File
To register a custom step, add the step definition to the composite service configuration file.
The composite service configuration file is located in repository table C_REPOS_CO_CS_CONFIG in the row
with a CONFIG_TYPE value of COMPOSITE_SERVICES. Use a database tool that can accommodate the
BLOB data type to download the existing configuration file. Add the step definitions to the file, and then
upload the configuration file to C_REPOS_CO_CS_CONFIG.
The following code sample shows the step definition for the TransformPersonFilterStep custom step:
<step class="com.sample.TransformPersonFilterStep" name="TransformPersonFilterStep">
<parameter type="CoFilter" uri="urn:cs-base.informatica.mdm" required="true"
directionKind="IN" name="coFilter"/>
</step>
The following code sample shows the step definition for the TransformPersonStep custom step:
<step class="com.sample.TransformPersonStep" name="TransformPersonStep">
<input type="CompositeObjectBase" uri="urn:co-base.informatica.mdm"/>
<output type="CompositeObjectBase" uri="urn:co-base.informatica.mdm"/>
</step>

Step 2. Create an XML Schema for Custom Objects

33

Step 4. Add the Custom Service Steps to a


Composite Service Definition
Add the custom service steps to the composite service definition for the composite object that you want the
custom steps to act upon.
The following code shows the definition for the ReadPersonView custom composite service:
<service name="ReadPersonView">
<parameter type="CoFilter" uri="urn:cs-base.informatica.mdm" required="true"
directionKind="IN" name="coFilter"/>
<parameter type="Date" uri="commonj.sdo" required="false" directionKind="IN"
name="effectiveDate"/>
<parameter type="Boolean" uri="commonj.sdo" required="false" directionKind="IN"
name="readSystemFields"/>
<output type="PersonView" uri="urn:custom"/>
<execution>
<execute name="s1" target="TransformPersonFilterStep" type="STEP"/>
<execute name="s2" target="ReadCO" type="SERVICE"/>
<execute name="s3" target="TransformPersonStep" type="STEP"/>
</execution>
</service>
In the code sample, the steps run in the following order:
1.

TransformPersonFilterStep

2.

ReadCO

3.

TransformPersonStep

The output of a service step is the input for the following step. In the code sample,
TransformPersonFilterStep transforms the request to ReadCO. ReadCO runs, and then
TransformPersonStep transforms the output of ReadCO.
The composite service passes all parameters to each service step.

Step 5. Configure the REST Call for the Custom


Composite Service
If you use the REST protocol to make composite service calls, configure the REST call for the custom
composite service that contains the custom composite service steps.
The composite service configuration file is located in repository table C_REPOS_CO_CS_CONFIG in the row
with a CONFIG_TYPE value of REST_SERVICES.
The following code sample shows the REST call configuration for ReadPersonView:
<request name="ReadPersonView">
<pattern>
<httpMethod>GET</httpMethod>
<path>
<static>/view<static>
<co identities="OPTIONAL">/Person/(.+)</co>
<static>(\.json|\.xml)?</static>
</path>
</pattern>
<invoke service="ReadPersonView">
<parameter name="coFilter" parser="CoFilterFromUrl"/>
<parameter name="effectiveDate" queryParam="effectiveDate"/>

34

Chapter 4: Custom Composite Service Steps

<parameter name="readSystemFields" queryParam="readSystemFields"/>


</invoke>
<output>
<process processor="ExtractResponseObject"/>
<process processor="AddPagerLinks"/>
<process processor="AddChildrenLinks"/>
<process processor="AddParentLink"/>
<process processor="AddSelfLink"/>
<process processor="CompactResult"/>
<write writer="SdoToBody"/>
</output>
</request>
The REST URL for each composite service must be unique. The ReadPersonView REST call configuration is
similar to the configuration for ReadPerson, but the configuration for ReadPersonView has an additional
<static> element with a value of /view.
The following URL can access the custom REST service to view a composite object with a parent node
ROWID_OBJECT value of 1242:
http://<host>:<port>/cmx/cs/<Operational Reference Store>/view/Person/1242

Step 6. Validate the Operational Reference Store


Metadata
When you validate the metadata, the MDM Hub applies the changes you made to the composite service
configuration files. To validate the Operational Reference Store metadata, use the Repository Manager tool
in the MDM Hub Console.
For more information, see the Informatica MDM Multidomain Edition Repository Manager Guide.

Step 6. Validate the Operational Reference Store Metadata

35

INDEX

composite service steps


ReadCO 10
SearchCO 10
WriteCO 10
composite services
EJB endpoint 15
endpoints 15
REST endpoint 15
custom composite service steps
about 32

ReadCO
composite service step 10

WriteCO
composite service step 10

preface 6

36

S
SearchCO
about 10

You might also like