Professional Documents
Culture Documents
XML in Peoplesoft
XML in Peoplesoft
Judi Doolittle
Sandia National Laboratories
Speaker Qualifications
Judi Doolittle, MA, OCP
Author off PeopleSoft
S f Developer's Guide
G
for
f
PeopleTools & PeopleCode
Executive Vice President IOUG
Agenda
XML Basics
Major Components of XML
SOAP
XML Publisher for PeopleSoft
Publisher Security
Flat File Layout
Tags
Agenda Continued
Basic Setup
Set p
Report Categories
D t S
Data
Source C
Creation
ti
XML Application Packages
Register the Data Source
XML Files in SQL Dev
Putting it Together
XML Basics
Basic file: 12345,
12345 John Smith
Smith, 0987
Three pieces are EMPLID, NAME, and DEPTID
Pieces of information in the flat file coma delimited
<Employees>
<Employees>
<EMPLID>12345</EMPLID>
<NAME>John Smith</NAME>
<DEPTID>0987</DEPTID>
</Employees>
</Employees>
Renaming a Tag
Example
E
l off renaming
i NAME tto ENAME
<Employees>
<Employees>
<EMPLID>12345</EMPLID>
<ENAME>John
ENAME John Smith
Smith</ENAME>
/ENAME
<DEPTID>0987</DEPTID>
</Employees>
</Employees>
SOAP
Simple Object Access Protocol
SOAP applications
pp
can be developed
p in
separate unrelated systems
These separate applications exchange
i f
information
ti
Standards: http://www.w3.org/TR/soap/
Good Training Site:
http://www.soapuser.com/basics3.html
SOAP Example
Host: www.widget.com
C t tT
Content-Type:
t t/ l charset=utf-8
text/xml:
h
t tf 8
Content-Length: 560
p
g
y
SOAPAction: http://www.widgets.com/assemblysearch
<SOAP-ENV:EnvelopeSOAP messages encoding style
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelop/
<SOAP-ENV:Body>
<m:GetAssembly xmlns:m=http://test.widgets.com>
<assemblyy_docs>K2</assembly
y_docs>
<model_number>widget_2</model_number>
</m:GetAssembly>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SOAP Response
<SOAP-ENV:Envelope
X l SOAP ENV htt // h
Xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/
l
/
/
l
/
SOAPENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/>
<SOAP-ENV:Body>
<m:GetAssemblyResponse xmlns :m=http://test.widgets.com>
<AssemblyApprove>John Smith</AssemblyApprove>
<m:GetAssemblyResponse>
</SOAP>-ENV Body>
</SOAP-ENV:Envelope>
SOAP Elements
Complex Elements
<definitions>
Related Services
<types>
yp
Allows for specification of low-level data-typing
<message>
Individual pieces of communication
<porttype>
Grouping Element
<binding>
<bi di >
Link between physical and logical model
<soap:operation>
Transmission method i.e. SMTP
<Service>
Physical location of the end-point communication
XMLP
Java based reporting platform
XML Publisher
Or XMLP
Template Formats
HTML
Excel
PDF
RTF
Tags
No Limit to the N
Number
mber of Tags Yo
You Can
Use
Create
Or Rename
Example you want to rename NAME to ENAME
<Employees>
p y
<Employees>
<EMPLID>12345</EMPLID>
<ENAME>John Smith</ENAME>
<DEPTID>0987</DEPTID>
</Employees>
</Employees>
Basic Setup
Settings are Defined in the xdo.cfg File
Example:
E
l
<config version="1.0.0" xmlns="http://xmlns.oracle.com/oxp/config/">
<properties>
<!-- System level properties -->
<property name="xslt-xdoparser">true</property>
<property name="xslt-scalable">true</property>
<property name="system-temp-dir">CACHE</property>
<property name="system-cachepage-size">50</property>
<!-- PDF compression -->
<property name="pdf
name="pdf-compression">true</property>
compression">true</property>
<!-- PDF Security -->
<!-- <property name="pdf-security">true</property> -->
<!-- <property name="pdf-open-password">user</property>
<!
name pdf open password >user</property> -->
>
<!-- <property name="pdf-permissions-password">owner</property> -->
</properties>
</config>
Basic Setup
<property
t name="system-temp"
t
t
dir">CACHE</property> this setting is the cache
of the application server
for example on my machine that is set up for
very simple location of \\PS\CACHE
More Complex Example:
[PS_HOME]/appserv/[DOMAIN_NAME]/CACHE
can also
l specify
if th
the application
li ti server or
process scheduler domain in the xdo.cfg you
need only update the JavaVM
Basic Setup
psappsrv.cfg before change:
;To pass java options to the jvm loaded via JNI, uncomment JavaVM
Options=
;and
d sett it equall to
t the
th lilistt off parameters
t
you would
ld lik
like tto use.
;The options need to be a blank space separated list of valid java options.
;;Consult your
y
JRE vendor for valid java
j
options.
p
;For example, JavaVM Options=-Xmx256m -Xms128m
JavaVM Options=-Xrs -Dxdo.ConfigFile=../xdo.cfg
New Setting:
JavaVM Options=-Xrs -Dxdo.ConfigFile=xdo.cfg
Ch
Changes will
ill nott ttake
k effect
ff t until
til you restart
t t the
th
Application Server
P
Pages
U
Used
d iin S
Setup
t
Two Pages Used in Set-up of XML Publisher in
PeopleSoft
PSXPSETUPRPTCAT -- the Report Category
Page
P
Pages
U
Used
d iin S
Setup
t
C
Continued
ti
d
Second Page in Set-up of XML Publisher in
PeopleSoft
PSXPSETUPDWNLD -- the Design Helper Page
Report Categories
R
Reportt D
Definitions
fi iti
R
Required
i d
All Templates Stored in Content Library
Including Sub-Templates
Set Row Level Security to the level of the
Component
p
Report Category ID
Description
Object Owner ID
ID Type
Security ID
Description
Read Only
Different
Diff
t Types
T
off Data
D t Sources:
S
PeopleSoft Queries
Rowsets
XML Document Objects
XML Files
XSD Files
XML D
Data
t S
Source
RowSet
Example taken from website
htt //
http://peoplesofttipster.com/2007/05/24/xml-publisher-within-peoplesoft/
l
ftti t
/2007/05/24/ l bli h
ithi
l
ft/
/*Populating the RowSet */
import PSXP_XMLGEN:*;
/*create rowsets */
&
&rs_compensation
ti C
CreateRowSet(Record.COMPENSATION);
t R S t(R
d COMPENSATION)
&rs_job CreateRowSet(Record.JOB);
/*Fill Parent */
&rs_job.Fill(where EMPLID like K0G00%);
/*Fill Child */
For &I = 1 to &rs_Job.ActiveRowCount
&row = &rs_Job.GetRow(&i);
&rs = &row.GetRowSet(Scroll.COMPENSATION);
&rs Fill(WHERE
&rs.Fill(
WHERE EMPLID = :1
:1, &row.JOB.EMPLID.Value;
&row JOB EMPLID Value;
End-For;
/*Output Files */
/*Create XSD */
psxp
p_xmlgen:RowSetDS();
g
();
&rds = create p
&myschema = &rds.GetXSDSchema(&rs_Job);
&f1 = GetFile(C:\temp\rpt01.xsd, W, %FilePath_Absolute;
&f1.WriteLine(&myschema);
&f1.Close();
import PSXP_RPTDEFNMANAGER:*;
i
import
t PSXP
PSXP_REPORTMGR:*;
REPORTMGR *
import PSXP_XMLGEN:*;
import PSXP_ENGINE:
PSXP ENGINE:*;;
R i t the
Register
th Data
D t S
Source
PeopleSoft Query
Here
H
we will
ill only
l b
be llooking
ki at populating
l i aD
Data
Source from a Query
Data Source Page
g
<Reporting Tools<XML Publisher<Setup<Data Source
R i t the
Register
th D
Data
t S
Source C
Continued
ti
d
First Setting is the Data Source Type
Which Can Be:
PSQuery
Rowset
XML Doc
XML File
Next is Description
Object Owner is Optional
This is the:
Product
Feature or
Application that Owns the Data Source
R i t the
Register
th D
Data
t S
Source C
Continued
ti
d
Registered Date/Time
Read Only
Maintained by the System
Stores the Date and Time of the Last Update
p
Active
Sets a Data Source to be Actively Chosen when Creating
the Report Definition
If InActive--You will not see it when you try to Create a
Report
Registered By
UserID
Person who First Registered the Data Source
Updated by the System to Note Last Person to Update the
Field
R i t the
Register
th D
Data
t S
Source C
Continued
ti
d
Create a Report Definition with the Query
R i t the
Register
th D
Data
t S
Source C
Continued
ti
d
Create a Report Definition with the Query
XML Fil
Files iin SQL D
Dev
Example--Putting it Together
Example--Putting it Together
Query Continued
Query Continued
Report Definition
PeopleCode Cont.
Summary
XML Basics
Major Components of XML
SOAP
XML Publisher for PeopleSoft
Publisher Security
Flat File Layout
Tags
Summary Continued
Basic Setup
Set p
Report Categories
D t S
Data
Source C
Creation
ti
XML Application Packages
Register the Data Source
XML Files in SQL Dev
Putting it Together
Questions/Comments/Discussion?
Thank You!
Judi Doolittle, jhotsin@sandia.gov