Intro to SOA With PeopleSoft

64
HEUG Webinar April 3, 2009 Introduction to SOA with PeopleSoft

description

Intro to SOA With PeopleSoft

Transcript of Intro to SOA With PeopleSoft

Page 1: Intro to SOA With PeopleSoft

HEUG WebinarApril 3, 2009

Introduction to SOA with PeopleSoft

Page 2: Intro 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

Page 3: Intro to SOA With PeopleSoft

SetupSetup

All of the techniques demonstrated here require that you have Integration Broker setup and working:

Gateway

IntegrationGateway.properties file

Service Configuration Page

Page 4: Intro to SOA With PeopleSoft

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

Page 5: Intro to SOA With PeopleSoft

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.

Page 6: Intro to SOA With PeopleSoft

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.

Page 7: Intro to SOA With PeopleSoft

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.

Page 8: Intro to SOA With PeopleSoft

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

Page 9: Intro to SOA With PeopleSoft

Consume Web Service WizardConsume Web Service Wizard

Example WSDL URL:http://www.gama-system.com/webservices/servertime.asmx?WSDL

Page 10: Intro to SOA With PeopleSoft

Consume Web Service WizardConsume Web Service Wizard

The View WSDL hyperlink allows you to view the WSDL in a browser window

Page 11: Intro to SOA With PeopleSoft

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:

Page 12: Intro to SOA With PeopleSoft

Examining a WSDLExamining a WSDL

Page 13: Intro to SOA With PeopleSoft

Consume Web Service WizardConsume Web Service Wizard

If your selected service has more than one port, you select one here:

Page 14: Intro to SOA With PeopleSoft

Consume Web Service WizardConsume Web Service Wizard

Select one or more service operations here:

Page 15: Intro to SOA With PeopleSoft

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.

Page 16: Intro to SOA With PeopleSoft

Consume Web Service WizardConsume Web Service Wizard

The internal service name and default node name are automatically inserted here.

Page 17: Intro to SOA With PeopleSoft

Consume Web Service WizardConsume Web Service WizardConfirm ResultsConfirm Results

Click “View Consumed Service” to view all the created definitions.

Page 18: Intro to SOA With PeopleSoft

The Service DefinitionThe Service Definition

Two service operations are tied to this service definition:

Page 19: Intro to SOA With PeopleSoft

The The GetDate GetDate Service OperationService Operation

Click on “Service Operation Security”

Page 20: Intro to SOA With PeopleSoft

Service Operation SecurityService Operation Security

A Service Operation must be tied to at least one permission list:

Page 21: Intro to SOA With PeopleSoft

The RoutingThe Routing

Looking at the generated routing for the service operation:

Page 22: Intro to SOA With PeopleSoft

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:

Page 23: Intro to SOA With PeopleSoft

A Page for Testing the Web ServiceA Page for Testing the Web Service

Page 24: Intro to SOA With PeopleSoft

Testing the Testing the GetTime GetTime OperationOperation

Page 25: Intro to SOA With PeopleSoft

Testing the Testing the GetDateGetDate OperationOperation

Page 26: Intro to SOA With PeopleSoft

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”.

Page 27: Intro to SOA With PeopleSoft

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.

Page 28: Intro to SOA With PeopleSoft

Create a Request Message DefinitionCreate a Request Message Definition

PeopleTools > Integration Broker > Integration Setup > Messages

Page 29: Intro to SOA With PeopleSoft

Add a Schema to the Message Add a Schema to the Message DefinitionDefinition

Add a schema to the request message:

Page 30: Intro to SOA With PeopleSoft

Add a Schema to the Message Add a Schema to the Message DefinitionDefinition

Add a schema to the request message:

Page 31: Intro to SOA With PeopleSoft

Add a Schema to the Message Add a Schema to the Message DefinitionDefinition

Add a schema to the request message:

Page 32: Intro to SOA With PeopleSoft

Add a Schema to the Message Add a Schema to the Message DefinitionDefinition

Add a schema to the request message:

Page 33: Intro to SOA With PeopleSoft

Create a Response MessageCreate a Response Message

Page 34: Intro to SOA With PeopleSoft

Add a Schema to the Response Add a Schema to the Response Message DefinitionMessage Definition

Add a schema to the response message:

Page 35: Intro to SOA With PeopleSoft

Create the Application Package Create the Application Package for the Handlerfor the Handler

Create a new application package with one class:

Page 36: Intro to SOA With PeopleSoft

Put PeopleCode in the Put PeopleCode in the Application ClassApplication Class

Page 37: Intro to SOA With PeopleSoft

Create the Service DefinitionCreate the Service Definition

PeopleTools > Integration Broker > Integration Setup > Services

Page 38: Intro to SOA With PeopleSoft

Create the Service OperationCreate the Service Operation

PeopleTools > Integration Broker > Integration Setup > Service Operations

Page 39: Intro to SOA With PeopleSoft

Defining the Service OperationDefining the Service Operation

Page 40: Intro to SOA With PeopleSoft

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.

Page 41: Intro to SOA With PeopleSoft

Identify the HandlerIdentify the Handler

Create a name for the handler, and fill in the handler properties:

Page 42: Intro to SOA With PeopleSoft

Handler DetailsHandler Details

Page 43: Intro to SOA With PeopleSoft

The Provide Web Service WizardThe Provide Web Service Wizard

PeopleTools > Integration Broker > Web Services > Provide Web Service

Page 44: Intro to SOA With PeopleSoft

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

Page 45: Intro to SOA With PeopleSoft

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.

Page 46: Intro to SOA With PeopleSoft

Send MasterSend Master

The Send Master Utility is provided with your PeopleSoft installation

\PS_HOME\sendmaster\

Page 47: Intro to SOA With PeopleSoft

Send MasterSend Master

Page 48: Intro to SOA With PeopleSoft

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:

Page 49: Intro to SOA With PeopleSoft

soapUIsoapUI

Open Source

Free

soapui.org

Page 50: Intro to SOA With PeopleSoft

soapUIsoapUI

Page 51: Intro to SOA With PeopleSoft

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

Page 52: Intro to SOA With PeopleSoft

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.

Page 53: Intro to SOA With PeopleSoft

Create a CICreate a CI--Based Web ServiceBased Web Service

A page/component available to users online:

Page 54: Intro to SOA With PeopleSoft

Create a CICreate a CI--Based Web ServiceBased Web Service

The Component Interface:

Page 55: Intro to SOA With PeopleSoft

Create a CICreate a CI--Based Web ServiceBased Web Service

Permission List Security for the Component Interface:

Page 56: Intro to SOA With PeopleSoft

Create a CICreate a CI--Based Web ServiceBased Web Service

The Component Interface Tester:

Page 57: Intro to SOA With PeopleSoft

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

Page 58: Intro to SOA With PeopleSoft

Create a CICreate a CI--Based Web ServiceBased Web Service

Create operations for one or more CI methods

Page 59: Intro to SOA With PeopleSoft

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)

Page 60: Intro to SOA With PeopleSoft

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

Page 61: Intro to SOA With PeopleSoft

Create a CICreate a CI--Based Web ServiceBased Web Service

One service operation has been created

Page 62: Intro to SOA With PeopleSoft

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

Page 63: Intro to SOA With PeopleSoft

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

Page 64: Intro to SOA With PeopleSoft

QuestionsQuestions

[email protected]

http://training.io-consulting.com

(877) 656-6603

Sample Code:http://www.io-consulting.com/events/index.php?id=002