Skip to main content
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.
LinkedIn
Copied!

Table of Contents

How to build SOAP services based on an XML Schema Definition

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-SOAP Service Type and click Show Service Methods.
    Methods
  2. On the Deployment tab, select the WSDL Deployment 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> ...
Suggest Edit
Did you find this content helpful?

0% found this useful

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

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

Pega Community 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
Contact us