PeopleTools 8.44 PeopleBook PeopleSoft Component Interfaces - Oracle

Transcription

PeopleTools 8.44 PeopleBookPeopleSoft Component InterfacesDecember 2003

PeopleTools 8.44 PeopleBookPeopleSoft Component InterfacesSKU PT844CPI-B 1203Copyright 1988-2003 PeopleSoft, Inc. All rights reserved.All material contained in this documentation is proprietary and confidential to PeopleSoft, Inc. ("PeopleSoft"), protected by copyright laws and subject tothe nondisclosure provisions of the applicable PeopleSoft agreement. No part of this documentation may be reproduced, stored in a retrieval system,or transmitted in any form or by any means, including, but not limited to, electronic, graphic, mechanical, photocopying, recording, or otherwise withoutthe prior written permission of PeopleSoft.This documentation is subject to change without notice, and PeopleSoft does not warrant that the material contained in this documentation is free of errors.Any errors found in this document should be reported to PeopleSoft in writing.The copyrighted software that accompanies this document is licensed for use only in strict accordance with the applicable license agreement which should beread carefully as it governs the terms of use of the software and this document, including the disclosure thereof.PeopleSoft, PeopleTools, PS/nVision, PeopleCode, PeopleBooks, PeopleTalk, and Vantive are registered trademarks, and Pure Internet Architecture,Intelligent Context Manager, and The Real-Time Enterprise are trademarks of PeopleSoft, Inc. All other company and product names may be trademarks oftheir respective owners. The information contained herein is subject to change without notice.Open Source DisclosurePeopleSoft takes no responsibility for its use or distribution of any open source or shareware software or documentation and disclaims any and all liability ordamages resulting from use of said software or documentation. The following open source software may be used in PeopleSoft products and the followingdisclaimers are provided.Apache Software FoundationThis product includes software developed by the Apache Software Foundation (http://www.apache.org/). Copyright (c) 1999-2000 The Apache SoftwareFoundation. All rights reserved.THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALLTHE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THEUSE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.OpenSSLCopyright (c) 1998-2003 The OpenSSL Project. All rights reserved.THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUTNOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THEUSE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.SSLeayCopyright (c) 1995-1998 Eric Young. All rights reserved.THIS SOFTWARE IS PROVIDED BY ERIC YOUNG "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITEDTO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NOEVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, ORCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OFUSE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER INCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THISSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.Loki LibraryCopyright (c) 2001 by Andrei Alexandrescu. This code accompanies the book:Alexandrescu, Andrei. "Modern C Design: Generic Programming and Design Patterns Applied". Copyright (c) 2001. Addison-Wesley. Permission to use,copy, modify, distribute and sell this software for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copiesand that both that copyright notice and this permission notice appear in supporting documentation.

ContentsGeneral PrefaceAbout These PeopleBooks . . . . . . . . . . . . .ixPeopleSoft Application Prerequisites. . . . . . . . . . . . . .ixPeopleSoft Application Fundamentals. . . . . . . . . .ixRelated Documentation. . . . . . .xObtaining Documentation Updates. . . . . . .xOrdering Printed Documentation. . . . . . . . . . . . .xTypographical Conventions and Visual Cues. . . . . . . . . .xiTypographical Conventions. . . . . . . . . . . . . . . . . .xiVisual Cues. . . .xiiComments and Suggestions. . . . . . . . .xiiiCommon Elements in These PeopleBooks . . . . . . . . . . . . . . . .xiiiPrefacePeopleSoft Component Interfaces Preface. . . . . . . . . . . . . . . . . . . . . . . . . . .xvPeopleSoft Component Interfaces. . . . . . . . . . . . . . .xvChapter 1Introducing Component Interfaces. . . . . . . . . . . . . . . . . . . . . . . .1Understanding Component Interfaces. . . . . .1Component Interface Architecture. . . . . . . . . . . . . . .1Component Interface Attributes. . . . . . . . . . . . . . .2Name. . . . .2Keys. . . . .2Properties. . . . .2Collections. . . . .2Methods. . . . .3Component Interface Definitions and Views. . . . . . . . .3Chapter 2Developing the Component Interface. . . . . . . . . . . . . . . . . . . . . . .7Creating the Component Interface Definition. . . . . . . . . .7PeopleSoft Proprietary and Confidentialiii

ContentsCreating a New Component Interface. . . . . . . . . . . . . .7Criteria for Defaulting Properties. . . . . . . . . . . . .9Naming the Component Interface Definition. . . . . . . . . .9Associating a Component Interface With a Menu. . . . . . . . . . . .10Determining Which Fields to Expose. . . . . . . . . . . . . . . . . .11Using Keys. . . . . . . . . . . . .11Understanding Keys. . . . . . . . .11Adding and Deleting Keys. . . . . . . . .13Setting Properties. . . . . . . . . . . . . . . .13Standard Properties. . . . . . . . . .13Creating User-Defined Properties. . . . . . . . . . . .25Deleting User-Defined Properties. . . . . . . . . . . . . . . . .26Renaming User-Defined Properties. . . . . . . . . .26Reference Properties. . . . . . . . .27Making Properties Read-Only. . . . . . . . .27Working With Collections. . . . . . . . .27Working With Methods. . . . . . . . .28Working with Session Functions and Methods. . . . . . . . . . . . . . . . . .28Standard Methods. . . . . . . . .29Collection Methods. . . . . . . . . .33Enabling and Disabling Standard Methods. . . . . . . . . . . . . . . . . . . .37Creating User-Defined Methods. . . . . . . . . . .37Validating the Component Interface. . . . . . . . .39Setting Component Interface Security. . . . . . . . . .39Testing the Component Interface. . . . . . . . .41Testing the Component Interface. . . . . . . . . .41Determining ItemByKeys Parameters. . . . . . . . .45Understanding Synchronization. . . . . . . . . . . . . . .46Writing a Component Interface Program. . . . . . . . . . . . .47Runtime Considerations. . . . . . . . . .47General Considerations. . . . . . . . .47Scope Conflicts. . . . . . . . . . . . . .48Interactive Mode. . . . . . . . . .48Chapter 3Programming Component Interfaces in Java. . . . . . . . . . . . . . . . . . . . . . . . . . .49Building APIs in Java. . . . . . . . . . . . . . . . .49Setting Up the Java Environment. . . . . . . . . . . . . . .50Generating a Java Runtime Code Template. . . . . . . . . . . .50ivPeopleSoft Proprietary and Confidential

ContentsUnderstanding the Java Template. . . . . . . . .52Chapter 4Programming Component Interfaces in C . . . . . . . . . . . . . . . . . . . . . . . . . .55Building APIs for C . . . . . . . . . .55Setting Up the C Environment. . . . . . . . .55Setting Up a Client Machine to Access a C API. . . . . . . . .56Configuring a Compiler for the C Project. . . . . . . . . .56Generating a C Runtime Code Template. . . . . . . . .58Understanding the C Template. . . . . . . . . . . . . .59Chapter 5Programming Component Interfaces in COM. . . . . . . . . . . . . . . . . . . . . .63Building APIs for COM. . . . . . . . .63Setting Up the COM Environment. . . . . . . . .64Generating a Visual Basic Runtime Code Template. . . . . . . . . . . .65Understanding the Visual Basic Template. . . . . . . . .66Chapter 6Using the Component Interface Software Development Kit (SDK). . . . . . . . . . . . . . . . .69Understanding the Component Interface SDK. . . . . . . . . . . . . . . . . . .69Component Interface SDK Samples. . . . . . . . . . . . . .69Setting SDK Prerequisites. . . . . . . . .69Using the SDK BUS EXPENSES Test Page. . . . . . . . . . . . . . .70Testing the SDK BUS EXP . . . . . . . . .71Using the SDK Java Sample. . . . . . . . .71Running the Java Sample. . . . . . . . . . .71Understanding the Java Sample Code. . . . . . . . . . . . . . . .72Using the SDK C Sample. . . . . . . . . . . . . . . .74Building the C Sample. . . . . . . . . . . .74Running the SDK C Sample. . . . . . . . . . . . . . . .74Understanding the C Sample Code. . . . . . . . . .75Using the SDK COM Excel Sample. . . . . . . . .76Running the COM Excel Sample. . . . . . . . . . . .77Understanding the COM Excel Sample Code. . . . . . . . . . . . . . . . .78Using the SDK COM ASP Sample. . . . . . . . . .78Running the COM ASP Sample. . . . . . . . . . . . . . .78PeopleSoft Proprietary and Confidentialv

ContentsUnderstanding the COM ASP Sample Code. . . . . . . . .80Chapter 7Programming Component Interfaces in PeopleCode. . . . . . . . . . . .85Understanding PeopleCode Behavior and Limitations. . . . . . . . . . . . . . . .85PeopleCode Event and Function Behavior. . . . . . . . .85CopyRowset Language Considerations. . . . . . . . . . . . .86Limitations of Client-Only PeopleCode. . . . . . . . . . . . . . . . .86Generating a PeopleCode Template. . . . . . . . .87Understanding the PeopleCode Template. . . . . . . . . . . . . . . . .88Chapter 8Using the Excel to Component Interface Utility. . . . . . . . . . . . .91Understanding the Excel To Component Interface Utility . . . . . . . . .91Building a Component Interface for the Excel to Component Interface Utility. . . . . . . . . . . . .92Getting Started with the Excel to Component Interface Utility. . . . . . . . . . . . .94Viewing the Coversheet. . . . . . . . .95Setting Up Connection Information. . . . . . . . .95Entering Connection Information. . . . . . . . . . . . . . .96Connecting to the Database to Create a Template and Submit Data. . . . . . . . .98Creating a Template. . . . . . . . .99Understanding the Template Actions Toolbar. . . . .101Entering Data into the Template. . . . . . .102Template Wrapping. . .103Entering Data on the Data Input Sheet. . . . . .103Using the Data Input Sheet. . .103Viewing the Staged Data. . . . . . . .105Correcting and Resubmitting Data. . . . . . . . . .106Creating a SOAP/XML Request. . . . . .107Request Format. . .107Sample Create Request. . . . . . .107Sample Get Request. . .108Sample Update Request. . .108Sample Updatedata Request. . . . . . . . . .108Sending the Request. . . .109Receiving a Response. . . .109Viewing a Response if a Row Already Exists. . . . . .109Viewing a Sample Get Request and Response. . . . . . . . . . . . . .110viPeopleSoft Proprietary and Confidential

ContentsDiagnosing and Resolving Errors. . . . . . . . . . . . . . .111Viewing Log Files. . . . . . . .111Resolving Error Messages for Client Environments. . . . . . . . . . . . . . . . . .111Chapter 9WSDL Binding for Component Interfaces. . . . . . . . . . . . . . . .113Understanding WSDL and Component Interfaces. . . . . . . . . .113Setting Up Integration Broker. . . . . . .113Ensuring the SOAPTOCI Message is Active. . . . . .114Verifying the Message Channel. . . . . .114Modifying the Local Gateway. . . . . . . . . . . .114Creating the Third-Party Message Node. . . . . . . . .115Adding Security to PeopleSoft Objects. . . . . . . .116Generating WSDL for a Component Interface. . . . . .117Sending a SOAP Message to PeopleSoft. . . . . .119Understanding SOAP Considerations. . . . . . . . . .120Testing SOAP to Component Interface Using Send Master. . . . . . . . . . . .120Viewing an Example of a Find SOAP Request. . . . . . .121Glossary of PeopleSoft Terms. . . . . . . . .123Index . . . . . . . . . . . . . . . .139PeopleSoft Proprietary and Confidentialvii

ContentsviiiPeopleSoft Proprietary and Confidential

About These PeopleBooksPeopleBooks provide you with the information that you need to implement and use PeopleSoft applications.This preface discusses: PeopleSoft application prerequisites. PeopleSoft application fundamentals. Related documentation. Typographical elements and visual cues. Comments and suggestions. Common elements in PeopleBooks.Note. PeopleBooks document only page elements that require additional explanation. If a page elementis not documented with the process or task in which it is used, then either it requires no additionalexplanation or it is documented with common elements for the section, chapter, PeopleBook, or productline. Elements that are common to all PeopleSoft applications are defined in this preface.PeopleSoft Application PrerequisitesTo benefit fully from the information that is covered in these books, you should have a basicunderstanding of how to use PeopleSoft applications.See Using PeopleSoft Applications.You might also want to complete at least one PeopleSoft introductory training course.You should be familiar with navigating the system and adding, updating, and deleting information byusing PeopleSoft windows, menus, and pages. You should also be comfortable using the World WideWeb and the Microsoft Windows or Windows NT graphical user interface.These books do not review navigation and other basics. They present the information that you needto use the system and implement your PeopleSoft applications most effectively.PeopleSoft Application FundamentalsEach application PeopleBook provides implementation and processing information for your PeopleSoftdatabase. However, additional, essential information describing the setup and design of your systemappears in a companion volume of documentation called the application fundamentals PeopleBook.Each PeopleSoft product line has its own version of this documentation.PeopleSoft Proprietary and Confidentialix

General PrefaceThe application fundamentals PeopleBook consists of important topics that apply to many or allPeopleSoft applications across a product line. Whether you are implementing a single application,some combination of applications within the product line, or the entire product line, you shouldbe familiar with the contents of this central PeopleBook. It is the starting point for fundamentals,such as setting up control tables and administering security.Related DocumentationThis section discusses how to: Obtain documentation updates. Order printed documentation.Obtaining Documentation UpdatesYou can find updates and additional documentation for this release, as well as previous releases,on the PeopleSoft Customer Connection Website. Through the Documentation section ofPeopleSoft Customer Connection, you can download files to add to your PeopleBook Library.You’ll find a variety of useful and timely materials, including updates to the full PeopleSoftdocumentation that is delivered on your PeopleBooks CD-ROM.Important! Before you upgrade, you must check PeopleSoft Customer Connection for updates to theupgrade instructions. PeopleSoft continually posts updates as the upgrade process is refined.See AlsoPeopleSoft Customer Connection Website, g Printed DocumentationYou can order printed, bound volumes of the complete PeopleSoft documentation that is deliveredon your PeopleBooks CD-ROM. PeopleSoft makes printed documentation available for eachmajor release shortly after the software is shipped. Customers and partners can order printedPeopleSoft documentation by using any of these methods: Web Telephone EmailWebFrom the Documentation section of the PeopleSoft Customer Connection Website, access the PeopleSoftPress Website under the Ordering PeopleBooks topic. The PeopleSoft Press Website is a joint venturebetween PeopleSoft and Consolidated Publications Incorporated (CPI), the book print vendor. Use acredit card, money order, cashier’s check, or purchase order to place your order.xPeopleSoft Proprietary and Confidential

General PrefaceTelephoneContact CPI at 800 888 3559.EmailSend email to CPI at psoftpress@cc.larwood.com.See AlsoPeopleSoft Customer Connection Website, phical Conventions and Visual CuesThis section discusses: Typographical conventions. Visual cues.Typographical ConventionsThe following table contains the typographical conventions that are used in PeopleBooks:Typographical Convention or Visual CueDescriptionBoldIndicates PeopleCode function names, method names,language constructs, and PeopleCode reserved words thatmust be included literally in the function call.ItalicsIndicates field values, emphasis, and PeopleSoft or otherbook-length publication titles. In PeopleCode syntax,italic items are placeholders for arguments that yourprogram must supply.We also use italics when we refer to words as words orletters as letters, as in the following: Enter the number 0,not the letter O.KEY KEYIndicates a key combination action. For example, a plussign ( ) between keys means that you must hold downthe first key while you press the second key. For ALT W,hold down the ALT key while you press W.Monospace fontIndicates a PeopleCode program or other code example.“ ” (quotation marks)Indicate chapter titles in cross-references and words thatare used differently from their intended meanings.PeopleSoft Proprietary and Confidentialxi

General PrefaceTypographical Convention or Visual CueDescription. . . (ellipses)Indicate that the preceding item or series can be repeatedany number of times in PeopleCode syntax.{ } (curly braces)Indicate a choice between two options in PeopleCodesyntax. Options are separated by a pipe ( ).[ ] (square brackets)Indicate optional items in PeopleCode syntax.& (ampersand)When placed before a parameter in PeopleCode syntax,an ampersand indicates that the parameter is an alreadyinstantiated object.Ampersands also precede all PeopleCode variables.(ISO)Information that applies to a specific country, to the U.S.federal government, or to the education and governmentmarket, is preceded by a three-letter code in parentheses.The code for the U.S. federal government is USF;the code for education and government is E&G, andthe country codes from the International StandardsOrganization are used for specific countries. Here is anexample:(GER) If you’re administering German employees,German law requires you to indicate special nationalityand citizenship information for German workers usingnationality codes established by the German DEUEVDirective.Cross-referencesPeopleBooks provide cross-references eit

PeopleSoft Component Interfaces SKU PT844CPI-B 1203 . Developing the Component Interface.7 Creating the Component Interface Definition.7 PeopleSoft Proprietary and Confidential iii. Contents Creating a New Component Interface .