Professional Documents
Culture Documents
Page 2
PeopleSoft @ OXFAM
HCM & FSCM Applications
4,500+ users in 70+ countries
Working on 9.2 upgrade to FSCM
Agenda
1) What is a web service
2) What is SOAP & REST
3) What is WSDL and WADL
4) What is XML and JSON
6) Configuring PeopleTools for REST
7) What's delivered in a SYS database that works
8) How to Build a REST service
9) Testing tools
10) Security
11) Demo
12) Questions
What is a Web Service?
Method of communicating between devices over the world
wide web
Page 5
Introduction to REST
Style of doing Web Services
Page 7
What is SOAP?
SOAP Simple Object Access Protocol
SOAP Version 1.2 is a lightweight protocol intended for exchanging
structured information in a decentralized, distributed environment
Page 8
What is REST?
REST REpresentational State Transfer
Page 9
What is WSDL & WADL?
Page 10
What is XML & JSON?
Page 11
Configuring PeopleTools for REST
Set REST Target Locations in Service Configuration
Specify optional node name Target URL
Page 12
Configuring PeopleTools for REST
Page 13
Configuring PeopleTools for REST
Set default application server in Gateway Setup Properties
Check and set PeopleTools version (inc. Patch number)
Page 14
Delivered Example in SYS database
Service Operation PTLOOKUPXLAT_REST_GET
Returns XLAT values for a given Fieldname.
Handler App Package PT_IB_LOOKUPREST
An error may
occur in the
Handler code if
Earlier than
8.53.06
Page 15
PT_LOOKUPXLAT_REST_GET
http://server/PSIGW/RESTListeningConnector/PTLOOKUPXLAT_R
EST.v1/XLAT_Lookup/RUNSTATUS?fieldVal=7
Page 16
REST URI - Uniform Resource Identifier
http://myserver/orders/data.html
er feufhefherf her
hfer fherhferfher
heihfwe ew ew ew
ew ew dwe dwedew
dwe ew dewdwe
ewwe dew wewedew
weew weewdwe
ewwdewdwe ew dew
weewewweew dwe
dewdewdewdewewd
ewdewdewdewdwe
Page 17
REST URI - Uniform Resource Identifier
REST operates in a similar way to the WWW
http://myserver/operators
oprid xxxxxxxxxxxx
oprid xxxxxxxxxxxx
oprid xxxxxxxxxxxx
oprid xxxxxxxxxxxx
oprid xxxxxxxxxxxx
oprid xxxxxxxxxxxx
oprid xxxxxxxxxxxx
oprid xxxxxxxxxxxx
oprid xxxxxxxxxxxx
oprid xxxxxxxxxxxx
oprid xxxxxxxxxxxx
http://myserver/opeators/oprid=VP1
VP1 xxxxxxxxxxxxxx
Page 18
REST URI Resource Templates
http://myserver/operators
Resource name
http://myserver/operator/oprid=VP1
Resource name
RESOURCE TEMPLATES
Page 19
REST URI Resource Document
http://myserver/operators/oprid=VP1
/operators/oprid={oprid}
Template
Mapping by
element name
Page 20
How to Build a REST Web Service
1. Create Document
2. Test Document
3. Create Message
4. Create Service
5. Create Handler
6. Create Service Operation
a) Resource Template
7. Test Handler
8. Create Routings
9. Test Service Operation
10. Publish Web Service (if WADL is needed)
Using delivered image FSCM 9.2.002.
Page 21
REST Web Service Components
REST Service
Service Operation
Service Operation
Resource Definition Resource
URI Definition
Resource Template(s) Document
URI
Document Template
Template(s)
Response
DocumentMessage
Template(20
Response
Fault Message (400)
Message (200) Message
Fault Message (400) Response
Document
Handler (OnRequest)
Handler (OnRequest)
Page 22
Example REST Service
Service = OOW_OPERATOR
Service Operation = OOW_OPERATOR_GET
http://myserver/operator/vp1
Page 24
1) Document Data Types
ROOT element
Collection
Record Compound
Primitive
Page 25
1) Documents Needed
Document Template
Used to retrieve inbound URI parameters
Cannot contain COMPOUND types
Supports direct variable substitution
Request Document/Message
Only required if using POST method
Response Document
Used to construct return message to client
Page 27
1) Create Document Relational
Allows mapping of document elements to PeopleSoft records and fields.
Page 28
2) Document Tester
Page 29
2) Document Tester - XML
Page 30
2) Document Tester - JSON
Page 31
2) Document Tester - PeopleCode
Page 32
2) Document Tester Create XSD
Page 33
3) Create Message
The DOCUMENT is not enough. A message of type Document must be created.
Page 34
4) Create Service
Page 35
5) Create Handler
1. Create an Application Class that implements
PS_PT:Integration:IRequestHandler
Page 36
5) Create Handler
Page 37
5) Use Document Tester to get
PeopleCode for Handler class
Page 38
6) Create Service Operation
Page 39
6) Resource Definition
Page 40
REST URI Resource Document
http://myserver/operators/oprid=VP1
/operators/oprid={oprid}
Template
Mapping by
element name
Page 41
6) Resource Template Builder
Page 42
6) Response Definition
Page 43
6) Service Operation Security
Page 44
6) Assign Handler to Service Op
Page 45
7) Test Handler
Page 46
7) Test Handler
Page 47
8) Create Routing
Page 48
9) Test Service Operation
Page 49
10) Publish Web Service
Integration Broker > Web Services > Provide Web
Services
Only need to publish if you need the WADL document.
Page 50
Test Web Service
SOAPui friom SmartBear
www.soapui.org
PeopleTools SendMaster
%PS_HOME%\sendmaster
Page 51
REST Security
Page 52
Demonstration of REST
Jim Marion
Page 53
Any questions
Graham Smith
PeopleSoft Technical Team Leader
Oxfam GB
gsmith@oxfam.org.uk
i-like-trains.blogspot.com
Page 54