You are here: Reference > Rule types > Service SOAPs > More about Service SOAP rules

More about Service SOAP rules
 

  1. About 
  2. New 
  3. Service 
  4. Request 
  5. Response 
  6. Faults 
  7. XML Page 
  1. Advanced 
  2. Test Cases 
  3. History 
  4. More... 

After you have created all the Service SOAP rules in a package, use the service package to generate WSDL files that describe the services in the package. Then you can copy the generated WSDL files to the system on which you are developing the SOAP client and use it to create your SOAP client application.

For information about what to do next, see Building SOAP Services, a document on the Integration section of the PDN. For information about testing SOAP services, see Testing Services and Connectors, which is also on the PDN.

WSDL generation

After you have created all the Service SOAP rules in a package, open the service package data instance to create a WSDL file. You can copy this file to the client (calling) system to support deployment.

Note: Although SOAP services support the nillable attribute, the WSDL file generated by Pega 7 Platform does not include any nillable attributes. If required, edit the WSDL file to include an attribute similar to the following:

<xsd:elementname="shipDate" type="xsd:date" nillable="true" />

Pega 7 Platform can process a SOAP message that contains:

<shipDate xsi:nil="true"></shipDate>

Debugging with TCPMon

Use the Tracer to debug Service SOAP rules. A proxy server such as TCPMon — part of the Apache Axis toolkit — lets you see the content of the SOAP messages.

HTTP messages sent by Pega 7 Platform may be compressed and difficult to review in Tracer and TCPMon displays. You can turn off data compression. See Tracer — Troubleshooting.

To start TCPMon, install Axis on your workstation and create a Windows BAT file similar to the following:

set AXIS_LIB=C:\axis-1_1\lib
set CLASSPATH=%AXIS_LIB%\axis.jar
set CLASSPATH=%CLASSPATH%;%AXIS_LIB%\jaxrpc.jar
set CLASSPATH=%CLASSPATH%;%AXIS_LIB%\wsdl4j.jar
set CLASSPATH=%CLASSPATH%;%AXIS_LIB%\saaj.jar
set CLASSPATH=%CLASSPATH%;%AXIS_LIB%\commons-discovery.jar
set CLASSPATH=%CLASSPATH%;%AXIS_LIB%\commons-logging.jar
java org.apache.axis.utils.tcpmon

User instructions are available on the Apache Axis site. You can run TCPMon on any computer, and modify the SOAP client to send the SOAP request to the host and port on which TCPmon runs. After TCPMon receives the request message, it forwards the message to the endpoint that you specify to TCPMon.

Character set encoding

By default, Pega 7 Platform uses UTF-8 as the character set encoding for SOAP response messages. To change character set encoding for SOAP responses, modify the value of the CharacterEncoding parameter specified for the PRSOAPServlet servlet in the Pega 7 Platform web.xml file.

If required, you can configure Pega 7 Platform so that the encoding of the response matches the encoding of each SOAP request, no matter what it is set to. To implement this configuration, do the following:

Then, if a SOAP request provides an encoding value, the PRSOAPServlet servlet uses that character set for the response. But if the SOAP request does not specify an encoding value, PRSOAPServlet uses UTF-8.

Production

Service SOAP rules run in a background requestor that uses the PRSOAPServlet servlet. At runtime, the package, class, and method names are passed in as part of a SOAP request so that your Pega 7 Platform application can look up the corresponding Service SOAP rule and execute the service activity.

Stateful processing

When the Processing mode field on the service package is set to Stateful, the PRSOAPServlet servlet uses token passing and cookies to maintain state between client and server.

Attachments

Service SOAP rules can accept and process binary files from incoming connections. For more information, see PDN article How to process a binary file with a SOAP service.

For information about how to handle attachments with SOAP connectors in PRPC 6.2 and later, see Using attachments with SOAP, dotNet, and HTTP connectors and services

Debugging tip

To see the full text of the request and response messages, use the Set Logging Levels tool to set logging for this Java class to INFO.

com.pega.pegarules.web.PRSOAPServlet

Performance statistics

Through changes the prlogging.xml file, you can obtain performance statistics on the execution of services. See Performance tool — Statistics for services in the SERVICES-PAL log.

Through changes to the prconfig.xml file, you can be alerted to unusually long SOAP service operations. See How to detect lengthy service operations.

Tip: As an alternative to the prconfig.xml file, you can use Dynamic System Settings to configure your application.
See How to create or update a prconfig setting.

SOAP Sample

A SOAP service sample is provided to demonstrate an out-of-the-box self-contained example for application designers to configure. Sample rules are stored in the Pega-LP-Integration RuleSet under the root class PegaSample-Integration derived from the PegaSample class. Refer to the PDN.

Related Topics Link IconRelated information