This document gives a high-level overview of steps taken for integration of PeopleSoft Web services at WNS with third party applications.
Size: 5.78 MB
Language: en
Added: Sep 25, 2019
Slides: 22 pages
Slide Content
PeopleSoft Web Services Overview Huda Nizami
Agenda 01 02 03 04 05 Determine input/output parameters along with their datatype, length and format What is a PeopleSoft Web service ? Understanding Synchronous Request-Response behaviour Steps to create a PeopleSoft Web Service Testing services
What is a PeopleSoft Web service? A PeopleSoft Web service is a software service that allows multiple applications built with different technologies to communicate with each other. This provides external applications a means to get/create/update PeopleSoft data. Examples: Get data : Check if employee has access to view invoice details through Chatbot application Create data : Submit Employee Connect ticket through Chatbot application Update data : Change mobile number in personal profile through hYve app
Determine Input parameters for a service Let’s understand with an example : How do we determine Input parameters? ‘Operator Id’ and ‘Token’ are crucial for validating user, hence they are necessary in all services. ‘Unique Id’ is another important input parameter used in all services to avoid cache issues and always fetch fresh results. This can be any random alpha-numeric-character value which should always be unique for each service hit . It is not validated or processed in business logic/code. The service-specific inputs are determined on the basis of data required to get output. In the case of Employee access service, employee id is the only input required for the view APPS.WNS_CB_INV_EMP_ALLOW_VW, and we fetch it using Operator Id from the PeopleSoft “user-employee” mapping .
Determine Output parameters for a service Let’s understand with an example : How do we determine Output parameters? ‘Flag’ and ‘Message’ are important output parameters where Flag indicates success or failure of the service and Message provides further details to user. The service-specific outputs are determined on the basis of what we are trying to achieve through service. In the case of Employee access service, YES_NO parameter will show output returned by view APPS.WNS_CB_INV_EMP_ALLOW_VW .
Determine Datatype, Length and Format for Input/Output parameters Let’s understand with few examples: How do we determine datatype, length & format for the parameters? Data type for all parameters are generally chosen as “String” to ensure sanity of data and any numeric or date values are converted internally in code for processing if needed. The exception is Base64 string for file uploads, where Data type is selected as “Text” since this type does not have any length limitation. Length is determined on the basis of PeopleSoft field lengths, mostly it is kept more than the PeopleSoft field length to account for any additional characters and avoid errors. Length for parameters like Unique Id, Flag and Message are decided by the type of data we intend to send though the parameters. Format helps target application like Chatbot/hYve mobile App send input data to PeopleSoft in a consistent and uniform way .
Target Application ** Understanding Synchronous Request-Response behaviour ** Target Application can be Chatbot Application, hYve Mobile Application, etc. PeopleSoft Database Service URL + Request Message with input data Response Message with output data
Steps to create a PeopleSoft Web Service Create a “Request Document” and a “Response document” based on the input and output parameters respectively. Wrap the Request document in a “Request Message” and the Response document in a “Response Message” . Create a “ Service” . Create a “Service Operation” of type POST and include Service Operation in the Service. Attach a Permission list to POST Service Operation providing Full Access. Create an “Application Package and Class” and write business logic/code to indicate how the service should work. Attach the Request and Response messages in the POST Service Operation. Attach the Application package and class in the POST Service Operation. A Service Operation of type GET** is also created for Load Testing purpose. This is not consumed by any application, only used internally for testing. To set up GET Service Operation, follow steps 5-8 from above. ** Why not use GET Service Operation in applications? Because: GET requests are not ideal as they can be cached, can remain in the browser history, they can be bookmarked, distributed & shared and are not safe for dealing with sensitive data.
Step 1. Request and Response Documents Request Document Response Document Request JSON** Response JSON** **JSON stands for JavaScript Object Notation which is a language-independent data format derived from JavaScript.
Step 2. Request and Response Messages A Message is simply a container for a Document. Request Message Response Message
Step 3. Service REST services: There are two types of PeopleSoft services we should know about – REST and SOAP. For Chatbot and hYve Mobile app, we use REST services. It stands for REpresentational State Transfer. SOAP works with data format XML whereas REST permits many data formats including JSON format required for our applications. Also unlike SOAP, REST provides standard GET/POST operations, it is synchronous and designed for point to point communication. They are also simple, lightweight, and fast compared to SOAP. REST is more popular today with web/app developers due to it's simplicity over SOAP and other methods . Service
Step 4 & 5. Service Operation & Permission list Step 4: Service Operation Step 5: Attach permission list providing Full Access
Step 7 & 8. Messages & Application Package/class Step 7: Attach Request & Response messages to Service Operation Step 8: Attach Application package & class for business logic
Testing Web Services Web services undergo following tests : 1. Unit Testing : (by developer) 2. Load Testing : (by developer/technical team) 3. Application Testing : (by target team i.e. Mobile Application team/Chatbot application team) 4. (UAT) User Acceptance Testing : (by users)
Steps to test service in Postman: In the Postman tool, start a new tab, select service type as POST in the left-hand corner and enter service URL on the right. Below the URL bar, select “Body” keyword, then select “raw” keyword and change type to “JSON (application/ json )”. Enter Request JSON with the input data in the body section. Hit the Send button at the right-hand corner (in blue). Output (in JSON format) will show up at the bottom. Testing Web Services – Unit Testing – Page 1 Web services can be tested using Google Chrome’s Postman Extension/Add-in .
Testing Web Services – Unit Testing – Page 2 Services are tested for different scenarios with multiple sets of data .
Testing Web Services – Load Testing – Page 1 For load testing, we team up with the WNS SDG team and provide Service URLs and input data for all services. The Service URLs are generated through GET Service Operation (not POST) as it has all the input parameters in the URL itself and does not require Request JSON. GET Service URL: https:// mypsftuat.wns.com/PSIGW/RESTListeningConnector/PSFT_HR/Z_BOT_EMPINV_ALLW_SRV_OPR.v1/OPRID/u100644/1234567~TK001/uniqueidtest1 Files for all Sample counts Input File sample Summary report for Employee Access service
Browser Postman Testing Web Services – Load Testing – Page 2 GET Services can be tested using Postman tool or by directly entering in browser URL section.