Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

How to build SOAP services based on an XML Schema Definition

Updated on September 10, 2021

Summary

SOAP services can be constructed many different ways. One way is to build a service based on your own schema, rather than on Process Commander definitions. Building a SOAP service this way enables the generated WSDL file to reference the original XML schema document (XSD).

The XML parse and stream rules that are generated upon the importing of an XSD document contain references to that XSD file, which will then be referenced by the WSDL generated for your service.

 

Suggested Approach

Building a SOAP Service from a third-party schema is a multi-step process. First, import the schema into Process Commander. Next, write a SOAP service based on the rules generated by the schema import.

Importing the third-party schema

To import a third-party schema:

  1. Import the XSD file. In the toolbar, navigate to Application > Import > XML Schema. The Connector Configuration Wizard displays.
    Select a Ruleset Name, Ruleset Version, and the class in which to save rules related to the import of the schema. Click Next > >.
    XSD Import
  2. Provide the URL of the XSD you want to import. Click Next > >.
    XSD Import
  3. Select the elements you want to generate rules for. Click Next > >.
  4. Click the Select All button to generate all five rule types. Click Next > >.
  5. Click Finish to generate all the rules.

Create the SOAP service

In the class generated by the XSD import, create a new SOAP Service. To create a new SOAP service, complete the following steps which are described below:

  • Create a new Service Package
  • Create a new SOAP Service based on the Service Package
  • Edit the previously created Service Package

To create a new Service Package:

  1. Navigate to Integration-Resources > Service Package. In the New Instance of a Rule dialog, enter a name for the service package and click Create. In this example, the name of the Service Package is Globex.
  2. On the Context tab, select the Access Group you would like to associate with this Service Package. Save the Service Package.
    Service Package

Create a new SOAP Service using the Service Package you just created.

  1. Navigate to Integration-Services > Service SOAP. Complete the New Instance of a Rule dialog.
    New Service
  2. Complete the Service tab of the SOAP Service. Complete the Page Class and Activity Name fields. Service Tab
  3. On the Request tab, make the following changes to the Request Parameters section:
  • Select the XML Literal Data type.
  • Select the XML ParseRule Map To value.
  • Select the XML ParseRule created during the XSD import process. You will need to supply both the second and third key parts.
  1. Navigate to the Response tab of the SOAP Service. In the Response Parameters section, make the following changes:
  • Select the XML Literal Data type.
  • Select the XML Stream Map To value.
  • Select the Map To Key to the XML Stream rule generated during the XSD import process.

    Save the SOAP Service.
  1. Navigate to the Service Package you created earlier. On the Methods tab, select the Rule-Service-SOAPService Type and click Show Service Methods.
    Methods
  2. On the Deployment tab, select the WSDLDeployment Type and the class that your Service rule is saved in as the Service Class. Click the Generate Deployment Files button. A WSDL file for your SOAP service has been generated. Click the link to view the WSDL file.
    WSDL

The WSDL was generated using a third-party schema. Notice the namespace and schemaLocation attributes in the <xsd:import> elements. Message components within the WSDL have also been changed to refer to the element declarations defined in the imported XSD file.

...

<types>
<xsd:schema>
<xsd:import namespace ="http://www.w3schools.com"
schemaLocation="http://10.60.61.57/xsd/note.xsd"/>
</xsd:schema>
<schema targetNamespace="urn:PegaRULES:SOAP:GlobexCorpDataNote:Services"
elementFormDefault="unqualified"
xmlns="http://www.w3.org/2001/XMLSchema">
</schema>
</types> ...
  • Previous topic XSD type and element substitution for SOAP connectors
  • Next topic How to manage changes to WSDL and XSD metadata in SOAP connectors by using RuleSet versioning

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

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.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us