Wednesday, 27 February 2013

CI Based WebService from PeopleSoft to 3rd Party System



CI Based Web Service

In this example we will create a web service in PeopleSoft based on a component interface which will be then consumed by a third party system.

Step 1 –Create a Component in PeopleSoft System.

We have created a simple page and component based on which we will create out component interface.


Create a component interface based on this component.



Step 2 – Create Service and Service Operation based on the component interface.



Select the service operations that you want to give access to.







Now, the service operations are created for Get and Create methods.


Step 3 – Provide security to the generated service operations.
 

Click on the link Service Operation Security and assign permission list to it and give full access.

 




Step 4 – Create web service based on the above generated service.



Step 5 – View the request templates.



 



<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing/" xmlns:xsd="http://www.w3.org/2001/XMLSchema/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance/">
  <soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <wsse:Security soap:mustUnderstand="1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <wsse:UsernameToken>
        <wsse:Password>PTDMO</wsse:Password>
      </wsse:UsernameToken>
    </wsse:Security>
  </soapenv:Header>
  <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <Get__CompIntfc__DR_EMP_CI xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/M648264.V1">
      <EMPLID>XYZ</EMPLID>
    </Get__CompIntfc__DR_EMP_CI>
  </soapenv:Body>
</soapenv:Envelope>


Sample Create Request

<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing/" xmlns:xsd="http://www.w3.org/2001/XMLSchema/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance/">
  <soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <wsse:Security soap:mustUnderstand="1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <wsse:UsernameToken>
        <wsse:Password>PTDMO</wsse:Password>
      </wsse:UsernameToken>
    </wsse:Security>
  </soapenv:Header>
  <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <Create__CompIntfc__DR_EMP_CI xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/M1052695.V1">
      <EMPLID>XYZ</EMPLID>
      <NAME>XYZ</NAME>
    </Create__CompIntfc__DR_EMP_CI>
  </soapenv:Body>
</soapenv:Envelope>


Step 6 – Test the web service

Here, we are using SOAP UI tester.

Create a new project.
 

Give a project name and provide the above generated WSDL.


 


Click on Request 1 of Employee Get. Here we will get the employee name of the employee identified by tag EMPLID.



In the response message we can see the fetched employee name.


Now, access Create Operation


We will insert a new employee id 7.
 

Response Message



 


Here, we can confirm that the employee id was successfully inserted.

 

 


Wednesday, 20 February 2013

XML Publisher in PeopleSoft


XML Publisher

What is XML Publisher?

XML publisher is a reporting tool.

How does it works?

Data logic is different is separated from layout, so that the same set of data is used in different ways.



Steps
i.                     Set up XML Publisher
ii.                   Provide security
iii.                  Register data sources
iv.                 Create Templates
v.                   Create Reports and attach templates
vi.                 Run and view the reports

Setup XML Publisher
i.                     First, install the design helper from Reporting Tools àXML Publisher à Setup à Design Helper
This will help in creating rtf templates to be attached with report.



Pre requisite – jre 6.21 32 bit (minimum version)

Once the design helper is installed we can view it under the Add Ins in Word.



ii.                   Before creating any report, create a report category to provide security to the report.




For example, if we want to create compensation reports, then we can create category compensation
and assign the role / users to it that can view or run the report.


Register Data Sources
The next step is to register the data sources. Data sources are entities that will hold the logic to retrieve the data to be displayed on the report.

There are three types of data sources that are available in PeopleTools 8.51 viz. XML File, Connected Query and PS Query. Prior to 8.50 the available data sources were – PS Query, XML File, XML Docset, Rowset. Rowset and XMLDocset are deprecated now and are available only for backward compatibility.

Create Layout
Now, we will create report layout which will define how our report will look like. We can design the templates through rtf in MS Word, PDF and XSL.

Create Report
Now, we will define the report where we will attach the data source, template and output.

 Creating XML Publisher Report using PS Query through

1.      Create PS Query

We have created a simple PS Query DR_XMLPUB_QRY which prompts for an employee id and  displays the output from NAMES table.








2.       Create Data Source
Now, we will create a data source.
Navigate to Reporting Tools à XML Publisher à Data Source





Generate the Sample Data File.


Save the changes.

What ever data source we use it gets converted into xml format internally. So, best performance use the xml file as data source.

3.       Create Template

Save the above generated XML.

Now, open MS Word.

Go To Add-Ins à Data à Load XML Data



Select the above XML File and we will get the following message.



Now, we will generate the template using uploaded xml file.




  Select all the columns except @rownumber.



Here, we have select EMPLID as the field on which grouping will be done.





Enter valid column labels.



Finally the template is generated.



Save the template.



4.       Create Report

Now, we will create the report where we will attach the above create template and we will provide the output options.

Navigate to Reporting Tools à XML Publisher à Report Definition

Add a new value




Click on the Template Tab and upload the above created template.



Click the Output tab and select PDF as output.





Now, save the report.

5.       Run the Report
There are two ways to run XML Publisher report which is based on PS Query. They can be run through PIA (Query Report Viewer) as shown below or can be through PeopleCode.

a.       Through Query Report Viewer

Navigate to Reporting Tools à XML Publisher à Query Report Viewer

Open the above create report.



               Now, click on view report.



b.      Through PeopleCode
  
On the PIA, create a page with a text box and a push button.

On the FieldChange event write the following peoplecode.



Enter the employee id and click on Generate Report.






Using XML File as Data Source

Create Data Source





Create Template

Before template creation we need to have a xml file unlike case of PS Query as data source where we can generate the PIA from PIA itself.

Following is the code to generate the xml file from rowset.




We can see that under C:\temp both the xml and xsd files have been generated.



Now, create the template by uploading the above generated xml file.



Create Report

Create a new report and select XML file as data source.






Save the changes.

Run the Report

Since this a XML file based report so it can’t be viewed from Query Report Viewer as it was case with PS Query.

So, we have to write peoplecode to view the xmlp reports based on xml file as data source.



View the report on PIA.




Performance wise using XML file data source is better option. It is also helpful to easily develop reports based on parent-child relationship or to implement complex logic to fetch the data.





                

Integrating Microsoft Azure Document Intelligence Receipt Model with PeopleSoft

  Integrating Microsoft Azure Document Intelligence Receipt Model with PeopleSoft As the digital transformation wave continues to sweep acro...