Consuming Services

This chapter discuses how to:

Click to jump to parent topicUnderstanding Consuming Services

PeopleSoft Integration Broker can consume external services by way of consuming WSDL documents and generates PeopleSoft integration metadata, so that PeopleSoft applications can invoke outbound synchronous and outbound asynchronous services.

PeopleSoft Integration Broker features a Consume Web Service wizard that steps you through the task of consuming WSDL documents.

Click to jump to parent topicUnderstanding the Consume Web Service Wizard

This section discusses the Consume Web Service wizard.

Click to jump to top of pageClick to jump to parent topicConsume Web Service Wizard Features

The Consume Web Service wizard supports:

Click to jump to top of pageClick to jump to parent topicOperation Types Supported

You can consume WSDL documents for the following service operation types:

Click to jump to top of pageClick to jump to parent topicSources for Consuming WSDL Document

You can use the Consume Web Service wizard to consume WSDL documents from the following sources:

Click to jump to top of pageClick to jump to parent topicIntegration Metadata Created by the Consume Web Service Wizard

The Consume Web Service wizard creates the following integration metadata in the PeopleSoft system from the consumed WSDL documents:

Note. The internal name is the name that the PeopleSoft system assigns to the metadata and is the definition name that appears in the PeopleSoft system.

Metadata

Internal Name

Version

Comments

Service definitions

System generated name in the format:<WSDL service name>_ <four random generated numbers>.

Version one, denoted as:

.V1

NA

Service operation definitions

System generated name in the format:<WSDL Service Operation Name>_ <four random generated numbers>.

Version one, denoted as:

.V1

NA

Message definitions

System-generated name in the format: M<unique number>.

For example: M120508438.

Version one, denoted as:

.V1

By default, the system creates document type messages.

Includes request messages, response messages. and fault messages, as appropriate.

You can rename the system-generated message names in the wizard using more meaningful names.

The consume process also generates schemas for each message. All schemas are unstructured.

If you chose not to create document type messages, it creates nonrowset-based or container messages with references to schemas.

Additional information about messages that the Consume Web Service wizard generates is featured in this section.

Document definitions

The following metadata names are system generated:

  • Package name: <Service_Naame>.

  • Document name: <WSDL_ Operation (input/output)_Message_Name>.

Version one, denoted as:

.V1

NA

Routing definitions

System-generated name in the format ~IMPORTED~<unique number>.

For example: ~IMPORTED~14857.

Version one, denoted as:

.V1

System creates a point-to-point routing.

Click to jump to top of pageClick to jump to parent topicMessages Generated

By default, the system creates document type messages based on the message schema(s). Documents generated are restricted. To modify the document, you must use the Restricted Documents page to clear the restricted status.

If the system cannot create document type messages or if you chose not to create document type messages, it creates nonrowset-based or container messages with references to schemas.

See Also

Securing Documents

PeopleSoft Documents Technology Preface

Click to jump to top of pageClick to jump to parent topicFault Messages

By default, the Consume Web Service wizard builds document type messages and will create a single fault message.

To read faults in document type messages generated by the Consume Web Service wizard, use the GetContentString() method of the Message object.

To process multiple faults, you can examine the stored WSDL generated by the wizard.

Another option to capturing and reading multiple faults is to clear the Build Document Messages option in Step 1 of the wizard so that the system generates nonrowset–based messages. If generating nonrowset-based messages, PeopleSoft Integration Broker creates a part message for each fault in the WSDL operation. The system then creates a container message and places the fault part messages in the container. The container message is assigned as a fault message to the created service operation.

Click to jump to top of pageClick to jump to parent topicMultiple Root Elements in Message Schemas

In a WSDL document, the schema defined in the <types> section may have multiple root elements, corresponding to multiple messages used by one or more operations. When the PeopleSoft system consumes such a WSDL document, the entire message schema contained in the WSDL document gets associated with each of the service operation messages when the PeopleSoft system generates the integration metadata.

Use the element name that appears in the Comments text box of the message definition to construct the XML data for the correct schema fragment in the message.

Click to jump to top of pageClick to jump to parent topicDelivered Queues and Nodes

PeopleSoft delivers a queue, WSDL_QUEUE, and a node, WSDL_NODE, that the Consume Web Service wizard uses as defaults.

You may use these objects or select other existing queues or nodes.

Click to jump to top of pageClick to jump to parent topicBinding Style of Consumed WSDL Documents

The binding style of consumed WSDL documents appears in the service operation definition for the consumed service. The Default Service Operation Version section of the Service Operations page features a Comments box. The binding style appears in that box.

Click to jump to top of pageClick to jump to parent topicWorking with Asynchronous Request/Response Service Operations

If a WSDL document has two port types with a single input message in each operation, the Consume Web Service wizard displays step where you can convert a pair of asynchronous one-way operations to a single asynchronous request/response operation. In this step you can special the request and callback service operations and convert the operation.

Click to jump to parent topicPrerequisites for Consuming Services

To consume services you must set properties in the Service Configuration component as follows:

To consume WSDL from a file, you must set the PS_FILEDIR environment variable on the machine on which the application server resides. If you do not set this variable and attempt to consume WSDL from a file, you will receive an error that the WSDL cannot be parsed.

See Setting PS_FILEDIR and PS_SERVDIR Environment Variables.

Before consuming services evaluate your security requirements.

Click to jump to parent topicCommon Elements Used in This Chapter

Description

Description of the WSDL source.

Endpoint

According to the W3C, “An association between a binding and a network address, specified by a URI, that may be used to communicate with an instance of a service.”

A URI that accepts messages containing document-oriented or procedure-oriented information.

Internal Message

Name of the consumed request message, response message or fault message in the PeopleSoft system

Internal Operation

Name of the consumed service operation in the PeopleSoft system

Internal Service

Name of the consumed service in the PeopleSoft system

Next

Click the button to advance to the next step in the wizard.

Operation Type/Operation

Type of service operation.

See Services Operation Types.

Previous

Click the button to go back to the previous step in the wizard.

Select

Check the box to select the WSDL service or WSDL operation on which to perform an action.

View WSDL

Click the link to view the WSDL document for a service from the WSDL source.

WSDL Port

According to the W3C:

  • “A port indicates a specific location for accessing a service using a specific protocol and data format.”

  • “The network address of an endpoint and the binding to which it adheres.”

WSDL Fault Message

Name of the fault message specified in the WSDL document that the PeopleSoft system is consuming.

WSDL Request Message

Name of the request message specified in the WSDL document that the PeopleSoft system is consuming.

WSDL Response Message

Name of the response message specified in the WSDL document that the PeopleSoft system is consuming.

WSDL Service

The name of the external service in the WSDL document that the PeopleSoft system is consuming.

WSDL Source

Indicates the source of the service that the PeopleSoft system is consuming.

WSDL URL

Displays the WSDL URL, WSIL URL, File name or UDDI server name of the WSDL source.

See Also

http://www.w3.org/TR/wsdl

Click to jump to parent topicUsing the Consume Web Service Wizard

This section discusses how to use the Consume Web Service wizard to:

Click to jump to top of pageClick to jump to parent topicStep 1: Select WSDL Source

Use the Select WSDL Source page (IB_WSDL_IMP_LOC) to select the source for consuming a WSDL document. The following example shows the page:

To select the WSDL source:

  1. Access the Select WSDL Source page (PeopleTools, Integration Broker, Web Services, Consume Services).

  2. Select the radio button next to one of the following values and enter the information specified:

    UDDI

    To consume a WSDL document from a UDDI repository, select theUDDI radio button.

    After you select the radio button, select the UDDI repository from the drop-down list box.

    To use this option, you must first specify the UDDI repository in the PeopleSoft system.

    See Prerequisites for Consuming Services.

    WSDL URL

    To consume a WSDL document from a WSDL URL, select the WSDL URL radio button.

    After you select the radio button, enter the URL in the WSDL URL field.

    WSIL URL

    To consume a WSDL document from a WSIL URL, select the WSIL URL radio button.

    After you select the radio button, enter a URL in the WSIL URL field.

    File

    To consume a WSDL document from a file, perform one of the following actions:

    • In the File field, enter the path and file name. For example: c:\temp\sample.wsdl.

    • Browse for the file location and name.

      1. Click the Load from File button.

        A file upload page appears.

      2. Click the Browse button to search for and select the file location and name.

      3. Click the Upload button.

        The Select WSDL Source page appears with the file location and name populated in the File field.

    Legacy WSDL (Prior to 8.48)

    Select this option to consume a PeopleSoft WSDL document generated from releases prior to PeopleTools 8.48.

  3. At the Build Document Messages box:

  4. Click the Next button to proceed to the next step in the wizard.

Click to jump to top of pageClick to jump to parent topicStep 2: Select Service

Use the Select Service page (IB_WSDL_IMP_SVC) to select the services to consume. The following example shows the page:

Before selecting services to consume, you can click the View WSDL link to view the WSDL for each service. The WSDL document opens in a browser. Close the browser when you have finished viewing the WSDL document.

WSDL documents that the PeopleSoft system consumes from pre-PeopleTools 8.48 systems display in an edit box.

To select services to consume:

  1. Check the box next to each service to consume.

    To clear a selection, check the box again.

  2. Click the Next button to proceed to the next step in the wizard.

Click to jump to top of pageClick to jump to parent topicStep 3: Select Service Ports

If a service you select has more than one port, the Select Service Ports page (IB_WSDL_IMP_SVC2) appears. The following example shows the page:

Multiple port options only appear when you are working with asynchronous request/response operations in a WSDL document or the service has multiple bindings. Typically, when working with this operation type, you select both options.

To select service ports, in the Select column, check the box next to each service.

Click to jump to top of pageClick to jump to parent topicStep 4: Select Service Operations

Use the Select Service Operations page (IB_WSDL_IMP_OPR) to select the operations in the selected service to consume. The following example shows the page:

To select service operations to consume, in the Select column, check the box next to each service operation to consume.

Click to jump to top of pageClick to jump to parent topicStep 5: Convert Asynchronous Operations

The Convert Asynchronous Operations page (IB_WSDL_IMP_ASYNOP) appears when the system detects that you are consuming two asynchronous one-way operations. The two asynchronous one-way operations appear in the Asynchronous One-Way Operations section on the page as shown in the following example:

This page enables you to convert the two operations into a single asynchronous request/response operation type.

WSDL specification 1.1 has no standards for specifying an asynchronous request/response operation. Hence, the Consume Web Service wizard is not able to automatically detect such operations in a WSDL 1.1 document.

To make this conversion, you must specify the request operation and the callback operation, using the Request Operation and Callback Operation fields on the page. The system populates the possible values to select in each field from the operation selected.

After you make the conversion the new asynchronous request/response operation appears in the Asynchronous Request/Response Operations section of the page. The following example shows the Convert Asynchronous Operations page after making such a conversion:

To convert two one-way asynchronous operations into one asynchronous request/response operation:

  1. From the Request Operation drop-down list box, select the request operation.

  2. From the Callback Operation drop-down list box, select the callback operation.

  3. Click the Convert button.

The single operation appears in the Asynchronous Request/Response Operations grid at the bottom of the page.

Clicking the minus button (-) at the end of a data row in the Asynchronous Request/Response grid undoes the conversion.

Click to jump to top of pageClick to jump to parent topicStep 6: Rename Operation Messages

The Rename Operation Messages page (IB_WSDL_IMP_MSGS) is shown in the following example:

When the system creates request, response and fault messages from the consumed service, it provides them with system-generated names. The previous example shows system-generated names appearing for all messages.

Use the page to rename the messages to more meaningful names. The following example shows all messages renamed:

To rename operation messages:

  1. Clear the system-generated name from a message name field.

  2. Enter a new name in the field.

  3. Click the Next button to proceed to the next step in the wizard.

The system checks whether the user-entered message name already exists in the database and displays an error if the name exists.

Click to jump to top of pageClick to jump to parent topicStep 7: Select a Queue for Asynchronous Operations

The Select a Queue for Asynchronous Operations page (IB_WSDL_IMP_QUEUE) appears only when you are consuming asynchronous one-way and asynchronous request/response operations. The following example shows the page:

Note. This page appears only when asynchronous operations are being consumed from the WSDL document.

Use the Select a Queue for Asynchronous Operations page to select a service operation queue for an asynchronous service operation.

PeopleSoft delivers a queue, WSDL_QUEUE, to which it assigns asynchronous service operations by default. However, you can select a different queue to use.

To select a queue for asynchronous operations:

  1. Click the Use Existing Queue radio button.

  2. From the Use Existing Queue drop-down list box, select the queue to use for the service operation.

  3. Click the Next button to proceed to the next step in the wizard.

Click to jump to top of pageClick to jump to parent topicStep 8: Select the Receiver Node

Use the Select the Receiver Node page (IB_WSDL_IMP_NODE) to select the receiving node for the service. The following example shows the page:

PeopleSoft delivers a node, WSDL_NODE, that the system uses as the receiving node by default. However, you can select a different receiving node.

If you use the Default node as the receiver node, the system adds connector property overrides to the default node in the generated service operation routing.

Note. You can apply WS-Security to services you consume using the Consume Web Service wizard. The node you select in this step determines how you implement WS-Security for these services.

See Implementing WS-Security on Services Consumed Using the Consume Web Service Wizard.

To select a receiving node for a service operation:

  1. Click the Use Existing Node radio button.

  2. From the Use Existing Node drop-down list box, select the receiving node to use for the service operation.

  3. Click the Finish button to proceed to the next step in the wizard.

Click to jump to top of pageClick to jump to parent topicConfirm and View Results

The final page in the Consume Web Service wizard is the Confirm Results page (IB_WSDL_IMP_RSLTS) shown in the following example:

The Confirm Results page provides a WSDL Import Log. The WSDL Import log provides a summary of the WSDL import and lists the integration metadata created. The following example shows the contents of the WSDL Import Log for the example shown in this chapter of consuming a service:

Created/Updated Operation : INITIATE. Created Request Message : LOANSVC_REQ_MSG. Generated schema for Message : LOANSVC_REQ_MSG Created Response Message : LOANSVC_RESP_MSG. Generated schema for Message : LOANSVC_RESP_MSG Created Fault Message : LOANSVC_FAULT_MSG. Failed to generate schema for Message : LOANSVC_FAULT_MSG Created Routing: ~IMPORTED~18003 for Operation: INITIATE Created Operation Version: V1

The Confirm Results page also features the following page elements:

View Consumed Service

Click the button to open the consumed service in the Services component.

See Accessing and Viewing Service Definitions.

Consume Another Service

Click the button to go back to step 1 of the Consume Web Service wizard and consume another service.

Click to jump to parent topicAccessing Integration Metadata for Consumed Services

After using the Consume Web Service wizard to consume a service into the PeopleSoft system, use the Service component to access, view and modify the integration metadata created.

The following example shows the service definition for the LOANSERVICE service created with the Consume Web Service wizard.

The example shows that when consuming a service, the PeopleSoft system creates active versioned service operations for all operations of the service. In addition, the system saves the consumed WSDL documents for the service operations and you can view the WSDL documents by clicking the View WSDL link.

In the Existing Operations section, click the name of the service operation to open the Service Operations component. Use the Service Operations component to view and modify service operation data and message data, add handlers, and view and modify routing definitions created by the system.

Use one of the following methods to access the Services page and access and view integration metadata for a consumed service:

See Also

Accessing and Viewing Service Definitions