PeopleSoft can provide web services based on component interfaces (CIs) and the latest versions of PeopleTools even provide wizards for creating a component interface based web service.
This wiki article goes through an example of providing such a web service for the message catalog component MESSAGE_CATALOG1.
Table of Contents
|
Creating the component interface
The first step is to create the component interface for the MESSAGE_CATALOG1 component. You should check if one already exists by opening your component and performing a find definition references in application designer.
Here's a screenshot of the MESSATE_CATALOG component interface once it has been created in application designer:
Permission list security for the component interface
The next step is to provide security to the component interface through a relevant permission list that you have. This means editing the permission list and assiging component interface security to your component interface.
Make sure that you:
- Add the component interface to the component interface tab
- Press edit and give full access to the component interface methods
- Save the changes!
Here's a screenshot of adding the component interface to the permission list:
Here's a screenshot of providing full access to the component interface methods:
CI-Based Services
The CI-Based Services component is located in:
PeopleTools > Integration Broker > Web Services > CI-Based Services
Select your component interface
First, find your component interface and select it. If you get an error stating "No component interfaces found with current search criteria." it means you have not set up security for your component interface or you don't have the access to the permission list that you set up the security for. Go back and check this.
Select your component interface and press the Review CI Status button.
Review Status
Now you need to select the component interface methods that you want service operations created for. These are essentially going to be the methods that can be accessed through the web service. In this case, the get, create and update methods have been selected.
Press the Dispay Selected Actions button to see the service and service operations to be created.
Confirm Actions
The service created will be your component interface name prefixed with CI_. Service operations will be created using the service name and suffix relating to the method and version of the service operation.
Finally press the Perform Selected Actions button to create the service and service operations.
Providing the Web Service
After creating the CI based service and service operations for each of the methods, you need to use the Provide Web Service wizard to generate the web service in PeopleSoft. This wizard:
- Creates the relevant request, response, and fault messages for your (synchronous) service operations
- Creates the WSDL (web service description language) for your service.
- Publishes your WSDL to the PeopleSoft WSDL repository (and optionally to a UDDI server)
Select the service
First search for the service you created through CI-based services. In this example, the service is called CI_MESSAGE_CATALOG. Select your service and press Next.
Select the service operations
Your service will have service operations which correspond to the relevant component interface methods you selected in CI based services. Select the relevant service operations you want to expose. Note that each will have request, response and fault messages automatically generated.
View WSDL
A WSDL file will be created for your service. You can view it during this step. For reference have a look at this example file.
Publishing options
The final step is the wizard publishes the WSDL for your web service to teh PeopleSoft WSDL repository. Optionally you can publish to a UDDI (universal description, discovery and integration) server.
Confirm Results
The final page confirms the results of creating and publishing the WSDL for your web service. Most importantly it tells you how to acces your WSDL.
Generally your WSDL will be published to the target location in your IB service configuration combined with the name of your WSDL. For example:
- Target location = http://<machine>:<port>/PSIGW/PeopleSoftServiceListeningConnector
- WSDL = CI_SERVICE.1.wsdl
Note that there is an exeption to this rule. If your default IB node points to a different gateway server than the local machine you need to include the default node at the end of the target location.
So if your default node was called PSFT_HR your target location would be:
http://<machine>:<port>/PSIGW/PeopleSoftServiceListeningConnector/PSFT_HR.
To confirm your web service is ready, navigate to the URL of your WSDL. If contents of your WSDL file is returned then everything is working. If not, see the troubleshooting section below.
See this article on testing web services with soapUI to learn how to test your web service.
Troubleshooting
The first step is to check the error messages provided in the integration broker error logs. See this article on Integration Broker Logging for more information about how to do that.
If you get an error using the default target location, try including the default node in your URL. The error message in the IB error log will look something like this and tell you that RequestingNode is a required field.
500 Internal Server Error
SOAP-ENV:ClientIBRequest:getOldInfoXMLString().
RequestingNode is a required field.Integration Broker Response2010403
If you receive the following error:
500 Internal Server Error
SOAP-ENV:ServernullIntegration Broker Response2055
Which in my case showed the following in errorLog.html
- Type: Error
- ErrorLevel: Standard Gateway Exception
- Description: null
- Exception: PeopleSoftServiceListeningConnector: GeneralFrameworkException
- Message Catalog: 158, 55
- MessageParms: ANONYMOUS
- DefaultMessage: UserName not defined in database. (158,55)
This actually means that default user ID set for the ANONYMOUS node does not exist in the database. In my case, that was PSADMIN. Changing this to a valid user (PS) resolved the issue.
Also check that the operations under the service IB_UTILITY are all active from:
- PeopleTools > Integration Broker > Services