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 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.
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.
Although SOAP services support the nillable
attribute, the WSDL file generated by PRPC 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" />
PRPC can process a SOAP message that contains:
<shipDate xsi:nil="true"></shipDate>
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 PRPC 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.
By default, PRPC 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 PRPC web.xml
file.
If required, you can configure PRPC 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:
CharacterEncoding
parameter from the servlet definition of PRSOAPServlet
in the web.xml
file.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.
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 PRPC application can look up the corresponding Service SOAP rule and execute the service activity.
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.
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
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
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.
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.
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.
About Service Package data instances | |
Atlas — Standard Service SOAP rules |