You are on page 1of 64

HEUG Webinar

April 3, 2009
Introduction to SOA with
PeopleSoft
Consume a 3
rd
party (external) Web Service
Expose a PeopleSoft Message-Based Web
Service
Expose a PeopleSoft Component Interface as a
Web Service
Examine Two Utilities for Testing SOAP
Messages:
SendMaster
soapUI
Agenda
Agenda
Setup
Setup
All of the techniques demonstrated here
require that you have Integration Broker
setup and working:
Gateway
IntegrationGateway.properties file
Service Configuration Page
The Goal
The Goal
Interact with external, non-PeopleSoft
systems using standard Web services
Utilizes the building blocks of PeopleSoft
Integration Broker (Message, Service,
Service Operation, Handler, Routing, etc.)
found in PeopleTools 8.48 and 8.49
Web Services
Web Services
The term Web Servicesis a collection of
programming technologies, including XML,
Web Services Description Language
(WSDL), and Simple Object Access
Protocol (SOAP), which allow you to build
integration solutions.
Web Services are, by definition, platform
independent.
WSDL
WSDL
Web Services Description Language
Web Services Description Language
A WSDL is an XML document that
provides information about what the
service does, the methods that are
available, their parameters, and parameter
types. It describes how to communicate
with the service in order to generate a
request to, or decipher a response from,
the service.
Steps to Consume a Web Service
Steps to Consume a Web Service
1. Test the WSDL with a browser, and with Send Master or
soapUI.
2. Paste a valid WSDL URL into the "Consume Web Service"
Wizard, and step through the wizard.
3. Examine the Service Definition and Service Operations that
are generated.
4. Apply Appropriate Service Operation Security to the Service
Operation(s).
5. Create a page, component, and content reference, and write
appropriate PeopleCode to initiate the request and consume
the response from the outside service.
Consuming a Web Service
Consuming a Web Service
A Wizard is provided to Consume a Web
Service
PeopleTools > Integration Broker > Web
Services > Consume a Web Service
Consume Web Service Wizard
Consume Web Service Wizard
Example WSDL URL:
http://www.gama-system.com/webservices/servertime.asmx?WSDL
Consume Web Service Wizard
Consume Web Service Wizard
The View WSDL hyperlink allows you to view
the WSDL in a browser window
Examining a WSDL
Examining a WSDL
Example WSDL URL:
http://www.gama-system.com/webservices/servertime.asmx?WSDL
Here is the WSDL displayed in a browser:
Examining a WSDL
Examining a WSDL
Consume Web Service Wizard
Consume Web Service Wizard
If your selected service has more than one port,
you select one here:
Consume Web Service Wizard
Consume Web Service Wizard
Select one or more service operations here:
Consume Web Service Wizard
Consume Web Service Wizard
Request and response messages are created. The internal
names of these messages can be changed to more
meaningful names.
Consume Web Service Wizard
Consume Web Service Wizard
The internal service name and default node name
are automatically inserted here.
Consume Web Service Wizard
Consume Web Service Wizard
Confirm Results
Confirm Results
Click View Consumed
Service to view all the
created definitions.
The Service Definition
The Service Definition
Two service operations are tied to this service definition:
The
The
GetDate
GetDate
Service Operation
Service Operation
Click on Service
Operation
Security
Service Operation Security
Service Operation Security
A Service Operation must be tied to at least one permission list:
The Routing
The Routing
Looking at the generated routing for the service operation:
A Page for Testing the Web Service
A Page for Testing the Web Service
In this example, the two push buttons, the text field, and the long field
are all tied to a Derived/Work record definition. PeopleCode is placed
in the FieldChange event for each pushbutton:
A Page for Testing the Web Service
A Page for Testing the Web Service
Testing the
Testing the
GetTime
GetTime
Operation
Operation
Testing the
Testing the
GetDate
GetDate
Operation
Operation
Create a Message
Create a Message
-
-
Based Web Service
Based Web Service
Expose PeopleSoft functionality to other
systems, using an Integration Broker
message.
The integration can be tested with the
Send Master utility, which is provided with
your PeopleSoft system.
You can also test using the open source
freeware program called soapUI.
Steps to Create a
Steps to Create a
Message
Message
-
-
Based Web Service
Based Web Service
1. Create Request and Response Message Definitions, with
schemas.
2. Create (or re-use) an Application Package for the Handler.
3. Create the Service Definition.
4. Create the Service Operation
5. Use the Provide Web Service Wizard to generate the
WSDL, the WSDL URL, and the SOAP template for the
request.
6. Test with Send Master or soapUI.
Create a Request Message Definition
Create a Request Message Definition
PeopleTools > Integration Broker > Integration Setup > Messages
Add a Schema to the Message
Add a Schema to the Message
Definition
Definition
Add a schema to the request message:
Add a Schema to the Message
Add a Schema to the Message
Definition
Definition
Add a schema to the request message:
Add a Schema to the Message
Add a Schema to the Message
Definition
Definition
Add a schema to the request message:
Add a Schema to the Message
Add a Schema to the Message
Definition
Definition
Add a schema to the request message:
Create a Response Message
Create a Response Message
Add a Schema to the Response
Add a Schema to the Response
Message Definition
Message Definition
Add a schema to the response message:
Create the Application Package
Create the Application Package
for the Handler
for the Handler
Create a new application package with one class:
Put PeopleCode in the
Put PeopleCode in the
Application Class
Application Class
Create the Service Definition
Create the Service Definition
PeopleTools > Integration Broker > Integration Setup > Services
Create the Service Operation
Create the Service Operation
PeopleTools > Integration Broker > Integration Setup > Service Operations
Defining the Service Operation
Defining the Service Operation
Defining the Service Operation
Defining the Service Operation
Check the Generate Any-to-Local
checkbox.
Add the Request and Response messages
at the bottom.
Grant Service Operation Security by
clicking the Service Operation Security
hyperlink, and assign the service operation
to an appropriate permission list.
Save the service operation.
Identify the Handler
Identify the Handler
Create a name for the handler, and fill in the handler properties:
Handler Details
Handler Details
The Provide Web Service Wizard
The Provide Web Service Wizard
PeopleTools > Integration Broker > Web Services > Provide Web Service
The Provide Web Service Wizard
The Provide Web Service Wizard
Copy the generated
WSDL URL to a text
document
Click this button to
generate a SOAP
template
Generate SOAP Template
Generate SOAP Template
Copy and paste
the SOAP Request
Message into a
text document.
You will need it
when you test
with Send Master.
Send Master
Send Master
The Send Master Utility is provided with
your PeopleSoft installation
\PS_HOME\sendmaster\
Send Master
Send Master
Send Master
Send Master
Make sure the Server URL is correct for your environment, and
the Service Operation and version must appear correctly in the
header as shown below:
soapUI
soapUI
Open Source
Free
soapui.org
soapUI
soapUI
Create a CI
Create a CI
-
-
Based Web Service
Based Web Service
A Component Interface is a based on a
regular component, and has the same
functionality, without the graphical
interface.
Component Interfaces have 5 standard
built-in methods: Cancel, Create, Find,
Get, and Save
Steps to Create a
Steps to Create a
CI
CI
-
-
Based Web Service
Based Web Service
1. Create a Component Interface.
2. Grant Permission List Security to this CI.
3. Test the CI Using the CI Tester Utility.
4. Use "CI-Based Services" component to generate the
Service Operation(s)
5. Use the Provide Web Service Wizard to generate the
WSDL, the WSDL URL, and the SOAP template for the
request.
6. Test with Send Master or soapUI.
Create a CI
Create a CI
-
-
Based Web Service
Based Web Service
A page/component available to users online:
Create a CI
Create a CI
-
-
Based Web Service
Based Web Service
The Component Interface:
Create a CI
Create a CI
-
-
Based Web Service
Based Web Service
Permission List Security for the Component Interface:
Create a CI
Create a CI
-
-
Based Web Service
Based Web Service
The Component Interface Tester:
Create a CI
Create a CI
-
-
Based Web Service
Based Web Service
PeopleTools > Integration Broker > Web Services > CI-Based Services
Select the CI and click the
Review CI Status button
Create a CI
Create a CI
-
-
Based Web Service
Based Web Service
Create operations for
one or more CI methods
Create a CI
Create a CI
-
-
Based Web Service
Based Web Service
Displaying a Selected Action
This will create the service
operation for the selected
method(s)
Create a CI
Create a CI
-
-
Based Web Service
Based Web Service
Reviewing the Status of Service Operations for a CI
One service operation has
been created
Create a CI
Create a CI
-
-
Based Web Service
Based Web Service
One service operation has
been created
Create a CI
Create a CI
-
-
Based Web Service
Based Web Service
PeopleTools > Integration Broker > Web Services > Provide Web Service
This is the same wizard
demonstrated earlier
Create a CI
Create a CI
-
-
Based Web Service
Based Web Service
The Handler for the Service Operation:
The handler for this
service operation is the
component interface, not
an application package.
Test the new web service WSDL using SendMaster or soapUI
Questions
Questions
tim.burns@io-consulting.com
http:/ / training.io-consulting.com
(877) 656-6603
Sample Code:
http:/ / www.io-consulting.com/ events/ index.php?id=002

You might also like