INTEGRATION OF PEOPLESOFT WITH A THIRD PARTY APPLICATION USING COMPONENT INTERFACE BASED WEB SERVICES.

PeopleSoft here, being the web service provider and a simple ASP application being the consumer of the web service.

 

Siddarth Pavanje Rajendra Pai

-1-

TABLE OF CONTENTS
1. INTRODUCTION ........................................................................................................................... 3 2. PURPOSE ........................................................................................................................................ 4 3. HOW TO PROVIDE A COMPONENT INTERFACE WEB SERVICE FROM PEOPLESOFT ..................................................................................................................................... 5 4. HOW TO CONSUME THIS WEB SERVICE IN YOUR ASP APPLICATION. ......... 12 5. THE INTEGRATION IN THE WORKS! .............................................................................. 14 6. SUMMARY AND BENEFITS .................................................................................................. 16 7. APPENDIX .................................................................................................................................... 17 7.1 THE SOFTWARE CONFIGURATION USED FOR SETTING UP THE DEMO.......................................... 17 7.2 THE ASP CODE TO CONSUME THE WEB SERVICE PROVIDED BY PEOPLESOFT ............................ 17

-2-

due to its inherent advantages (to be discussed later) and ease of use! Also. the inventory team would keep track of goods coming in/going out and the finance team would keep track of the overall budget of the company! This way. While the HR department maintained employee records. has much more options to choose from! This integration of one application with another provided the platform for faster. And after that. CI based web services in PeopleSoft. a Service Oriented Architecture gives you the flexibility to choose your components and once you have done that. Much like assembling your computer. and specifically. independent and much better business processes in the enterprise. this monopoly was broken and the consumer now. We will use web services. enterprise solutions are now moving in a whole new direction. Probably you want some of the components to be the best in their category and would not want to compromise on its quality or would simply. Introduction Why would you prefer assembling your computer over buying a completely built unit? Simple! You want the flexibility to be able to choose what components go into your computer assembly. when it was required that most of the components be bought from the same vendor to make them compatible with the other components which were bought from this vendor. it was streamlined in such a way that they appeared to be independent. the payroll team would be busy calculating the taxes to be paid by the employees. want them from a certain brand. we will discuss the advantages and the disadvantages of implementing such architecture. In a way. by Enterprise Software providers and the consumer had very little option but to either go for a product from either vendor A or vendor B. Or probably. to save on the overall cost. This is what SOA aims to achieve and in this whitepaper.NET application. this led to monopoly. we will discuss one such integration of a PeopleSoft application with a . where it is expected that the service has to be platform independent and robust. Further. web services are the way to go in this generation of the internet and World Wide Web. you simply have to plug and play it! This is unlike the older generations of enterprise solutions. and how it was achieved. let‟s see the working of the integration. These are a few of the reasons as to why someone would prefer an assembled computer over a completely built unit. Flexibility and scalability! In a similar way. you do not find use for all the components in a completely built unit and would want to forego some of the components. popularly known as SOA.1. -3- . None of the components of these products were interchangeable. though the work done by each of the teams was dependent on each other. similarly. Towards something called a Service Oriented Architecture. With the advent of SOA.

the PeopleSoft system is abstracted to the end user. Hence. by the ASP code which is trying to communicate with PeopleSoft. We will build a similar ASP page and try to see if we can enter data on the ASP page and save it into PeopleSoft tables via a component interface. An overview of the components involved in the integration. All of these authentication mechanisms are hidden from the user and are taken care of internally. -4- . He only deals with the ASP application. considering the PeopleSoft system as a „node‟. Purpose We will try to “open up” PeopleSoft to another application using a web service. which will follow. pro End User ASP Page / C# Code PS Database ASP Application PeopleSoft Component Interface PeopleSoft System Figure 1. we will be able to authenticate third party systems trying to communicate with PeopleSoft using a username/password type of authentication. in theory. A Web Service is defined by the W3C as "a software system designed to support interoperable machine-to-machine interaction over a network" In our example. Data moving into and outside of the PeopleSoft system is restricted by appropriate component and row security in PeopleSoft. Business Rules Web Services interface. we would not have to write any validations to validate data on the ASP side. with all the PeopleSoft validations firing on the data appropriately. Also. Hence. If we can achieve this. As seen in the diagram above. then it would mean that all business validations are written in PeopleSoft and the external application is just referring to this business logic without having to validate data on its own. All validations that should fire are the ones that are on the PeopleSoft side. we will make use of the location setup page in PeopleSoft. the ASP application is just an “interface” between the user and the PeopleSoft system.2. The other application must be able to insert or fetch data from PeopleSoft tables.

Now. In our case we would be using the default HRMS node PSFT_HR. Figure 2. 1. Security Configuration for the component and the web service.3. -5- . Exposing a Component Interface as a web service. into different steps. How to provide a Component Interface web service from PeopleSoft What we have to understand here is that in this scenario. lets look each of the steps in more detail. To start with. 2. PeopleSoft Integration Broker Setup Most integration broker setup configurations are the default ones that apply to all integrations involving a third party application. 3. PeopleSoft becomes a service provider and the ASP application becomes the consumer of the web service provided by PeopleSoft. 1. let‟s divide the Web Services setup in PeopleSoft. PeopleSoft Integration Broker Setup. An overview of the components involved in the integration. Make sure this is appended in the Target location URL of the Service Configuration.

Target connectors. lest you might end up with an authentication error after the WSDL (web service) is published. Also make sure you choose the correct connector. Node Authentication setup. we have chosen PSFTTARGET as our connector.Figure 3. -6- . make sure you have provided appropriate security authentications. Make sure you provide the correct authentication to this node. internally. In our case. PeopleSoft uses a node called „Anonymous‟. Also. Figure 4. As shown in the above screenshots.

Figure 5. Select the methods of the CI which you want to expose. -7- . The option to select. under the navigation PeopleTools > Integration Broker > Web Services > CI Based web services. Exposing a Component Interface as a web service CI based web services can be provided in PeopleTools 8.48 onwards.2. Select your Component Interface to expose to the ASP Application. are greyed out because the methods are already implemented. Figure 6.

Provide the web service by selecting the service operations that you want to publish. -8- . View your Service Definition and related Service Operations (Each method is exposed as a Service operation).Figure 7. Figure 8.

-9- . PeopleSoft generates a URL for the file. copy this URL and paste it into the browser. In case you are not able to view the WSDL file. Publish the generated WSDL file either to the WSDL repository or to one or more UDDI servers. You must be able to view the WSDL file. In our example we will publish it to the WSDL repository. kindly refer to Oracle Metalink for possible resolution and trouble shooting tips. Figure 10.Figure 9.

This is how the WSDL file looks like. Make sure atleast one of the permission list attached to the any one of the roles you have.Figure 11. Remember that service operations can be configured separately. . 3. when opened with a browser like Internet Explorer. gives you access to the component. Security configuration for the component and the Web Service.10 - . GETROUTINGS etc. This is because PeopleSoft uses this service internally and you would require permission to this Web Service in order to perform operations like GETSCHEMA. Also make sure that you have provided access to the IBUTILITY web service and its respective service operations. as well as the web service. GETWSDL.

Figure 13.11 - . Above is a screenshot of how to provide access to the Component Interfaces that you want to expose.Figure 12. Above is a screenshot showing how to provide access to the web services that you want to expose. .

Figure 14. .NET website. Open Visual Studio and create a new ASP. We create a new ASP project with a form and a few text boxes so that it resembles the PeopleSoft Location Setup page.4.12 - . How to consume this web service in your ASP application. The screenshots are pretty much self explanatory.

Figure 16. .13 - . When the web reference is imported. Add a web reference and point it to the URL of the WSDL generated by PeopleSoft.Figure 15. Now. use these methods to fetch or insert data into PeopleSoft. For the complete ASP code. kindly refer the appendix. you will be able to see the methods that were exposed in PeopleSoft. as methods.

When you click on “Fetch Data”.5. . status and Address of the location 55555 are fetched from the database. Go to the default URL of your ASP application. Using the Get method . we have hard coded the value of the location in our default. we are displaying the error message.14 - . In our example. just to prove our concept that all the validations that fire in PeopleSoft can be handled or captured in the ASP application. then the default values of on the Component are saved to the database. The integration in the works! Let‟s see how our integration works. Figure 18. let‟s write a PeopleCode error message on the SaveEdit event of the LOCATION_TBL component. You will be able to see something like this: Figure 17. When you click on “Insert Data”. Now. effective date. Depending on the status returned by the method. Using the Create method. then the description.aspx and the location 55555 already exists in the location table PS_LOCATION_TBL.

15 - . . The error message that we had written in the earlier step is captured in the ASP application. Figure 20.Figure 19. We write an error message just to prove that we can capture this in the ASP application.

Because the systems exchange information via Web services. language independent XML technologies along with HTTP being used for communication between applications.6. for instance. present a user with an application to update sales. They can be accessed by humans via a Web-based client interface. A client can even combine data from multiple Web services to. The client only requires the WSDL definition to effectively exchange data with the service – and neither part needs to know how the other is implemented or in what format its underlying data is stored. Web services are also versatile by design. all of which employ the operations provided to fulfil different business objectives. is removed. Code re-use is another positive side-effect of Web services' interoperability and flexibility. will not affect the service itself. Existing investments in systems development and infrastructure can be utilized easily and combined to add additional value.16 - . shipping. some of the key ones include:  Application and data integration along with the maintenance of data sanctity  Versatility and scalability  Re-usability  Reduction in cost of operation Using web-services there is flexibility for any application interacting with any other application which is due to platform. portions of a service are simply re-used as necessary. These benefits allow organizations to integrate disparate applications and data formats with relative ease. One service might be utilized by several clients. Since Web services are based on open standards their cost is low and the associated learning curve is smaller than that of many proprietary solutions. Finally. Easy interoperability means the need to create highly customized applications for integrating data. for example. Instead of having to create a custom service for each unique requirement. and ERP systems from one unified interface – even if the systems themselves are incompatible. which can be expensive. or they can be accessed by other applications and other Web services. All these benefits add up to significant cost savings. Web services take advantage of ubiquitous protocols and the Web infrastructure that already exists in every organization. Summary and Benefits Web services provide several technological and business benefits. . a change to the sales database. so they require little if any additional technology investment.

w3. background-color: gold. 4.">Fetch the details of an already existing &nbsp.0 Transitional//EN" "http://www.7.2 The ASP code to consume the web service provided by PeopleSoft The code for your default.w3.48.dtd"> <html xmlns="http://www.aspx. PeopleTools 8.17 - .org/TR/xhtml1/DTD/xhtml1-transitional. 2. 7. to resolve any port conflicts between BEA Weblogic server (Port 80) and IIS Server (Port 7002).aspx. 3. Visual Studio 2005 Microsoft SQL Server 2005 Microsoft Internet Information Services server All this was setup on a Microsoft Windows XP platform and since all of these were setup on a single machine. --.08 with PeopleSoft HCM 9.0 and a demo database.cs" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 The software configuration used for setting up the Demo 1. height: 222px" id="TABLE1" onclick="return TABLE1_onclick()"> <tr><td colspan="2"> <strong><span style="text-decoration: underline.location in PeopleSoft_______________________________________________________________</span></stro ng></td></tr> <tr> <td align="left" style="width: 37px"> <strong>SETID</strong></td><td align="left" style="width: 164px"><asp:TextBox ID="SETID1" runat="server" Width="380px" Text = "SHARE" ReadOnly = "true" BackColor="#E0E0E0"></asp:TextBox></td> </tr> <tr> <td align="left" style="width: 37px"> <strong>LOCATION</strong></td><td align="left" style="width: 164px"><asp:TextBox ID="LOCATION1" runat="server" Width="380px" Text = "55555" BackColor="#E0E0E0"></asp:TextBox></td> </tr> <tr> .org/1999/xhtml" > <head runat="server"> <title>Create a new location in PeopleSoft</title> <script language="javascript" type="text/javascript"> </script> </head> <body> <form id="form2" runat="server"> <div> <table border="0px" cellpadding = "4px" cellspacing = "4px" style="width: 935px. both were configured to work on different ports. Appendix 7.BEGINNING of default. 5.aspx page – This is the code that renders the frontend of your ASP application.cs <%@ Page Language="C#" AutoEventWireup="true" Inherits="_Default" %> CodeFile="Default.

font-style: italic.">Create a new location in PeopleSoft____________________________________________________________________________ ________</span></strong></td></tr> <tr> <td align="left" style="width: 147px"> <strong>SETID</strong></td><td align="left" style="width: 164px"><asp:TextBox ID="SETID" runat="server" ForeColor="Black" Width="380px" ></asp:TextBox></td> </tr> <tr> <td align="left" style="width: 147px"> <strong>LOCATION</strong></td><td align="left" style="width: 164px"><asp:TextBox ID="LOCATION" runat="server" Width="380px" ></asp:TextBox></td> </tr> <tr> <td rowspan="3"></td><td align = "center" style="width: 147px"><asp:Button ID="SUBMIT" runat="server" OnClick="Button1_Click" Text="Insert Data" /></td> </tr> <tr> <td align="left" style="height: 27px"> <strong><span style="text-decoration: underline">RESPONSE FROM PEOPLESOFT</span></strong></td> </tr> <tr> <td align="left"><asp:TextBox ID="RESPONSE" runat="server" Height="69px" Width="750px" ReadOnly = "true" style="background-color: #E0E0E0. height: 34px.18 - ."> <strong>DESCRIPTION</strong></td><td align="left" style="width: 164px."><asp:TextBox ID="DESCRIPTION1" runat="server" Width="380px" ReadOnly = "true" style="font-style: italic"></asp:TextBox></td> </tr> <tr> <td align="left" style="width: 37px"> <strong>EFFDT</strong></td><td align="left" style="width: 164px"><asp:TextBox ID="EFFDT1" runat="server" Width="380px" ReadOnly = "true" style="font-style: italic"></asp:TextBox></td> </tr> <tr> <td align="left" style="width: 37px"> <strong>STATUS</strong></td><td align="left" style="width: 164px"><asp:TextBox ID="STATUS1" runat="server" Width="380px" ReadOnly = "true" style="font-style: italic"></asp:TextBox></td> </tr> <tr> <td align="left" style="width: 37px"> <strong>ADDRESS</strong></td><td align="left" style="width: 164px"><asp:TextBox ID="ADDRESS1" runat="server" Width="790px" ReadOnly = "true" Height="51px" style="font-style: italic" ></asp:TextBox></td> </tr> <tr><td style="height: 27px" colspan="2"> <strong><span style="text-decoration: underline. background-color: gold.<td style="width: 37px" rowspan="2"></td><td align = "center" style="width: 147px"><asp:Button ID="SUBMIT1" runat="server" OnClick="Button2_Click" Text="Fetch Data" /></td> </tr> <tr> <td align="left" style="height: 27px"> <strong><span style="text-decoration: underline">VALUES FETCHED BY THE GET METHOD FROM PEOPLESOFT</span></strong></td> </tr> <tr> <td align="left" style="width: 37px.aspx Below is the code for your default.cs– This is what takes care of your processing and this is where the methods exposed by the web service are ." TextMode="MultiLine" BackColor="#E0E0E0"></asp:TextBox></td> </tr> </table> </div> </form> </body> </html> --.aspx.END of default. height: 34px.

Security. LocationRqst.UI.Text = "". System. /*Create Country.HtmlControls.UI.SETID = Setid.Data. System. /*Create Response object*/ Create__CompIntfc__LOCATIONResponseTypeShape LocationResp = new Create__CompIntfc__LOCATIONResponseTypeShape(). System. --.WebControls.*/ Create__CompIntfc__LOCATIONTypeShape LocationRqst = new Create__CompIntfc__LOCATIONTypeShape().LOCATION = Location. ADDRESS1.WebParts. we are implementing only the create and the get method of LOCATION Component Interface. System.Handlers. /*Create the request object.Text.cs using using using using using using using using using using using using using using System.Text = "".Services. System.Text. System.Web. Location.Web. System.Value = LOCATION.Xml. System.UI. System.Configuration.UI.Web.Web.Services.Web. /*Assign the values from the page to the objects*/ Setid.called.Protocols.ComponentModel.aspx. Description objects*/ SETIDTypeShape Setid = new SETIDTypeShape(). EventArgs e) { /*Clear all Get Method Demo textboxes*/ DESCRIPTION1. In the example code below. STATUS1. EFFDT1. protected void Page_Load(object sender. /*Assign each object to the request object*/ LocationRqst. /*Sid test*/ CI_LOCATION LocationSrvc = new CI_LOCATION(). public partial class _Default : System. LocationWebService.Web. LOCATIONTypeShape Location = new LOCATIONTypeShape().WebControls.19 - . System. .UI. System. System.Web.BackgroundWorker backgroundWorker1.Web. EventArgs e) { } protected void Button1_Click(object sender.Text = "".Value = SETID.Page { private System.Web.BEGINNING of default.Web.Text = "".

break.Text = "SUCCESS: " + "The Location " + Location. //RESPONSE.This is name of alias we provided in PeopleSoft*/ try { LocationResp = LocationSrvc.SelectSingleNode("SOAP-ENV:Envelope/SOAPENV:Body/SOAP-ENV:Fault/detail/IBResponse/DefaultMessage". } catch (Exception ex) { //Traverse through the SOAP Message //Read the StatusCode and the MessageID //Display the Error Text message for that particular MessageID //RESPONSE.Text = LocationResp. xmlnsManager.SelectSingleNode("SOAP-ENV:Envelope/SOAPENV:Body/SOAP-ENV:Fault/detail/IBResponse/MessageID". switch (Value) { case "49": RESPONSE.LoadXml(strSoapPart).Text = "".Notice the name of the method called. xmlnsManager). (ex. xmlnsManager).Text = "<<Error Text>>". string Message = xmlMessageNode. doc. } } } protected void Button2_Click(object sender.CI_LOCATION_C(LocationRqst).detail.AddNamespace("SOAP-ENV".Message. //RESPONSE. case "54": RESPONSE.Message. XmlNamespaceManager xmlnsManager = new XmlNamespaceManager(doc. //string strSoapPart = ex. RESPONSE. XmlDocument doc = new XmlDocument().Text = ("Cannot insert null values!"). RESPONSE.Value +" was successfully inserted into PeopleSoft tables. //create a XML Node and traverse through the node to get the MessageID value XmlNode xmlMessageIDNode = doc.Substring(125.IndexOf('<')) + 1).Text = "".LastIndexOf('>') . XmlNode xmlMessageNode = doc.ToString(). break.InnerText.Message.Text = Message.20 - . string Value = xmlMessageIDNode. Description objects*/ SETIDTypeShape Setid = new .NameTable). RESPONSE. /*Create Country. string strSoapPart = ex./*call the web service. /*Create the request object. /*Sid test*/ CI_LOCATION LocationSrvc = new CI_LOCATION().org/soap/envelope/"). 852).Value + " \" and the location \" " + Location.Value + " \" already exists" ). default: //RESPONSE.InnerText.Text = ("Unknown Error!"). break.IndexOf('<').Text = "". "http://schemas.Message. EventArgs e) { /*Clear textboxes*/ SETID.*/ Get__CompIntfc__LOCATIONTypeShape LocationGetRqst = new Get__CompIntfc__LOCATIONTypeShape().Text = ("This SetID \" " + Setid.". LOCATION.xmlsoap.Message.Substring(ex.Message.Text = ex.ex.

Value. Location. ////create a XML Node and traverse through the node to get the MessageID value ////XmlNode xmlNode = doc.CI_LOCATION_G(LocationGetRqst). /*Assign the values from the page to the objects*/ Setid. //XmlNode xmlNode = doc.Text = ("Unknown Error!").DESCR_0.xmlsoap.ToString(). // break.EFF_STATUS.AddNamespace("SOAP-ENV".EFFDT. EFFDT1.EFFDT.Text = ("Cannot insert null values!").ToString().LOCATION = new LOCATIONTypeShape4(). LOCATION_TBLTypeShape1[] LocationTable.Text = value.SETID. LocationGetRqst.LastIndexOf('>') .Value = Location.Value = SETID1.Text = LocationTable[0]. // switch (value) // { // case "49": // RESPONSE.Value. try { LocationTable = LocationSrvc. //RESPONSE.Substring(125. xmlnsManager).Text.Message. // break.ToString().Message.Value + " \" already exists" ).Substring(ex.IndexOf('<').Text = LocationTable[0]. // break. //doc. //string value = xmlNode. .Value.Text = LocationTable[0].SETID = new SETIDTypeShape4(). //XmlNamespaceManager xmlnsManager = new XmlNamespaceManager(doc.org/soap/envelope/"). xmlnsManager).Message. //XmlDocument doc = new XmlDocument(). // case "54": // RESPONSE.Text = CountryResp.IndexOf('<')) + 1).SETIDTypeShape(). //string strSoapPart = ex. LOCATIONTypeShape Location = new LOCATIONTypeShape().Text = "<<Error Text>>". /*Assign each object to the request object*/ LocationGetRqst.Value = LOCATION1. // RESPONSE.notification.InnerText.Value.SelectSingleNode("SOAP-ENV:Envelope/SOAPENV:Body/SOAP-ENV:Fault/detail/IBResponse/MessageID". 852). // } // } // // RESPONSE.Message. ////string strSoapPart = ex.Text. // default: // //RESPONSE.LoadXml(strSoapPart).Value. LocationGetRqst.ex.Value. ADDRESS1. //xmlnsManager.Value.Value.Text = ("This SetID \" " + Setid.ToString().ToString().LOCATION. LocationGetRqst.NameTable).SelectSingleNode("SOAP-ENV:Envelope/SOAPENV:Body/SOAP-ENV:Fault/detail/IBResponse/DefaultMessage".Value = Setid.ToString().Text = LocationTable[0]. "http://schemas.Message.Text = LocationTable[0].ADDRESS1. } catch (Exception ex) { //Traverse through the SOAP Message //Read the StatusCode and the MessageID //Display the Error Text message for that particular MessageID //RESPONSE. DESCRIPTION1. (ex.Value + " \" and the location \" " + Location.21 - . STATUS1.

ComponentModel. } } --.notification.Text = ex. } } private void InitializeComponent() { this.BackgroundWorker().Message.cs .END of default.backgroundWorker1 = new System.Equals(1)) RESPONSE.22 - .aspx.//// if (LocationResp.Value.

Sign up to vote on this title
UsefulNot useful