Skip to main content

Creating a SOAP connector

4 Tâches

20 mins

Visible par : All users Applies to: Pega Platform '25
Intermédiaire
Data Integration
Anglais

Scénario

Human Resources (HR) business partners use a legacy application to locate discount services available to employees near their home location. This application requires a longitude and latitude value to find the discount services. To help facilitate the use of this legacy application, HR business partners have asked to extend the HR Apps application functionality to identify the latitude and longitude for a given ZIP code.

Create a SOAP Integration Rule and configure a Data Page to invoke the SOAP connector:

  • Create a SOAP integration Rule to connect to a ZIP code lookup service.
  • Create an XML parse Rule to extract the latitude and longitude values from the SOAP connector response.
  • Create Application Settings to store endpoint URL, response timeout, and Authentication Profile.
  • Create and configure a Data Page to invoke the SOAP connector.

The following table provides the credentials you need to complete the exercise.

Role User name Password
Senior System Architect SSA@TGB pega123!
Note: This challenge does not have a demo video. Please refer to the Detailed Tasks for step-by-step instructions to complete the challenge.

Vous devez initier votre votre propre instance Pega pour compléter ce Défi.

L'initialisation peut prendre jusqu'à 5 minutes, donc soyez patient.

Détail des tâches

1 Create a SOAP Integration Rule to connect to a ZIP code look up service

  1. In the Pega instance for the challenge, enter the following credentials:
    1. In the User name field, enter SSA@TGB.
    2. In the Password field, enter pega123!.
  2. In Dev Studio, click Configure > Integration > Connectors > Create SOAP Integration to open the New SOAP Integration form.
  3. On the New SOAP Integration form, click Upload WSDL from URL to enable the option to connect to a URL.
  4. In the Upload WSDL from URL field, enter https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl.
  5. Click Next to proceed to the Select Operations step.
  6. Update the Endpoint URL to https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php.
  7. Clear any enabled operations check boxes and select LatLonListZipCode to enable the operation.
    Creating the SOAP connector
  8. Click Next to proceed to the Review step.
  9. In the Name field, enter LatLongLkp to provide the class name and identifier for the service.
  10. In the Parent class field, confirm that the value is TGB-Int.
  11. Confirm that the HR Apps Application Layer is selected.
  12. In the Add to Ruleset section, click Existing to enable the Ruleset name and version options.
  13. Select New Version of the HRAppsV2Int Ruleset.
    Integration layer of SOAP connector
  14. Click Create to create all the relevant Rules for the new SOAP integration.

2 Create an XML parse Rule to extract the latitude and longitude values from the SOAP connecter response

  1. On the Records Explorer, click Integration-Connectors > Connect SOAP to view a list of SOAP connector Rule instances.
  2. Filter the Service Name column to locate and open the newly created LatLonListZipCode SOAP connector.
  3. On the Service tab under Service properties, set Style and use to RPC/ literal.
  4. On the Request tab under Request parameters, verify the first Map from Key parameter field is configured with the .LatLonListZipCodeZipCodeList property. 
  5. On the Response tab, in the Response parameters section, in the Map to list, select XML Parse Rule.
  6. In the Map to key field, enter ParseLatLongResponseXML to provide a name for the new parse XML Rule.
    Response xml
  7. Click the Open icon next to ParseLatLongResponseXML field to create the Parse XML record.
  8. In the Root Element Name field, enter dwml to identify the XML root element from the service response.
  9. From the Add to Ruleset list, select HRAppsV2Int and the highest available version.
  10. Create and open the Parse XML Rule.
  11. On the Mapping tab, select dwml and click Add Element to add a new child element. 
    create-a-soap-connector-parse-xml
  12. Double-click the _new_ element to open the User Data dialog for the element.
  13. In the Node Name field, enter latLonList.
  14. In the Property field, enter or select .LatLonListZipCodeListLatLonOut.
    XML parse rule user data
    Tip: The XML Rule is now ready to parse the incoming XML response and can extract the information contained between < latLonList> and </latLonList>.
  15. Save your changes to the Parse XML Rule.
  16. Return to the LatLonListZipCode Connect SOAP Rule tab.
  17. On the Response tab, in the Response parameters section, in the Map to key field, enter or select ParseLatLongResponseXML dwml as the new value.
    response-parameters
  18. Check out and save the SOAP connector Rule.
  19. On the SOAP connector, in the warnings section, click Review/Edit to view the guardrail warnings.
    Soap rule showing guardrail warnings
    Note: The two guardrail warnings detailed above get addressed in the following section.

3 Creating Application Settings

  1. Click Create > SysAdmin > Application Settings to create an Application Settings record.
  2. In the Label field, enter Service endpoint URL.
  3. In the Owning Ruleset field, enter HRAppsV2Int.
  4. In the Add to Ruleset field, select HRAppsV2Int, and then select the highest available unlocked version of a Ruleset.
    Application Settings Record Configuration
  5. Click Create and open to open the Application Settings form.
  6. In the Category field, press the Down arrow key, and then select SOAP connector from the list.
  7. In the Value fields for 2- Development, 3 - Quality assurance4 - Staging, and 5 - Production, enter https://graphical.weather.gov:443/xml/SOAP_server/ndfdXMLserver.php.
    Application settings value types
    Note: You can edit the production level values if the specified value changes for different environments. 
  8. Save your changes to the Application Settings.
  9. Repeat steps 2-9 to create two new Application Settings with the details in the following table.
    Label Value for Production level
    Response timeout 120000
    Authentication Profile <blank>
  10. Return to the LatLonListZipCode Connect SOAP Rule tab.
  11. On the Service tab, in the Connection section, in the Service endpoint URL field, enter =D_pxGetApplicationSettingValue[OwningRuleset:HRAppsV2Int, Purpose:ServiceEndpointURL].pySettingValue.

    The data page D_pxGetApplicationSettingValue Rule requires two parameters OwningRuleset and Purpose.

  12. Repeat step 11 for the Response timeout and Authentication Profile fields using the details in the following table.
    OwningRuleset Purpose
    HRAppsV2Int ResponseTimeout
    HRAppsV2Int AuthenticationProfile
    Authentication SOAP connector
  13. Save the SOAP connector Rule to verify that the warnings are clear.

4 Create and configure a Data Page to invoke the SOAP connector

  1. In Dev Studio, click Create > Data Model > Data Page to launch the Data Page Record Configuration form.
  2. In the Label field, enter LatLongLookup.
  3. In the Apply to field, enter or select TGB-Int-LatLongLkp-ndfdXML to create the Data Page in the same context as the SOAP connector.
  4. In the Add to Ruleset list, select HRAppsV2Int and the highest available Ruleset version.
  5. Create and open the Data Page.
  6. On the Definition tab, in the Data sources section, in the Type list, select SOAP.
  7. In the Name field, enter or select LatLonListZipCode.
  8. In the Request Data Transform field, enter LatLongRequest.
  9. Click the Open icon to create a new Data Transform.
    Data page that show data sources
  10. Create and open the Data Transform.
  11. On the Definition tab, configure Step 1 with the following property values.
    Property Name Value
    Action Set
    Target .LatLonListZipCodeZipCodeList
    Relationship equal to
    Source Param.ZipCode
  12. Save your changes to the Data Transform.
  13. Return to the Edit: LatLongLookup Data Page tab.
  14. In the Data sources section, under the Request Data Transform field, click Parameters.
    Data sources in data page
  15. In the Parameters for LatLongRequest dialog box, select Pass current parameter page to enable the parameters for the Request Data Transform.
  16. Click Submit.
  17. In the Parameters tab add a new parameter that uses the following information:
    Field Value
    Name ZipCode
    Description Please enter a zip code for which you want to fetch the latitude and longitude
    Data type String
    Required Yes
    In/Out In
  18. In the Load Management tab, select Limit to a single Data Page.
  19. Save your changes to the Data Page.


Disponible dans la mission suivante :

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice