Prerequisites
Download SoapUI from http://www.soapui.org/SoapUI is an open-source web service testing application for service-oriented architectures (SOA) and representational state transfers (REST).
It's simplicity and easy to use interface allows developers and testers to quickly test PeopleSoft web services without spending too much time of learning about SoapUI.
In this example we are going to look at a delivered web service called List of Values (LOV) web service in PeopleSoft Campus Solutions (CS).
A quick overview of the List of Values Web Service
Suppose you have an online application that presents list of prompt fields to the users.The list of values retrieved by the service is used to populate drop-down list boxes or prompt fields in an external UI.
The List of Values web service (service operation SCC_GET_LOV) allows an external UI to request a list of prompt or translate values for a field name configured inside the PeopleSoft Campus Solutions database.
Also, the external UI logic can use this retrieved list of values to validate a value that a user enters in a field of the external UI.
As an example assume that you pass valid translate values for possible Phone types for the external UI to display in a Phone Type drop down list so that a valid value can be picked by a user.
The LOV request message (SCC_LOV_REQ message) accepts the following input parameters:
Record Name (required).
Field Name (required).
LOV Context (optional – defined on the List of Values Setup component).
The Get List of Values service operation (SCC_GET_LOV) is called, the external UI nominates the field name and its record for which the service should return the list of values.
So, in this example we will try to get valid phone types from the translate values from PERSONAL_PHONE and the field name PHONE_TYPE (and LOV Context is left blank purposely).
Provide the web service
To provide the web service navigate to PeopleTools > Integration Broker > Web Services > Provide Web ServiceIn order to generate WSDL (web service description language) for your service, you need to use the Provide Web Service wizard to generate the web service in PeopleSoft.
The service for the List of Values web service is SCC_LOV and the service operation is SCC_GET_LOV.
Step 1
Search for the service SCC_LOV. Select your service and press Next.Step 2
SCC_LOV service has SCC_GET_LOV service operation. Note that SCC_GET_LOV service operations will have request, response and fault messages associate with it.Step 3
A WSDL file will be generate for SCC_LOV service. You can view it during this step.Step 4
The final step is the wizard publishes the WSDL for your web service to the PeopleSoft WSDL repositStep 5
The last page will show the confirmation of your results of creating and publishing the WSDL for your web service.Note down the Generated WSDL URL which will required when you want to create the SOAPUI project.
Create a new SOAP project
Assuming you have already downloaded SoapUI, then Open up your SoapUI instance.In SoapUI, choose File > New SOAP Project (CTRL + N). Specify the project name, then enter the URL (from step 5) to the WSDL for your web service.
If the project is successfully created then in the left Navigator pane you can see your project and the SOAP Request.
Testing the Web Service
Double-click on the generated request (Request1) and that will open a new request window with a SOAP envelope.In the generated XML replace the question mark (?) between the ser:FIELDNAME tag and ser:RECORDNAME tag with PHONE_TYPE field and PERSONAL_PHONE record.
For this exercise I'm going to remove Optional sections from the XML as they need to configure for different purposes.
Now my XML request looks like this.
Once you submit this request your response will look like this. Note that all the active Phone Types (Translate values) will be displayed as a CODE/VALUE pair in the response.
Conclusion
In this post we looked at how to quickly test a delivered PeopleSoft web service, List of Values (SCC_LOV) using SoapUI.List of Values web service is related to PeopleSoft Campus Solutions and this comes handy if someone new to PeopleSoft web service to get a basic idea of how to test a web service.
feel free to send any comments or suggestion!
I think SOAP and REST are both powerful if needed to look something for complex IT solutions.Thank you so much for providing such a nice blog post about SOAP UI.
ReplyDeletePowerbi Read Soap