More about Service SOAP rules
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 Pega Community article Building SOAP Services.
For information about testing SOAP services, see Pega Community article Testing Services and Connectors.
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.
nillable
attribute, the WSDL file
generated by
Pega 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 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 Platform may be compressed and difficult to review in Tracer and TCPMon displays. You can turn off data compression. See Tracer best practices.
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 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 Platform
web.xml
file.
If required, you can configure Pega 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:
-
Delete the
CharacterEncoding
parameter from the servlet definition ofPRSOAPServlet
in the web.xml file. -
Configure the external application that sends the SOAP requests so that it includes the
Content-Type
HTTP request header in the SOAP request, specifying the character set encoding of the message.
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 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 Pega Community article How to process a binary file with a SOAP service.
For information about how to handle attachments with SOAP connectors, 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 to the prlog4j2.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.
As an alternative to updating the prconfig.xml file, you can use dynamic system settings to configure your application. See Dynamic system settings.
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 Pega Community.