Integration Broker - Part 2 - Publishing and Calling Component Interface based SOAP web services

 


This article is in continuation of a previous article "Integration Broker – Part 1 – Configuration".

Instead of recreating another set of objects for use here, we will utilize some of the objects developed in the posting "Component Interfaces – Part 1". The objects that will be utilized here from that article are:
   The records PS_AJ_TABLE_TYPES, PS_AJ_MAP_XLAT_TBL.
   The pages AJ_TABLE_TYPES, AJ_MAP_XLAT_TBL.
   The component AJ_MAP_XLAT_TBL and its registration (including Portal Registries).
   Data populated in tables PS_IBU_GROUP_INV and PS_AJ_TABLE_TYPES.
   The tested component interface AJ_MAP_XLAT_TBL_CI.

The example has been created and tested on the following software environment:
   Peoplesoft Application: FSCM 9.2
   Peoplesoft Peopletools: 8.53.02
   Peoplesoft Virtual Machine Image id: FSCMDB-85308-PI004
   Database: Oracle 11.2.0

Assumptions:
1) The objects listed above and created in posting "Component Interfaces – Part 1" (up to Component Interface) are available for reuse.
2) The Soap Client is installed on your Desktop.
3) The Integration Broker is configured correctly.

We will be logged in as VP1 so we do not have to spend too much time in security.

The major steps will be:
1) Loading sample data using SQL and On-line to review the component.
2) Creating Web Services. 
3) Providing Web Services for use by third parties.
4) Calling Web Services from SoapUI desktop.


1) Loading sample data using SQL and On-line to review the component.
Let us clear the data from table PS_AJ_MAP_XLAT_TBL and reload sample data using the following data using following SQLs.
INSERT INTO PS_AJ_MAP_XLAT_TBL VALUES ('CA90701','PAYMENT_TERMS','CIA',' ',' ','SRC CIA','ADV','PSFT ADV',SYSDATE,'AGGARWAA');
INSERT INTO PS_AJ_MAP_XLAT_TBL VALUES ('CA90701','PAYMENT_TERMS','COD',' ',' ','SRC COD','COD','PSFT COD',SYSDATE,'AGGARWAA');
INSERT INTO PS_AJ_MAP_XLAT_TBL VALUES ('CA90701','PAYMENT_TERMS','DA',' ',' ','SRC DA','30day DA30','PSFT 30day DA30',SYSDATE,'AGGARWAA');
INSERT INTO PS_AJ_MAP_XLAT_TBL VALUES ('CA90701','PAYMENT_TERMS','EOM45',' ',' ','SRC EOM45','M45','PSFT M45',SYSDATE,'AGGARWAA');
INSERT INTO PS_AJ_MAP_XLAT_TBL VALUES ('CA90701','PAYMENT_TERMS','EOM75',' ',' ','SRC EOM75','M75','PSFT M75',SYSDATE,'AGGARWAA');
INSERT INTO PS_AJ_MAP_XLAT_TBL VALUES ('CA90701','PAYMENT_TERMS','LC90',' ',' ','SRC LC90','LC90','PSFT LC90',SYSDATE,'AGGARWAA');
INSERT INTO PS_AJ_MAP_XLAT_TBL VALUES ('CA90701','PAYMENT_TERMS','M45',' ',' ','SRC M45','M45','PSFT M45',SYSDATE,'AGGARWAA');
INSERT INTO PS_AJ_MAP_XLAT_TBL VALUES ('CA90701','PAYMENT_TERMS','M75',' ',' ','SRC M75','M75','PSFT M75',SYSDATE,'AGGARWAA');
INSERT INTO PS_AJ_MAP_XLAT_TBL VALUES ('CA90701','PAYMENT_TERMS','N00',' ',' ','SRC N00','N00','PSFT N00',SYSDATE,'AGGARWAA');
INSERT INTO PS_AJ_MAP_XLAT_TBL VALUES ('CA90701','PAYMENT_TERMS','N10',' ',' ','SRC N10','N30','PSFT N30',SYSDATE,'AGGARWAA');
In the PIA, navigate to the component AJ_MAP_XLAT_TBL and go to the tab Map Xlated Items.

select * from PS_AJ_MAP_XLAT_TBL WHERE IBU_GROUP = 'CA90701' AND TABLE_TYPE = 'PAYMENT_TERMS';


2) Creating Web Services.
Navigate to create Component Based Web Service.

Click on the Search button.

Select the Checkbox for the CI displayed and click on Review-CI-Status button.
On the next page, select all five actions.

Click on Display-Selected-Actions button.
Assign Aliases for five actions and an alias for the Service action.

The default version 1 will be used. Click on Perform Selected Actions button.

All five operations are created. Click on View Service Definition link.

   CI_AJ_MAP_XLAT_TBL_CI_C is for creating new rows for record PS_AJ_TABLE_TYPES
   CI_AJ_MAP_XLAT_TBL_CI_F is for searching existing rows
   CI_AJ_MAP_XLAT_TBL_CI_G is for getting existing row from record PS_AJ_TABLE_TYPES
   CI_AJ_MAP_XLAT_TBL_CI_UD is for updating existing rows for PS_AJ_TABLE_TYPES and PS_AJ_MAP_XLAT_TBL
   CI_AJ_MAP_XLAT_TBL_CI_UP is for creating new rows for record PS_AJ_MAP_XLAT_TBL


3) Providing Web Services for use by third parties.
Now that operations are created let us provide the web services for external systems. We will use a delivered activity guide. Navigate to the following page. Enter first few characters of the web service name.

Click on search button.

Click on Next button.

Check the checkbox for Use Service Alias in WSDL and click on Select All link to check all five service operations. Click on the Next button.

Click on the View WSDL link to view the WSDL.

Click return button. Click next button.

Click the Finish button.

So we have the following values to note.
Service: CI_AJ_MAP_XLAT_TBL_CI
WSDL: AJXlatsCI_WebService.1
WSDL URL: http://fscm92.ps.com:8000/PSIGW/PeopleSoftServiceListeningConnector/TOSHIBA_L755/AJXlatsCI_WebService.1.wsdl
You can copy the above WSDL URL and paste in the address bar of a new browser window to view the SOAP enabled XML file.

I got an error which. The error log could be seen at http://fscm92.ps.com:8000/PSIGW/errorLog.html
I changed the default userid from @userpass@  to VP1 for the node ANONYMOUS.

Click on the generate SOAP Template and review the Template.


4) Calling Web Services from SoapUI desktop.
Start SoapUI on your desktop. Click on File->New SOAP project. Enter the project name as AJ_XLAT_TBL and initial WSDL as
http://fscm92.ps.com:8000/PSIGW/PeopleSoftServiceListeningConnector/TOSHIBA_L755/AJXlatsCI_WebService.1.wsdl
Click on OK button.

Double click on Request1 property of AJXlatsGet operation.

In the Request section (in the middle), change the question marks for IBU_GROUP and TABLE_TYPE to ‘CA90701' and 'PAYMENT_TERMS’ respectively as shown below.

Click on the Green arrow on top left of request window to submit the request (or press Alt-Enter).
The response window on the right is showing the data found.

Let us have a look at the online data before we make any updates.

We will update the data for the existing row #10 where Map-From_Value is N10. We will use the Service Operation AJXlatsUpdateData. Let us change the Description_From from ‘SRC N10’ to ‘UPD SRC N10’. We will keep to_value as N30 and leave Description_to as ? and comment out other fields as shown below.

Note that we have retyped the existing value for TABLE_NAME tag.
   <m96:TABLE_NAME>Payment Terms Translation</m96:TABLE_NAME> Note we did not change the default value for TO_VALUE tag.
   <m96:TO_VALUE>?</m96:TO_VALUE> Submit the request. The response looks like the following.

Let us have a look at the online data after this Web Service operation.

We see that the Description_from is updated.  Note that we commented Subdetail1, Subdetail2, DESCR_TO, LASTUPDDTTM and LASTUPDOPRID so they are not updated. While we left TO_VALUE uncommented like <m96:TO_VALUE>?</m96:TO_VALUE>  so it got updated to ‘?’. Anything left uncommented will be considered to be updated.
We will update data for adding a row #11 at level 1. We will use the Service Operation AJXlatsUpdate. Let us specify the fields as shown below.

Submit the request. The response looks like the following.

Let us have a look at the online data again.

The data is added for the MAP_FROM_VALUE ‘N11’.

That is it for CI based SOAP Web Services.

Comments