Business Interlink Used With XML Guide

download Business Interlink Used With XML Guide

of 312

Transcript of Business Interlink Used With XML Guide

  • 7/31/2019 Business Interlink Used With XML Guide

    1/312

    PeopleTools 8.4: PeopleSoftBusiness Interlink Used with

    XML Guide

  • 7/31/2019 Business Interlink Used With XML Guide

    2/312

    PeopleTools 8.4: PeopleSoft Business Interlink Used with XML Guide

    SKU Tr84BIX-B 0302

    PeopleBooks Contributors: Teams from PeopleSoft Product Documentation and

    Development.

    Copyright 2002 PeopleSoft, Inc. All rights reserved.

    Printed in the United States.

    All material contained in this documentation is proprietary and confidential to PeopleSoft,Inc. ("PeopleSoft"), protected by copyright laws and subject to the nondisclosure provisionsof 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 without theprior written permission of PeopleSoft.

    This documentation is subject to change without notice, and PeopleSoft does not warrant thatthe material contained in this documentation is free of errors. Any errors found in thisdocument should be reported to PeopleSoft in writing.

    The copyrighted software that accompanies this document is licensed for use only in strictaccordance with the applicable license agreement which should be read carefully as itgoverns the terms of use of the software and this document, including the disclosure thereof.

    PeopleSoft, the PeopleSoft logo, PeopleTools, PS/nVision, PeopleCode, PeopleBooks,PeopleTalk, and Vantive are registered trademarks, and "People power the internet." and Pure

    Internet Architecture are trademarks of PeopleSoft, Inc. All other company and productnames may be trademarks of their respective owners. The information contained herein issubject to change without notice.

  • 7/31/2019 Business Interlink Used With XML Guide

    3/312

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L C O N T E N T S i i i

    C o n t e n t s

    PeopleSoft Business Interlink Used with XML Guide Preface

    About This PeopleBook.................................................................................................... vii

    Before You Begin............................................................................................................. vii

    PeopleSoft Application Fundamentals ............................................................................ viii

    Related Documentation ................................................................................................... viii

    Hard-copy Documentation........................................................................................viii

    PeopleBooks Standard Field Definitions........................................................................... ix

    Typographical Conventions and Visual Cues..................................................................... x

    Page and Panel Introductory Table................................................................................... xii

    Comments and Suggestions.............................................................................................. xii

    Chapter 1

    Introduction to Business Interlinks Used with XML

    What is the Business Interlink Architecture.................................................................... 1-1

    Running a Business Interlink using pshttpenable (Generic Plug-in) ........................ 1-1

    Creating a Business Interlink for XML..................................................................... 1-2

    Running an Inbound Business Interlink.................................................................... 1-3

    Creating an Inbound Business Interlink.................................................................... 1-4List of Common Business Interlink Terms...................................................................... 1-4

    Chapter 2

    Writing a XML Design-Time Plug-In using the pshttpenable Runtime Plug-In

    The Generic Plug-In (pshttpenable) is not Distributable................................................. 2-1

    Writing the Configuration Parameters for the pshttpenable runtime plug-in .................. 2-1

    Specify the pshttpenable Runtime Plug-in .................................................. 2-2

    Method: Specify the Method Parameters.................................................................. 2-2

    SSL: Specify Secure Link......................................................................................... 2-2

    Accept_Type: Specify Secure Link .......................................................................... 2-2

    Content_Type: Specify Content Type Headers......................................................... 2-3

    USERID: Specify User ID ........................................................................................ 2-3

    PASSWORD: Specify User Password...................................................................... 2-3

    MerchantURL: Specify The Merchant URL............................................................. 2-3

    Cookie: Specify a Cookie ......................................................................................... 2-4

    InDataType: Specify Input Data Type ...................................................................... 2-4

  • 7/31/2019 Business Interlink Used With XML Guide

    4/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    C O N T E N T S i v P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    OutDataType: Specify Output Data Type................................................................. 2-5

    XML_Validation: Check for Errors in XML Syntax ................................................ 2-5

    Input_File_Name: Debug Input Data........................................................................2-5

    Request_File_Name: Debug Request Data ............................................................... 2-6

    Simulated_Response_File_Name: Debug Request Data........................................... 2-6

    Response_File_Name: Debug Request Data............................................................. 2-6

    Metatag: Debug Request Data................................................................................... 2-7

    HttpHeader: Add HTTP Headers ..............................................................................2-7

    Proxy-Authentication ................................................................................................2-7

    Proxy-Authorization.................................................................................................. 2-8

    Writing the pshttpenable Runtime Plug-in Input Parameters ..........................................2-8

    Writing the pshttpenable Runtime Plug-in Output Parameters........................................ 2-8

    Writing the pshttpenable Runtime Plug-in Classes ......................................................... 2-8

    Escaping XML Restricted Characters.............................................................................. 2-8

    Safe Characters ................................................................................................................ 2-9Example of XML Design-Time Plug-ins using pshttpenable..........................................2-9

    Diagram of the Example Transaction........................................................................ 2-9

    pshttpenable Runtime Plug-in: Reading an XML String...............................................2-14

    Example of Design-Time Plug-in for Reading XML String...................................2-14

    Example of PeopleCode for Reading XML String ................................................. 2-18

    XML Template for pshttpenable Runtime Plug-in ........................................................2-19

    Chapter 3

    Creating an Inbound Business Interlink

    Requirements to determine if Inbound Business Interlink suits your needs....................3-1

    Setting up the configuration.properties File for Inbound Business Interlinks .................3-1

    Setting up the Inbound Business Interlink Environment for an IScript Function............3-2

    Test your creation using the XMLLink tester ...........................................................3-5

    Writing the IScript Function............................................................................................3-6

    Allowing Passing in a GET Action Parameter When Accessing an XMLLink

    Service....................................................................................................................... 3-6

    Example of a PeopleCode Program for an Inbound Business Interlink....................3-7

    Listing of the XML Request...................................................................................... 3-9

    Listing of the XML Response................................................................................. 3-10

    Test Example: XML Design-Time Plug-in Used with an Inbound Business

    Interlink.......................................................................................................................... 3-11

    Using Apache or Web Logic Web Servers with Inbound Business Interlinks..............3-17

    Using the Inbound Business Interlink Methods and Properties.....................................3-17

    AddAttribute ........................................................................................................... 3-18

    AddComment ..........................................................................................................3-19

    AddProcessInstruction ............................................................................................ 3-20

  • 7/31/2019 Business Interlink Used With XML Guide

    5/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L C O N T E N T S v

    AddText .................................................................................................................. 3-21

    AttributeCount ........................................................................................................ 3-22

    ChildNodeCount ..................................................................................................... 3-23

    CreateElement ......................................................................................................... 3-24

    GenXMLString ....................................................................................................... 3-25

    GetAttributeName................................................................................................... 3-26

    GetAttributeValue................................................................................................... 3-27

    GetNode.................................................................................................................. 3-28

    NodeName .............................................................................................................. 3-29

    NodeType................................................................................................................ 3-30

    NodeValue .............................................................................................................. 3-31

    ParseXMLString ..................................................................................................... 3-32

    Inbound Business Interlink Functions........................................................................... 3-33

    GetBiDoc ................................................................................................................ 3-33

    IScript Functions ........................................................................................................... 3-34GetContentBody...................................................................................................... 3-35

    Glossary

    Index

  • 7/31/2019 Business Interlink Used With XML Guide

    6/312

  • 7/31/2019 Business Interlink Used With XML Guide

    7/312

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L P R E F A C E v i i

    PeopleSoft Business Interlink Usedwith XML Guide Preface

    This PeopleBook covers the concepts of Business Interlinks. It discusses how PeopleSoftapplication developers use Business Interlinks to integrate PeopleSoft applications with

    external systems. This PeopleBook is written for PeopleSoft Application Developers who willbe integrating external systems with PeopleSoft by writing PeopleCode to use Business

    Interlinks.

    The About This PeopleBook preface contains general product line information, such as

    related documentation, common page elements, and typographical conventions. This bookalso contains a glossary with useful terms that are used in PeopleBooks.

    See PeopleSoft Glossary.

    About This PeopleBook

    This book provides you with the information that you need for implementing and usingPeopleTools 8.4 applications. Complete documentation for this release is provided on the CD-

    ROM PT84PBR0.

    Note. Your access to PeopleSoft PeopleBooks depends on which PeopleSoft applications

    you've licensed. You may not have access to all of the PeopleBooks.

    This section contains information that you should know before you begin working withPeopleSoft products and documentation, including PeopleSoft-specific documentationconventions, information specific to each PeopleSoft product line, and information onordering additional copies of our documentation.

    Before You Begin

    To benefit fully from the information covered in this book, you should have a basic

    understanding of how to use PeopleSoft applications. We recommend that you complete atleast one PeopleSoft introductory training course.

    You should be familiar with navigating the system and adding, updating, and deletinginformation by using PeopleSoft windows, menus, and pages. You should also becomfortable using the World Wide Web and the Microsoft Windows or Windows NTgraphical user interface.

    Because we assume that you already know how to navigate the PeopleSoft system, much ofthe information in these books is not procedural. That is, these books do not typically provide

    step-by-step instructions on using tables, pages, and menus. Instead, we provide you with theinformation that you need to use the system most effectively and to implement your

  • 7/31/2019 Business Interlink Used With XML Guide

    8/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P R E F A C E v i i i P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    PeopleSoft application according to your organizational or departmental needs. PeopleBooksexpand on the material covered in PeopleSoft training classes.

    PeopleSoft Application Fundamentals

    Each PeopleSoft application PeopleBook provides implementation and processing information

    for your PeopleSoft database. However, there is additional, essential information describingthe setup and design of your database contained in a companion volume of documentation

    calledPeopleSoft Application Fundamentals.

    PeopleSoft Application Fundamentals contains important topics that apply to many or all

    PeopleSoft applications across each product line. Whether you are implementing only onePeopleSoft application, some combination of products within a product line, or an entirePeopleSoft system, you should be familiar with the contents of this central PeopleBook. It

    contains fundamental information such as setting up control tables and administering security.

    The PeopleSoft Applications Fundamentals PeopleBook contains common information

    pertinent to all applications in each product line, such as defining general options. If you'reupgrading from a previous PeopleSoft release, you may notice that we've removed sometopics or topic headings from the individual application PeopleBooks and consolidated themin this single reference book. Youll now find only application-specific information in your

    individual application PeopleBooks. This makes the documentation as a whole lessredundant. Throughout each PeopleBook, we provide cross-references toPeopleSoftApplication Fundamentals and other PeopleBooks.

    Related Documentation

    You can order printed, bound versions of the complete PeopleSoft documentation delivered on

    your PeopleBooks CD-ROM and additional copies of the PeopleBooks CDs through theDocumentation section of the PeopleSoft Customer Connection website:

    http://www.peoplesoft.com/corp/en/login.asp

    You can find updates and additional documentation for this release, as well as previous

    releases, on PeopleSoft Customer Connection (http://www.peoplesoft.com/corp/en/login.asp ).Through the Documentation section of Customer Connection, you can download files to addto your PeopleBook library. You'll find a variety of useful and timely materials, includingupdates to the full PeopleSoft documentation delivered on your PeopleBooks CD.

    Important! Before you upgrade, it is imperative that you check PeopleSoft Customer

    Connection for updates to the upgrade instructions. We continually post updates as we refinethe upgrade process.

    Hard-copy Documentation

    To order printed, bound volumes of the complete PeopleSoft documentation delivered on yourPeopleBooks CD-ROM, visit the PeopleSoft Press website from the Documentation section of

  • 7/31/2019 Business Interlink Used With XML Guide

    9/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L P R E F A C E i x

    PeopleSoft Customer Connection. The PeopleSoft Press website is a joint venture betweenPeopleSoft and Consolidated Publications Incorporated (CPI), our book print vendor.

    We make printed documentation available for each major release shortly after the software isshipped. Customers and partners can order printed PeopleSoft documentation by using any ofthe following methods:

    Internet From the main PeopleSoft Internet site, go to theDocumentation section of Customer Connection. You can

    find order information under the Ordering PeopleBookstopic. Use a Customer Connection ID, credit card, or

    purchase order to place your order.

    PeopleSoft Internet site: http://www.peoplesoft.com/ .

    Telephone Contact Consolidated Publishing Incorporated (CPI) at

    800 888 3559.

    Email Send email to CPI at [email protected].

    PeopleBooks Standard Field Definitions

    Throughout our product documentation, you will encounter fields and buttons that are used onmany application pages or panels. This section lists the most common fields and buttons and

    provides standard definitions.

    Field Definition

    As of Date The last date for which a report or process includes data.

    Business Unit An identification code that represents a high-level organization

    of business information. You can use a business unit to define

    regional or departmental units within a larger organization.

    Description Freeflow text up to 30 characters.

    Effective Date Date on which a table row becomes effective; the date that an

    action begins. For example, if you want to close out a ledger on

    June 30, the effective date for the ledger closing would be July

    1. This date also determines when you can view and change the

    information. Pages or panels and batch processes that use the

    information use the current row.

    For more information about effective dates, see

    Understanding Effective Dates in Using PeopleSoft

    Applications.

    EmplID (employee ID) Unique identification code for an individual associated with

    your organization.

  • 7/31/2019 Business Interlink Used With XML Guide

    10/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P R E F A C E x P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    Field Definition

    Language or Language Code The language in which you want the field labels and report

    headings of your reports to print. The field values appear as you

    enter them.

    Language also refers to the language spoken by an employee,

    applicant, or non-employee.

    Process Frequency group box Designates the appropriate frequency in the Process Frequency

    group box:

    Once executes the request the next time the batch process runs.

    After the batch process runs, the process frequency is

    automatically set to Don't Run.

    Always executes the request every time the batch process runs.

    Don't Run ignores the request when the batch process runs.

    Report ID The report identifier.

    Report Manager This button takes you to the Report List page, where you canview report content, check the status of a report, and see content

    detail messages (which show you a description of the report and

    the distribution list).

    Process Monitor This button takes you to the Process List page, where you can

    view the status of submitted process requests.

    Run This button takes you to the Process Scheduler request page,

    where you can specify the location where a process or job runs

    and the process output format.

    For more information about the Report List page, the

    Process List page, and the Process Scheduler, see ProcessScheduler Basics in the PeopleTools documentation.

    Request ID A request identification that represents a set of selection criteria

    for a report or process.

    User ID The system identifier for the individual who generates a

    transaction.

    SetID An identification code that represents a set of control table

    information or TableSets. A TableSet is a group of tables

    (records) necessary to define your companys structure and

    processing options.

    Short Description Freeflow text up to 15 characters.

    Typographical Conventions and Visual Cues

    We use a number of standard conventions and visual cues in our online documentation.

    The following list contains our typographical conventions and visual cues:

  • 7/31/2019 Business Interlink Used With XML Guide

    11/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L P R E F A C E x i

    (monospace font) Indicates a PeopleCode program or other program

    example.

    Bold Indicates field names and other page elements, such asbuttons and group box labels, when these elements aredocumented below the page on which they appear. When

    we refer to these elements elsewhere in thedocumentation, we set them in Normal style (not in bold).

    We also use boldface when we refer to navigational paths,menu names, or process actions (such as Save and Run).

    Italics Indicates a PeopleSoft or other book-length publication.We also use italics for emphasis and to indicate specificfield values. When we cite a field value under the page onwhich it appears, we use this style:field value.

    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+KEY Indicates a key combination action. For example, a plus

    sign (+) between keys means that you must hold down thefirst key while you press the second key. For ALT+W,

    hold down the ALT key while you press W.

    Cross-references The phrase For more information indicates where you

    can find additional documentation on the topic at hand.We include the navigational path to the referenced topic,

    separated by colons (:). Capitalized titles in italics

    indicate the title of a PeopleBook; capitalized titles innormal font refer to sections and specific topics within the

    PeopleBook. Here's an example:

    For more information, see Documentation on CD-

    ROM inAbout These PeopleBooks: Additional

    Resources.

    Note. Text in this bar indicates information that you should pay particular attention to as you

    work with your PeopleSoft system. If the note is preceded by Important!, the note is crucial

    and includes information that concerns what you need to do for the system to function

    properly.

    Text in this bar indicates cross-references to related or additional information.

    Warning! Text within this bar indicates a crucial configuration consideration. Pay very

    close attention to these warning messages.

  • 7/31/2019 Business Interlink Used With XML Guide

    12/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P R E F A C E x i i P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    Page and Panel Introductory Table

    In the documentation, each page or panel description in the application includes anintroductory table with pertinent information about the page. Not all of the information will beavailable for all pages or panels.

    Usage Describes how you would use the page or process.

    Object Name Gives the system name of the panel or process as specified in the PeopleTools

    Application Designer. For example, the Object Name of the Detail Calendar

    panel is DETAIL_CALENDAR1.

    Navigation Provides the path for accessing the page or process.

    Prerequisites Specifies which objects must have been defined before you use the page or

    process.

    Access

    Requirements

    Specifies the keys and other information necessary to access the page. For

    example, SetID and Calendar ID are required to open the Detail Calendar

    page.

    Comments and Suggestions

    Your comments are important to us. We encourage you to tell us what you like, or what youwould like to see changed about our documentation, PeopleBooks, and other PeopleSoftreference and training materials. Please send your suggestions to:

    PeopleSoft Product Documentation ManagerPeopleSoft, Inc.

    4460 Hacienda DrivePleasanton, CA 94588

    Or send comments by email to the authors of the PeopleSoft documentation at:

    [email protected]

    While we cannot guarantee to answer every email message, we will pay careful attention toyour comments and suggestions. We are always improving our product communications foryou.

  • 7/31/2019 Business Interlink Used With XML Guide

    13/312

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L I N T R O D U C T I O N T O B U S I N E S S I N T E R L I N K S 1 - 1

    C H A P T E R 1

    Introduction to Business InterlinksUsed with XML

    Business Interlinks enable you to perform component-based, realtime integration from

    PeopleSoft to external systems. Business Interlinks do this by creating synchronoustransactions that allow PeopleSoft applications to pass data to and receive data from theexternal system in real time. You can use Business Interlinks to integrate PeopleSoft with

    external systems, with another PeopleSoft application, and systems on the internet web.

    A transaction consists of a named command with optional named and typed inputs andoutputs. The associated external system or the Business Interlink Plug-in understands thiscommand.

    What is the Business Interlink Architecture

    The Business Interlink Architecture provides a plug-in framework for PeopleSoft applicationsto invoke third party XML requests and responses over the Internet.

    The Business Interlink pshttpenable (generic) design-time plug-in allows PeopleSoft to send arequest to a third party over the Internet and then receive a response. Incoming Business

    Interlinks allow PeopleSoft to receive a request from a third party over the Internet and thensend a response.

    Running a Business Interlink using pshttpenable (Generic Plug-in)

    There is a specialized type of Business Interlink design-time plug-in, which uses the

    pshttpenable (generic) runtime plug-in. Some external systems receive data via HTTP in theform of an XML request, and then return data in the form of an XML response. When yourexternal system uses data in this manner, you can use the pshttpenable runtime plug-in. This

    means that a Business Interlink runtime plug-in need not be created for your external system.

    The following diagram shows the architecture for Business Interlinks using the pshttpenableruntime plug-in.

  • 7/31/2019 Business Interlink Used With XML Guide

    14/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    1 - 2 I N T R O D U C T I ON T O B U S I N E S S I N T E R L I N K S P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    Business Interlink Architecture

    When the Business Interlink Object is executed for a Business Interlink using a pshttpenable

    runtime plug-in, the following actions take place:

    1. A PeopleSoft Application with input values triggers a PeopleCode event.

    2. The triggered event passes the input values to a PeopleCode program, and then executesthe PeopleCode program.

    3. The PeopleCode program creates an Interlink Object, which contains the input data and

    the transaction name, and passes the Interlink Object to the Business Interlink runtimeplug-in. The runtime plug-in is the httpenable plug-in, located on the PeopleSoftapplication server.

    4. The httpenable runtime plug-in sends a request over the Internet to the third party webserver, passing it input values from the Business Interlink Object.

    5. The third party web server performs operations based on those inputs, and returns aresponse over the Internet, passing back output values to the httpenable runtime plug-in.

    6. The Business Interlink runtime plug-in assigns output values to the Business InterlinkObject (if there are outputs). If there are outputs, their values can be fetched and assigned

    to PeopleSoft variables.

    Creating a Business Interlink for XML

    To allow users to create and run Business Interlinks, developers must perform the followingtasks.

  • 7/31/2019 Business Interlink Used With XML Guide

    15/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L I N T R O D U C T I O N T O B U S I N E S S I N T E R L I N K S 1 - 3

    1. A developer designs the shape of a transaction(s) (inputs, outputs, name). For example,the action could be telling UPS to calculate the cost of shipping.

    2. A developer writes a Business Interlink design-time plug-in that implements the shape ofthe transaction(s). This plug-in is written in the XML markup language.

    3. The design-time plug-in is deployed for use by PeopleSoft applications.

    4. A PeopleSoft Application Developer creates a Business Interlink Definition, which createsa specific shape for a particular PeopleSoft application. For example, the applicationmight be created, or modified, to be able to connect to UPS and calculate shipping costs.

    5. A PeopleSoft Application Developer writes a PeopleCode program to call the BusinessInterlink object that is created for the Business Interlink definition.

    6. A user can now use the PeopleSoft application to run the Business Interlink.

    Running an Inbound Business Interlink

    An Inbound Business Interlink allows PeopleSoft to receive an XML request via HTTP from a

    third party system, and send an XML response to the third party system. The followingdiagram shows the architecture for Business Interlinks using the pshttpenable runtime plug-in.

    Business Interlink Architecture

    When the third party system sends a request over the Internet to PeopleSoft, the followingactions take place:

    1. A third party system sends an XML request over the Internet to a PeopleSoft web server.

    This request also contains a service name.

    2. The XMLLink servlet on the PeopleSoft web server maps the service name to a

    PeopleCode function, and executes the function.

    3. The PeopleCode program parses the XML request.

  • 7/31/2019 Business Interlink Used With XML Guide

    16/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    1 - 4 I N T R O D U C T I ON T O B U S I N E S S I N T E R L I N K S P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    4. The PeopleCode program can execute an application, access a database, or other task,depending upon the content of the request. For example, it could search an employeedatabase to find employees who have a certain skill.

    5. The PeopleCode program creates an XML response.

    6. The PeopleCode program sends the XML response to the third party system.

    Creating an Inbound Business Interlink

    To allow users to create and run Inbound Business Interlinks, developers must perform thefollowing tasks.

    1. A developer discovers the shape of the XML request and response that will be used by thisInbound Business Interlink. The shape is the shape of a transaction(s) (inputs, outputs,

    name).

    2. A developer determines if the transactions are sessionless, synchronized, and over theInternet (HTTP).

    3. A developer sets parameters in the configuration.properties file.

    4. A developer sets up the Inbound Business Interlink Environment for an IScript Function.

    5. A developer writes the PeopleCode IScript Function which performs the following tasks:

    Navigates the request XML using either the new BiDoc methods (listed at below)or populating data on an existing Business Interlink BiDoc using the

    fromXML(string) function.

    Does back-end processing to get data for the response.

    Creates the response XML using the new BiDocs methods (or populate an

    existing Business Interlink with addValue(string )).

    6. A user can now use the IScript function to run the Inbound Business Interlink.

    List of Common Business Interlink Terms

    Application Designer: The integrated development environment used to develop PeopleSoftapplications.

    Basic Type: A data type such as an integer or string.

    Business Interlink Definition: A definition encapsulating an external Transaction or Query

    and providing a set of generically typed input/outputs that can be assigned to PeopleCodevariable or Record Fields at runtime. A Business Interlink Definition is added to theApplication Designers objects at the same level as Fields, Records, Pages, etc.

    XML Design-Time Plug-in: An XML file that, when coded for an external system,

    encapsulate that external system and provide a catalog of Transactions, Classes and Criteria

  • 7/31/2019 Business Interlink Used With XML Guide

    17/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L I N T R O D U C T I O N T O B U S I N E S S I N T E R L I N K S 1 - 5

    specific and meaningful to that external system. This functionality can also be written using aset of C++, Visual Basic, or other high-level language methods.

    Business Interlink Framework: The framework for integrating any external system withPeopleTools application objects. It is composed of the following components: 1) An ExternalSystem, 2) Generic definitions for a Transaction/Query command interfaces, 4) Business

    Interlink Definitions, 4) Business Interlink Plug-in.

    Business Interlink Object: an instantiation based on a Business Interlink Definition. Actual

    data can be added to the inputs of the Business Interlink Objects once the appropriate bindingsare provided. The Business Interlink Object can be executed to perform the external service.Once a Business Interlink Object is executed, the user of that object can retrieve the outputs ofthe external service. The Business Interlink Objects use buffers to receive input and sendoutput. When a Business Interlink Object is executed, the transaction/query/class associated to

    the Business Interlink Object will be executed once per each row of the input bufferscorresponding to the input Records. If there is only one row, after appropriate substitution bythe driver, it is executed only once.

    Catalog: the list of transactions, classes, and queries used to interface to the external system.Integration users are presented with this list when they pick the type of Business InterlinkPlug-in they are going to use. There are four types of catalogs:

    Transaction catalog: lists transactions used to interface to the external system. SeeTransaction.

    Class catalog: lists classes used to interface to an external system. A class contains data

    members of basic types and/or objects that are typed after another class. A Class can also

    contain lists of basic types or objects.

    Operator catalog: lists query operators used to query the external system. These query

    operators are used to query the classes in the class catalog.

    Configuration parameter catalog: Used to configure an external system with PeopleSoft.

    For example, it might set up configuration and communication parameters for an external

    server.

    External System: Any system that is not directly compiled with the PeopleTools servers.

    PeopleCode: PeopleSoft's proprietary language; it is executed by the PeopleSoft Application

    Processor. PeopleCode generates results based upon specific actions, based upon existing dataor the actions of a user. Business Interlink Objects are executed by calling the execute()method from PeopleCode. This makes external services available to all PeopleSoft

    applications wherever PeopleCode can be executed.

    PeopleCode Event: An action that an end-user takes upon an object, usually a Record Field,that is referenced within a PeopleSoft page.

    Query: a set of data members that are selected from a Class catalog (provided by the BusinessInterlink Plug-in) as well as a generic form of Criteria. The criteria are composed of statements that can be concatenated

    using a set of logical operators. All operators and class catalogs are dynamically providedthrough the Business Interlink Plug-in.

  • 7/31/2019 Business Interlink Used With XML Guide

    18/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    1 - 6 I N T R O D U C T I ON T O B U S I N E S S I N T E R L I N K S P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    Transaction: a named command with optional named and typed inputs and outputs. Theassociated external system or the Business Interlink Plug-in understands this command. Thetypes of inputs and outputs are based on a set of generic types.

    Shape: For a transaction, the set of inputs and outputs for that transaction. For a class, the datamembers of that class.

  • 7/31/2019 Business Interlink Used With XML Guide

    19/312

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N 2 - 1

    C H A P T E R 2

    Writing a XML Design-Time Plug-Inusing the pshttpenable Runtime Plug-In

    Some external systems receive data via HTTP in the form of an XML request, and then return

    data in the form of an XML response. When your external system uses data in this manner,you can use the pshttpenable runtime Plug-in. This means that a Business Interlink runtime

    plug-in need not be created for your external system.

    The pshttpeneable runtime plug-in is a self-describing program that encapsulates such external

    systems. It executes HTTP functions GET and POST for sending XML requests to theexternal system, and sets the data document for the response data.

    The XML design-time plug-in for the pshttpeneable runtime plug-in always describes atransaction. This transaction should define the inputs (also known as request) expected by theAPI, and the outputs (also known as response) from the API.

    For more information about the GET and POST HTTP functions, see

    http://www.w3.org/Protocols/rfc2616/rfc2616.html.

    The Generic Plug-In (pshttpenable) is not Distributable

    In order to use the Generic Plug-In, pshttpenable, this plug-in must reside where PeopleTools

    is installed.

    Writing the Configuration Parameters for the pshttpenable runtimeplug-in

    When you write an XML design-time plug-in for a design-time plug-in that uses thepshttpeneable runtime plug-in, you specify some tags within the tag to

    supply information specific for pshttpenable.

    For more information about the tag in general, see thePeopleSoft

    Business Interlink Design-Time Plug-In Programming Guide, Writing an XML Design-Time

    Plug-In, under List The Configuration Parameters.

  • 7/31/2019 Business Interlink Used With XML Guide

    20/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    2 - 2 W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    Specify the pshttpenable Runtime Plug-in

    Write the tag as follows to specify the runtime plug-in to be pshttpenable.

    file://pshttpenable.dll

    Method: Specify the Method Parameters

    The Method parameter specifies the HTTP method GET for receiving XML/HTML data fromthe external system, and the HTTP method POST for sending XML/HTML data to theexternal system.

    Write the tag as follows.

    where value is either GET or POST.

    SSL: Specify Secure Link

    The SSL parameter specifies if the link to the external system is to be secure.

    Write the tag as follows. YES means secure link, NO meansnon-secure link.

    where value is either YES or NO.

    Accept_Type: Specify Secure Link

    The Accept_Type parameter specifies the Accept type headers.

    You can write the tag as follows. You can also addmore types to the enum.

  • 7/31/2019 Business Interlink Used With XML Guide

    21/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N 2 - 3

    Content_Type: Specify Content Type Headers

    The Content_Type parameter specifies the Content type headers.

    You can write the tag as follows. You can also addmore types to the enum.

    USERID: Specify User ID

    Optional. The USERID parameter can be used when the Method parameter is GET. This isusually used with PASSWORD.

    Write the tag as follows.

    where value is the USERID.

    PASSWORD: Specify User Password

    Optional. The PASSWORD parameter can be used when the Method parameter is GET. Thisis usually used with USERID.

    Write the tag as follows.

    where value is the PASSWORD.

    MerchantURL: Specify The Merchant URL

    The MerchantURL parameter specifies the URL where the merchant API is located. This iswhere the request will be sent, and from where the response will be received.

    Write the tag as follows.

  • 7/31/2019 Business Interlink Used With XML Guide

    22/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    2 - 4 W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    where value is the URL where the merchant API is located.

    When setting the URL for the merchant API, you might have to enter a userID, password, andmachine name to access the merchantAPI. Within the MerchantURL parameter, you can setthe merchant URL as follows:

    http://:@/path_on_web_server

    For example, you might be trying to do a request to return an inbox in HTML, and have itlogon the user also. If the machine is named mach1 with the userID of user1 and password of

    passwrd1, you could set the URL for the merchantAPI as follows:

    http://user1:passwrd1@mach1/exchange/logonfrm.asp?mailbox=user1

    Cookie: Specify a Cookie

    The Cookie parameter allows you to use HTTP cookies.

    Write the tag as follows.

    Within PeopleCode, you must create a global string to store the cookie information. Beforeyou call the Business Interlink Execute method, set the Cookie parameter. After the Execute

    function, retrieve the Cookie back into the global string, using the Business Interlink property

    Cookie. The Generic Plug-in, pshttpenable, does not keep the cookie for you.

    Global String &cookie;

    &MyBi = GetInterlink(Interlink.MYBI);

    &MyBi.Cookie = &cookie;

    &Ret = &MyBi.Execute();

    &cookie = &MyBi.Cookie;

    Note: This version does not check the cookie age. Even if the cookie expires, pshttpenable willstill send the cookie out. It does not currently support the duplicate name cookie. Full support

    is scheduled for the 8.2 release.

    InDataType: Specify Input Data Type

    The InDataType parameter specifies the type of input data that is expected by the merchantAPI.

  • 7/31/2019 Business Interlink Used With XML Guide

    23/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N 2 - 5

    Write the tag as follows.

    where value is XML, HTML, DHTML, NAMEVALUEPAIR, or XMLNAMEVALUEPAIR.

    OutDataType: Specify Output Data Type

    The OutDataType parameter specifies the type of output data that is expected by the merchant

    API.

    Write the tag as follows.

    where value is either XML, HTML, or DHTML.

    XML_Validation: Check for Errors in XML Syntax

    The XML_Validation parameter causes the XML parsers to check for errors in the XML

    syntax of the XML design-time plug-in.

    Write the tag as follows.

    where value is either TRUE or FALSE.

    Input_File_Name: Debug Input Data

    Optional. The Input_File_Name parameter is a debugging tool. It points to an XML, HTML,or DHTML file containing input data. This file is sent as the request for the transaction,

    overriding the data that is defined in the XML Design-time plug-in.

    Write the tag as follows.

  • 7/31/2019 Business Interlink Used With XML Guide

    24/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    2 - 6 W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    required="false"

    default="file_name"/>

    wherefile_name is the file name and path.

    Request_File_Name: Debug Request Data

    Optional. The Request_File_Name parameter is a debugging tool. It points to a location wherethe request will be written as a text file to the specified location.

    Write the tag as follows.

    wherefile_name is the file name and path.

    Simulated_Response_File_Name: Debug Request Data

    Optional. The Simulated_Response_File_Name parameter is a debugging tool. It points to an

    XML, HTML, or DHTML file containing output data. This file is used as the response for thetransaction, overriding the response that is sent from the MerchantURL.

    Write the tag as follows.

    wherefile_name is the file name and path.

    Response_File_Name: Debug Request Data

    Optional. The Response_File_Name parameter is a debugging tool. It points to a locationwhere the response will be written as a text file to the specified location.

    Write the tag as follows.

    wherefile_name is the file name and path.

  • 7/31/2019 Business Interlink Used With XML Guide

    25/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N 2 - 7

    Metatag: Debug Request Data

    The Metatag parameter allows you to create a DOCTYPE statement if the merchant APIrequires it.

    An example of how you could write the tag follows.

    HttpHeader: Add HTTP Headers

    The HttpHeader parameter allows you to enter any HTTP headers, including custom headers.

    The word HttpHeader must be followed by a colon with no spaces in between. The old headersettings (provided only forAcceptand Content Type) are valid and supercede those set in the

    new way as long as the header names match (Content-Type and Accept, respectively). ForContent-Length, that post is determined and set at runtime by the pshttpenable runtime plug-

    in.

    Here are examples of how you could write the tag.

    Proxy-Authentication

    The Proxy-Authentication parameter allows you to set proxy authentication.

    Write the tag as follows.

    where useridis the User ID, andpasswordis the password.

  • 7/31/2019 Business Interlink Used With XML Guide

    26/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    2 - 8 W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    Proxy-Authorization

    The Proxy-Authorization parameter allows you to set proxy authorization.

    Write the tag as follows.

    where authorrequirements are the authorization requirements.

    Writing the pshttpenable Runtime Plug-in Input Parameters

    You write the input parameters to match the inputs for the transaction that is provided by themerchant.

    For more information on writing input parameters, see Write an Input Parameter for a

    Transaction .

    Writing the pshttpenable Runtime Plug-in Output Parameters

    You write the output parameters to match the outputs for the transaction that is provided bythe merchant.

    For more information on writing output parameters, see Write an Output Parameter for aTransaction .

    Writing the pshttpenable Runtime Plug-in Classes

    You can define classes to be used as data structures for the inputs or outputs.

    For more information on writing classes, see Write the Class Catalog.

    Escaping XML Restricted Characters

    Anywhere you pass in text or data in the XML Design-Time Plug-In, including theconfiguration parameters, all XML restricted characters (such as < and >) need to beescaped. For example, < must be %60, > must be%62, " must be %34.

  • 7/31/2019 Business Interlink Used With XML Guide

    27/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N 2 - 9

    Safe Characters

    Within name-value pairs, the following characters are safe characters:

    0-9

    A-Z

    a-z

    ? & (blank space)

    If the application developer uses any other characters, they must encode them for HTML.

    Example of XML Design-Time Plug-ins using pshttpenable

    This example shows an example of an XML design-time plug-in. This plug-in uses the GET

    method.

    Diagram of the Example Transaction

    Here is a diagram of the Sabre LogOn transaction resulting from the XML code in thischapter, showing the input and output structure.

    Sabre LogOn Transaction Inputs

  • 7/31/2019 Business Interlink Used With XML Guide

    28/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    2 - 1 0 W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    Sabre LogOn Transaction Outputs

    The following is the XML design-time plug-in.

    Sabre Prototype Plug-in

    1

    12/3/99

  • 7/31/2019 Business Interlink Used With XML Guide

    29/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N 2 - 1 1

    file://Httpenable.dll

  • 7/31/2019 Business Interlink Used With XML Guide

    30/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    2 - 1 2 W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

  • 7/31/2019 Business Interlink Used With XML Guide

    31/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N 2 - 1 3

  • 7/31/2019 Business Interlink Used With XML Guide

    32/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    2 - 1 4 W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    pshttpenable Runtime Plug-in: Reading an XML String

    This section defines the requirements for a generic XML design-time plug-in that is designedto read in a XML string representing data. Executing the plug-in results in a Business Interlink

    document populated with the data from the XML string. You can then use that BusinessInterlink document and its data in your PeopleCode program.

    1. Write (or use a previously written) XML design-time plug-in.

    The input in this XML design-time plug-in must consist of only one input parameter of

    string type. The output parameters in the XML design-time plug-in must fit the XML

    string that will be passed as input in the PeopleCode program.

    2. From the PeopleSoft Application Designer, open a Business Interlink using this XML

    design-time plug-in, and save it as a Business Interlink Definition. The name you save it

    under must have IMPORTXML as its first nine letters.

    3. Write a PeopleCode program that uses this Business Interlink Definition.

    This PeopleCode program has, as input, a string that is structured to fill the output

    parameters with data. Use the BIDocs method AddValue to read this input into the

    Business Interlink document, and use the BIDocs methods GetDoc and GetValue to get

    the data from the Business Interlink document.

    For more information about creating a Business Interlink Definition, see thePeopleSoft

    Business Interlink Runtime Plug-in Programming Guide, Designing a Business Interlink

    Definition. For more information about writing the PeopleCode program, see Running the

    Business Interlink Object. For more information about the BIDocs (Business Interlink

    document) methods and the Business Interlink methods, see Using the Business InterlinkObject Methods.

    Example of Design-Time Plug-in for Reading XML String

    Here is an example of an XML design-time plug-in for reading an XML string.

  • 7/31/2019 Business Interlink Used With XML Guide

    33/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N 2 - 1 5

    ImportXML Prototype Plug-in

    1

    01/28/00

    file://Httpenable.dll

  • 7/31/2019 Business Interlink Used With XML Guide

    34/312

  • 7/31/2019 Business Interlink Used With XML Guide

    35/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N 2 - 1 7

  • 7/31/2019 Business Interlink Used With XML Guide

    36/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    2 - 1 8 W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    Example of PeopleCode for Reading XML String

    This example shows the PeopleCode that corresponds to the ImportXML example. TheimportXMLString variable is a character string containing data that fills the output for the

    ImportXML design-time plug-in. If you examine the importXMLString variable in thefollowing listing, you can see that its structure matches the structure of the Example ofDesign-Time Plug-in for Reading XML String.

    For more information on writing a PeopleCode program for Business Interlinks, see the

    PeopleSoft Business Interlink Runtime Plug-in Programming Guide, Running the Business

    Interlink Object.

    Local string &importXMLString;

    Local Interlink &ImportXML;

    Local BIDocs &InputDoc, &OutputDoc;

    Local number &EXECRSLT;

    Local number &ret;

    Local BIDocs &zipdoc;

    Local BIDocs &user;

    Local string &locValue;

    Local string &userid;

    &ImportXML = GetInterlink(Interlink.IMPORTXML);

    &InputDoc = &ImportXML.GetInputDocs("");

    &importXMLString = "19719KWoolfDallasTX75240USAUS-TexasNo Preference2000-02-0135.010010411wlbond008Willing to take just about any lengthassignment.RoanokeVA24017USANoPreferenceNo Preference2000-02-1335.0100";

    /* --- XMLString is the name of the single input. ---*/

    &ret = &InputDoc.AddValue("XMLString", &importXMLString);

    &EXECRSLT = &ImportXML.Execute();

    /* The Business Interlink document is now filled with the data from the inputstring. */

    If (&EXECRSLT 1) Then

    /* The instance failed to execute */

  • 7/31/2019 Business Interlink Used With XML Guide

    37/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N 2 - 1 9

    WinMessage("Error occurred during processing BI.");

    Else

    &OutputDoc = &ImportXML.GetOutputDocs("");

    /* Extract the user data from the Business Interlink document. */

    &user = &OutputDoc.GetDoc("postreqresponse.candidates.user");

    If (&user.GetStatus() = 0) Then

    &count = &user.GetCount("user");

    &i = 1;

    /* --- user is an object_list in the ImportXML design-time */

    /* plug-in, so a loop is needed to extract its output values. */

    While (&i

  • 7/31/2019 Business Interlink Used With XML Guide

    38/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    2 - 2 0 W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

  • 7/31/2019 Business Interlink Used With XML Guide

    39/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L W R I T I N G A X M L D E S I G N - T I M E P L U G - I N U S I N G T H E P S H T T P E N A B L E R U N T I M E P L U G - I N 2 - 2 1

  • 7/31/2019 Business Interlink Used With XML Guide

    40/312

  • 7/31/2019 Business Interlink Used With XML Guide

    41/312

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K 3 - 1

    C H A P T E R 3

    Creating an Inbound Business Interlink

    This section lays out the steps you follow to create an Inbound Business Interlink. AnInbound Business Interlink allows an IScript function (PeopleCode program) to receive anXML request via HTTP from a third party system, and send an XML response to the third

    party system.

    Requirements to determine if Inbound Business Interlink suits your

    needsIf you want to send your XML request to PeopleSoft, and receive XML responses, your

    transactions must be:

    Sessionless.

    Synchronized.

    Over the internet (HTTP).

    Setting up the configuration.properties File for Inbound BusinessInterlinks

    In order to use Inbound Business Interlinks, you must set up the configuration.properties file.This file is located in the following location if you use a Weblogic web server.

    weblogic/myserver/psftdocs/piapath/configuration.properties

    This file is located in the following location if you use an Apache web server.

    Apache Group/Apache/psftdocs/piapath/configuration.properties

    Set the following line, where USER is the user ID.

    DefaultXMLLinkUSERID = USER

    Set the following line, wherePASSWORD is the password.

    DefaultXMLLinkPWD = PASSWORD

    If you are using HTTPS, and your HTTP server is using a port other than 80, then uncommentthe PortalHTTPPort setting and setPORTNUMBER equal to the HTTP Port number.

  • 7/31/2019 Business Interlink Used With XML Guide

    42/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    3 - 2 C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    PortalHTTPPort = PORTNUMBER

    If you are using HTTPS, and your HTTPS server is using a port other than 443, thenuncomment the PortalHTTPSPort setting and setPORTNUMBER equal to the HTTPS Port

    number.

    PortalHTTPSPort = PORTNUMBER

    Set the XMLLinkUseHttpForSameServer property to true when you wish to use the httpprotocol instead of https for requests issued by the XmlLink for content hosted on the sameserver as the XmlLink servelet. In cases such as this, the request is hosted on the same server,

    so the http protocol is preferred.

    XMLLinkUseHttpForSameServer = true

    Setting up the Inbound Business Interlink Environment for anIScript Function

    To set up the environment for the IScript function (PeopleCode program) that performs

    Inbound Business Interlink functionality

    1. Open or create a record named WEBLIB_name, where name is the name that you want foryour IScript record.

    2. Within that record, select the FieldFormula field (FFo). Write your IScript function(PeopleCode program) within this field. The following shows the IScript function named

    IScript_Test, contained in the WEBLIB_test record, its TEST field containing the IScriptfunction within FieldFormula.

    IScript Function in Test Field: Field Formula

  • 7/31/2019 Business Interlink Used With XML Guide

    43/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K 3 - 3

    For more information about writing the PeopleCode program, see Writing the IScript

    Function.

    3. Register the IScript function by service name (steps 3 through 7). From your browser,

    select PeopleTools, Security, permissions and Roles, Permission Lists.

    4. Within the Permission Lists page, select the type of permission that you want from the

    Permission List listbox. For example, ALLPAGES provides the most generic

    permissions.

    Permission Lists page

    5. Within the Permission Lists page for the type of permissions you selected, click on theWeb Libraries tab to display the web libraries page.

    6. Associate a service name to the IScript function (steps 6 through 8). Click on the Editbutton next to your WEBLIB_name. If your WEBLIB_name does not appear in thispanel, add it by clicking on one of the Add buttons.

  • 7/31/2019 Business Interlink Used With XML Guide

    44/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    3 - 4 C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    Permission Lists Web Libraries

    7. Within the WebLib Permissions page, select Full Access (All) for your IScript and clickOK.

    Weblib Permissions

    8. Grant security/permission to your WEBLIB_name by repeating steps 6 and 7 for

    WEBLIB_XMLLINK.

    9. From your browser, select PeopleTools, Administration, XML Link Function Registry.

    10. Within the Utilities Use XML Link Function Registry page, enter the name you want

    for your service. Then, in the following order, select from the drop-down lists, and thenselect Save:

  • 7/31/2019 Business Interlink Used With XML Guide

    45/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K 3 - 5

    a. Record: Enter the name of the record containing your IScript function (PeopleCode

    program).

    b. Field: Enter the name of the record field.

    c. Event: Select Field Formula.

    d. Function Name: Select your IScript function name.

    XML Link Function Registry page

    Test your creation using the XMLLink tester

    Access the xmllink servlet and check if your service appears in the list. Using the browser, getthe URL http://host/servlet/xmllink/PIApath, where hostis your server name, andPIApath is

    the default path for PIA (this is usually peoplesoft8). This will provide the list of registeredservices.

    Test your set-up. For example, you can do a POST to the following URL:

    http://host/servlet/xmllink/PIApath/servicename?userid=PTDMO&pwd=PTDMO)

    where hostis your server name,PIApath is the default path for PIA (this is usuallypeoplesoft8), and PTDMO is the username, and the password. servicename is the name of theservice: in this example, that is SkillsSearch.

    You can create a Business Interlink pshttpenable design-time plug-in to send an XML requestand receive the XML response.

  • 7/31/2019 Business Interlink Used With XML Guide

    46/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    3 - 6 C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    For more information about a design-time plug-in that can be used to test the example

    provided in this documentation, see Test Example: XML Design-Time Plug-in Used with an

    Inbound Business Interlink.

    Writing the IScript Function

    The IScript function that you write performs the following tasks:

    Navigates the request XML using either the new BiDoc methods (listed at below) or

    populating data on an existing Business Interlink BiDoc using the fromXML(string)function.

    Does back-end processing to get data for the response.

    Creates the response XML using the new BiDocs methods (or populate an existing

    Business Interlink with addValue(string )).

    Allowing Passing in a GET Action Parameter When Accessing anXMLLink Service

    You can pass parameters in a GET when you access an XMLLink service by using

    name/value pairs and &runservice=yes in the URL.

    On the browser or in some other HTTP GET utililty (BI Tester etc ) set the following URL:

    http://machinename:port#/xmllink/piapath/servicename/?userid=XXX&pwd=XXX&runservice=yes&abc=xyz&def=bbb

    where &abc=xyz&def=bbb are any name-value parameter pairs you want to pass.

    In the service IScript, use PeopleCode to retrieve the parameters. For example, this functionretrieves and resends the values for the abc and def parameters.

    Function IScript_Service()

    &blob = %Request.GetContentBody();

    &value = %Request.GetParameter("abc");

    %Response.Write(&value);

    &value = %Request.GetParameter("def");

    %Response.Write(&value);

    End-Function;

  • 7/31/2019 Business Interlink Used With XML Guide

    47/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K 3 - 7

    Example of a PeopleCode Program for an Inbound Business Interlink

    Here is a PeopleCode program that performs these tasks for the Inbound Business Interlinkexample in this chapter.

    /********* Locals ****************************************/

    Local BIDocs &rootDoc, &rootInDoc;

    Local BIDocs &postreqresponse;

    Local BIDocs &error, &errorcode, &errortext;

    Local BIDocs &candidates;

    Local BIDocs &user, &conid, &username, &comments, &role, &availability, &rate,&relevancy, &hobbies;

    Local BIDocs &location, &city, &state, &zip, &country;

    Local BIDocs &desiredloc;

    Local string &xmlString;

    Local SQL &GetCandidatesSQL;

    Function IScript_Test()

    /********* BIDoc to XML Test *********/

    /*

    * This test creates an XML file by building its image

    * in a BIDoc and then calling GenXMLString to convert to XML string

    *

    */

    /************* Main *************/

    /* Receive the request object and convert to an XML string */

    &blob = %Request.GetContentBody();

    /* process the inbound xml(request)- Create a BiDoc*/

    &rootInDoc = GetBiDoc(&blob);

    /* Use BiDocs methods to extract the skills value from this XML

    request. */

    &postreqDoc = &rootInDoc.GetDoc("postreq");

    &ret = &postreqDoc.GetValue("skills", &skills);

    /*create SQL object to query the Database*/

    &GetCandidatesSQL = CreateSQL("SELECT CONID, SKILLS, USERNAME, COMMENTS,SCENERY, DENSITY, BLANK, CITY, STATE, ZIP, COUNTRY, DESIREDLOC, ROLE,

    AVAILABILITY, RATE, RELEVANCY, RATING, HOBBIES FROM PS_CANDIDATES WHERE SKILLS=:1 ORDER BY CONID", &skills);

  • 7/31/2019 Business Interlink Used With XML Guide

    48/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    3 - 8 C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    /* Create the BiDoc which will have the same structure as the XML

    response*/

    &rootDoc = GetBiDoc("");

    /* add a processing instruction (the first line in the XML

    response) */

    &ret = &rootDoc.addProcessInstruction("");

    /* create the postreqresponse tag for the XML response */

    &postreqresponse = &rootDoc.createElement("postreqresponse");

    /* create the error tag within the postreqresponse tag */

    &error = &postreqresponse.createElement("error");

    /* create the errorcode and errortext tags within the error tag

    */

    &errorcode = &error.createElement("errorcode");&ret = &errorcode.addText("1");

    &errortext = &error.createElement("errortext");

    /* create the candidates tag within the postreqresponse tag */

    &candidates = &postreqresponse.createElement("candidates");

    /* Fetch all the rows for users and create and populate the

    candidates tag with user tags and their data dynamically*/

    While (&GetCandidatesSQL.Fetch(&conidvalue, &skillsvalue, &usernamevalue,&commentsvalue, &sceneryvalue, &densityvalue, &blankvalue, &cityvalue,&statevalue, &zipvalue, &countryvalue, &desiredlocvalue, &rolevalue,&availabilityvalue, &ratevalue, &relevancyvalue, &ratingvalue, &hobbiesvalue))

    &user = &candidates.createElement("user");

    /* create the tags within the user tag to contain data */

    &conid = &user.createElement("conid");

    &ret = &conid.addText(&conidvalue);

    &username = &user.createElement("username");

    &ret = &username.addText(&usernamevalue);

    &comments = &user.createElement("comments");

    &ret = &comments.addText(&commentsvalue);

    &location = &user.createElement("location");

    /* Add some attributes to the location tag*/

    &ret = &location.addAttribute("scenery", &sceneryvalue);

    &ret = &location.addAttribute("density", &densityvalue);

    &ret = &location.addAttribute("blank", &blankvalue);

    /* Add tags and their data to the location tag */

  • 7/31/2019 Business Interlink Used With XML Guide

    49/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K 3 - 9

    &city = &location.createElement("city");

    &ret = &city.addText(&cityvalue);

    &state = &location.createElement("state");

    &ret = &state.addText(&statevalue);

    &zip = &location.createElement("zip");

    &ret = &zip.addText(&zipvalue);

    &country = &location.createElement("country");

    &ret = &country.addText(&countryvalue);

    &desiredloc = &user.createElement("desiredloc");

    &ret = &desiredloc.addText(&desiredlocvalue);

    &role = &user.createElement("role");

    &ret = &role.addText(&rolevalue);

    &availability = &user.createElement("availability");

    &ret = &availability.addText(&availabilityvalue);

    &rate = &user.createElement("rate");

    &ret = &rate.addText(&ratevalue);

    &relevancy = &user.createElement("relevancy");&ret = &relevancy.addText(&relevancyvalue);

    &rating = &user.createElement("rating");

    &ret = &rating.addText(&ratingvalue);

    /* Add a comment */

    &ret = &user.addComment("Added a new tag for hobbies");

    /* Add another tag, hobbies, to the user tag */

    &hobbies = &user.createElement("hobbies");

    &ret = &hobbies.addText(&hobbiesvalue);

    End-While;

    &GetCandidatesSQL.Close();

    /* convert the BiDoc to an XML string*/

    &xmlString = &rootDoc.GenXMLString();

    /* Send the Response Object */

    %Response.Write(&xmlString);

    End-Function;

    Listing of the XML Request

    The PeopleCode program written for the Inbound Business Interlink example expects toreceive the following XML request.

  • 7/31/2019 Business Interlink Used With XML Guide

    50/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    3 - 1 0 C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    14682

    play2win

    [email protected]

    PSFT

    35

    USA

    12-Dec-1999

    lessthan1month

    45

    Hourly

    $

    25

    30

    testing...JAVA

    Listing of the XML Response

    The PeopleCode program written for the Inbound Business Interlink example will send thefollowing XML request, assuming that the database contains Joe Blow and Jane Doe, and they

    both know Java.

    1

    0000001000

    Joe Blow

    Joe Blow comment: Goodbye!

    San Rafael

    CA

    94522

    US

    No Preference

    Database

  • 7/31/2019 Business Interlink Used With XML Guide

    51/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K 3 - 1 1

    2000-10-28

    0000000045

    10

    0

    saying goodbye

    0000001001

    Jane Doe

    Jane comment: hello!

    Concord

    NJ

    32444

    US

    South Bay

    Developer

    2000-10-31

    0000000100

    19

    2

    saying hello

    Test Example: XML Design-Time Plug-in Used with an InboundBusiness Interlink

    The following XML code is a Business Interlink XML design-time plug-in. This plug-inallows a PeopleCode application to send the XML request that is used as the InboundBusiness Interlink example, and then receive the XML response that is used by the InboundBusiness Interlink example.

    This plug-in consists of a transaction whose inputs are the XML request, and whose outputsare the XML response.

    For more information about writing this type of XML design-time plug-in, see Writing a XML

    Design-Time Plug-In using the pshttpenable Runtime Plug-In.

    For reference, here is the structure of this XML design-time plug-in.

  • 7/31/2019 Business Interlink Used With XML Guide

    52/312

  • 7/31/2019 Business Interlink Used With XML Guide

    53/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K 3 - 1 3

    Inbound Business Interlink Demo Prototype Plug-in

    1

    04/19/00

    file://pshttpenable.dll

  • 7/31/2019 Business Interlink Used With XML Guide

    54/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    3 - 1 4 C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    default=""/>

  • 7/31/2019 Business Interlink Used With XML Guide

    55/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K 3 - 1 5

    default="testing..." required="false"/>

    ! The postrequestresponse class contains the error class and the

    ! candidates class.

  • 7/31/2019 Business Interlink Used With XML Guide

    56/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    3 - 1 6 C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    required="false"/>

    !Here is the transaction containing the input/request postreq class, and theoutput/response postreqresponse class.

  • 7/31/2019 Business Interlink Used With XML Guide

    57/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K 3 - 1 7

    Using Apache or Web Logic Web Servers with Inbound BusinessInterlinks

    If you use Apache or Weblogic web servers and SSL, there will be an error when the servlet

    tries to connect to the iScript. To avoid this problem, post directly to the iScript, bypassing the

    servlet.

    Using the Inbound Business Interlink Methods and Properties

    The Inbound Business Interlink methods allow you to parse an XML request and build anXML response.

    The GetContentBody Request object method converts the request content (an XML request)

    into an XML string. You can then use this string with the GetBiDoc function to create aBiDoc structure that is the same shape and contains the same data as the XML string.

    Once you have the BiDocs structure containing the XML request, you can:

    Use the GetNode method to get one of the XML elements.

    Use the NodeType method to get the type of the node (element, processing

    instruction, comment).

    Use the NodeName property to get the name of the element.

    Use the NodeValue property to get the value of the element.

    You can also use the standard BiDocs methods (such as GetDoc, GetValue) to retrieveinformation from this BiDocs object.

    When an XML element contains attributes, the AttributeCount property gets the number ofattributes, the GetAttributeName method gets the name of an attribute, and theGetAttributeValue method gets the value of an attribute.

    To build an XML response, you can use the GetBiDocs function to create a blank BiDocsstructure. To create the XML structure within that BiDocs, use CreateElement to create an

    XML element, AddComment to add an XML comment, AddAttribute to add an attribute toan XML element, and AddProcessInstruction to add a processing instruction (the first tag ofthe XML response). Use the Inbound Business Interlink function GenXMLString to createan XML string from the BiDocs structure. You can use the Write Response object method tosend the string as an XML response.

    For more information on the Inbound Business Interlink methods and functions, see Using the

    Inbound Business Interlink Methods and Properties, GetBiDoc, and GetContentBody.

    The rest of this section describes the PeopleCode methods and functions you use with theInbound Business Interlink; they parse an XML request contained within a BiDocs object and

    build an XML response within a BiDocs object. These are all BiDocs methods.

  • 7/31/2019 Business Interlink Used With XML Guide

    58/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    3 - 1 8 C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    AddAttribute

    Syntax

    AddAttribute(attributename, attributevalue)

    Description

    The AddAttribute method adds an attribute name and its value to an XML element

    referenced by a BiDocs object.

    Parameters

    attributename String. The name of the attribute.

    attributevalue String. The value of the attribute.

    Return Value

    Number. The return status. NoError, or 0, means the method succeeded.

    For more information on the return status, see thePeopleSoft Business Interlink Application

    Developer Guide, GetStatus.

    Example

    Here is a set of XML response code.

    Here is the PeopleCode that builds it.

    Local BIDocs &rootDoc, &postreqresponse;

    Local BIDocs &candidates, &location, &user;

    Local number &ret;

    &rootDoc = GetBiDoc("");

    &ret = &rootDoc.AddProcessInstruction("");

    &postreqresponse = &rootDoc.CreateElement("postreqresponse");

    &candidates = &postreqresponse.CreateElement("candidates");

    &user = &candidates.CreateElement("user");

  • 7/31/2019 Business Interlink Used With XML Guide

    59/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K 3 - 1 9

    &location = &user.CreateElement("location");

    &ret = &location.AddAttribute("scenery", "great");

    &ret = &location.AddAttribute("density", "low");

    &ret = &location.AddAttribute("blank", "eh?");

    AddComment

    Syntax

    AddComment(comment)

    Description

    The AddComment method adds an XML comment after the beginning tag of an XMLelement referenced by a BiDoc object.

    Parameters

    comment String. The comment.

    Return Value

    Number. The return status. NoError, or 0, means the method succeeded.

    For more information on the return status, see thePeopleSoft Business Interlink Application

    Developer Guide, GetStatus.

    Example

    Here is a set of XML response code.

    1

    Here is the PeopeCode that builds it.

    Local BIDocs &rootDoc, &postreqresponse, &error, &errorcode, &errortext;

    Local string &blob;

    Local number &ret;

    &rootDoc = GetBiDoc("");

  • 7/31/2019 Business Interlink Used With XML Guide

    60/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    3 - 2 0 C R E A T I N G A N I N C O M I N G B U S I N E S S I N T E R L I N K P E O P L ES O F T P R O P R I E T A R Y A N D C O N F I D E N T I A L

    /* add a processing instruction*/

    &ret = &rootDoc.AddProcessInstruction("");

    /* create an element and add text*/

    &postreqresponse = &rootDoc.CreateElement("postreqresponse");

    &error = &postreqresponse.CreateElement("error");

    &ret = &error.AddComment("this is a comment line");

    &errorcode = &error.CreateElement("errorcode");

    &ret = &errorcode.AddText("1");

    &errortext = &error.CreateElement("errortext");

    AddProcessInstruction

    Syntax

    AddProcessInstruction(instruction)

    Description

    The AddProcessInstruction method adds an XML processing instruction to a BiDocs object.Use this method at the root level of the BiDocs object for Inbound Business Interlinks beforeyou add anything else to the BiDocs object.

    Parameters

    instruction String. The processing instruction.

    Return Value

    Number. The return status. NoError, or 0, means the method succeeded.

    For more information on the return status, see thePeopleSoft Business Interlink Application

    Developer Guide, GetStatus.

    Example

    Here is a set of XML response code.

    1

  • 7/31/2019 Business Interlink Used With XML Guide

    61/312

  • 7/31/2019 Business Interlink Used With XML Guide

    62/312

    P E O P L ES O F T B U S I N E S S I N T E R L I N K U S E D W I T H X M L G U I D E

    3 -