HEUG WebinarApril 3, 2009
Introduction to SOA with PeopleSoft
Consume a 3rd 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
AgendaAgenda
SetupSetup
All of the techniques demonstrated here require that you have Integration Broker setup and working:
Gateway
IntegrationGateway.properties file
Service Configuration Page
The GoalThe 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 ServicesWeb Services
The term “Web Services” is 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.
WSDLWSDLWeb Services Description LanguageWeb 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 ServiceSteps to Consume a Web Service
1. Test the WSDL with a browser, and with Send Master orsoapUI.
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 ServiceConsuming a Web Service
A Wizard is provided to Consume a Web Service
PeopleTools > Integration Broker > Web Services > Consume a Web Service
Consume Web Service WizardConsume Web Service Wizard
Example WSDL URL:http://www.gama-system.com/webservices/servertime.asmx?WSDL
Consume Web Service WizardConsume Web Service Wizard
The View WSDL hyperlink allows you to view the WSDL in a browser window
Examining a WSDLExamining a WSDL
Example WSDL URL:http://www.gama-system.com/webservices/servertime.asmx?WSDL
Here is the WSDL displayed in a browser:
Examining a WSDLExamining a WSDL
Consume Web Service WizardConsume Web Service Wizard
If your selected service has more than one port, you select one here:
Consume Web Service WizardConsume Web Service Wizard
Select one or more service operations here:
Consume Web Service WizardConsume 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 WizardConsume Web Service Wizard
The internal service name and default node name are automatically inserted here.
Consume Web Service WizardConsume Web Service WizardConfirm ResultsConfirm Results
Click “View Consumed Service” to view all the created definitions.
The Service DefinitionThe Service Definition
Two service operations are tied to this service definition:
The The GetDate GetDate Service OperationService Operation
Click on “Service Operation Security”
Service Operation SecurityService Operation Security
A Service Operation must be tied to at least one permission list:
The RoutingThe Routing
Looking at the generated routing for the service operation:
A Page for Testing the Web ServiceA 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 ServiceA Page for Testing the Web Service
Testing the Testing the GetTime GetTime OperationOperation
Testing the Testing the GetDateGetDate OperationOperation
Create a MessageCreate a Message--Based Web ServiceBased 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 MessageMessage--Based Web ServiceBased 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 DefinitionCreate a Request Message Definition
PeopleTools > Integration Broker > Integration Setup > Messages
Add a Schema to the Message Add a Schema to the Message DefinitionDefinition
Add a schema to the request message:
Add a Schema to the Message Add a Schema to the Message DefinitionDefinition
Add a schema to the request message:
Add a Schema to the Message Add a Schema to the Message DefinitionDefinition
Add a schema to the request message:
Add a Schema to the Message Add a Schema to the Message DefinitionDefinition
Add a schema to the request message:
Create a Response MessageCreate a Response Message
Add a Schema to the Response Add a Schema to the Response Message DefinitionMessage Definition
Add a schema to the response message:
Create the Application Package Create the Application Package for the Handlerfor the Handler
Create a new application package with one class:
Put PeopleCode in the Put PeopleCode in the Application ClassApplication Class
Create the Service DefinitionCreate the Service Definition
PeopleTools > Integration Broker > Integration Setup > Services
Create the Service OperationCreate the Service Operation
PeopleTools > Integration Broker > Integration Setup > Service Operations
Defining the Service OperationDefining the Service Operation
Defining the Service OperationDefining 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 HandlerIdentify the Handler
Create a name for the handler, and fill in the handler properties:
Handler DetailsHandler Details
The Provide Web Service WizardThe Provide Web Service Wizard
PeopleTools > Integration Broker > Web Services > Provide Web Service
The Provide Web Service WizardThe Provide Web Service Wizard
Copy the generated WSDL URL to a text document
Click this button to generate a SOAP template
Generate SOAP TemplateGenerate SOAP Template
Copy and paste the SOAP Request Message into a text document. You will need it when you test with Send Master.
Send MasterSend Master
The Send Master Utility is provided with your PeopleSoft installation
\PS_HOME\sendmaster\
Send MasterSend Master
Send MasterSend 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:
soapUIsoapUI
Open Source
Free
soapui.org
soapUIsoapUI
Create a CICreate a CI--Based Web ServiceBased 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 CICI--Based Web ServiceBased 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 CICreate a CI--Based Web ServiceBased Web Service
A page/component available to users online:
Create a CICreate a CI--Based Web ServiceBased Web Service
The Component Interface:
Create a CICreate a CI--Based Web ServiceBased Web Service
Permission List Security for the Component Interface:
Create a CICreate a CI--Based Web ServiceBased Web Service
The Component Interface Tester:
Create a CICreate a CI--Based Web ServiceBased Web Service
PeopleTools > Integration Broker > Web Services > CI-Based Services
Select the CI and click the “Review CI Status” button
Create a CICreate a CI--Based Web ServiceBased Web Service
Create operations for one or more CI methods
Create a CICreate a CI--Based Web ServiceBased Web Service
Displaying a Selected Action
This will create the service operation for the selected method(s)
Create a CICreate a CI--Based Web ServiceBased Web Service
Reviewing the Status of Service Operations for a CI
One service operation has been created
Create a CICreate a CI--Based Web ServiceBased Web Service
One service operation has been created
Create a CICreate a CI--Based Web ServiceBased Web Service
PeopleTools > Integration Broker > Web Services > Provide Web Service
This is the same wizard demonstrated earlier
Create a CICreate a CI--Based Web ServiceBased 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
QuestionsQuestions
http://training.io-consulting.com
(877) 656-6603
Sample Code:http://www.io-consulting.com/events/index.php?id=002
Top Related