The SOAP Resource Adaptor lets SLEE services receive SOAP requests as events, and initiate SOAP requests to external systems.

Topics

Configuring the SOAP Resource Adaptor

configuring the resource adaptor using profiles and properties

Running the example SOAP RA service

installing and running the example service included with the SOAP Resource Adaptor

Updating SBB security permissions

the required security permissions for SBB development

Other documentation for the SOAP Resource Adaptor including the changelog and links to the API JavaDoc and downloads, can be found on the SOAP Resource Adaptor product page.

Configuring the SOAP Resource Adaptor

Below are properties for configuring the SOAP Resource Adaptor (from the SOAP API).

Name Type Description
ListenAddress
String

Hostname or IP address to accept connections on.

ListenPort
Integer

Numeric port to accept connections on.

IncomingRequestTimeout
Long

Milliseconds to wait for an SBB to generate a response to an incoming request. If this timeout is exceeded, the SOAP RA will return a SOAP Fault to the requesting client.

IncomingIdleTimeout
Long

Milliseconds of idle time to allow on a persistant incoming connection before it is closed. Should generally be longer than the corresponding outgoing idle timeout of the peer.

MaxOutgoingConnections
Integer

Maximum number of outgoing connections to make to a single host.

OutgoingRequestTimeout
Long

Milliseconds to wait for a response from a remote server before returning an error response (SOAP fault) to the initiating SBB.

OutgoingIdleTimeout
Long

Milliseconds of idle time to allow on a persistent outgoing connection before it is closed. Should generally be shorter than the corresponding incoming idle timeout of the peer.

MaxDepth
Integer

Maximum number of outgoing requests on a single connection that may be in flight simultaneously (that is, without waiting for a response to previous requests).

QueueTimeout
Long

Maximum time in milliseconds that an outgoing request may be queued waiting for an available outgoing connection before returning an error response (SOAP fault) to the initiating SBB.

ReconnectTimeout
Long

Time in milliseconds between reconnect attempts to a failed server.

ServerName
String

The value of the Server: header to report in SOAP responses.

UserAgent
String

The value of the User-Agent: header to report in SOAP requests.

MaxContentLength
Integer

Maximum value in bytes for the Content-Length header of the encapsulating HTTP messages which have a message body. If this value is exceeded, an error response (SOAP fault) is issued.

Running the Example SOAP RA Service

Below are basic instructions for deploying and testing the SOAP example services in your SLEE.

1

Start your SLEE:

$ cd $RHINO_HOME
$ ./start-rhino.sh

2

Go to the soap-examples folder:

$ cd soap-examples

3

Check the listen.port property in build.properties

Note The listen.port specifies the port that the SOAP RA will attempt to listen on when it is activated, and the port the test client will send to. The default port is 8000. Change it if necessary for your environment.

4

To deploy the examples, use the Ant deploy target:

$ ant deploy

This deploys the SOAP Resource Adapter and example SOAP services (Ping and Request).

5

To test the Ping service, use the simple SOAP client included with the examples. To compile and run it, use the run-test-client target:

$ ant run-test-client
Note

The SOAP client
(src/com/opencloud/slee/example/soap/client/SoapClient.java):

  • reads a SOAP envelope from the file
    (src/com/opencloud/slee/example/soap/client/pingtest.xml),

  • sends the envelope to the URL represented by the SOAP RA
    (http://localhost:listening-port)

  • and prints the response received, sent by the Ping service
    (src/com/opencloud/slee/example/soap/ping/SoapPingSbb.java).

6

To test the Request service, use another SOAP client included with the examples. To activate and deactivate the service, use the run-request target and see the response on the Rhino log:

$ ant run-request
Note

The SOAP client Request service
(src/com/opencloud/slee/example/soap/request/SoapRequestSbb.java):

  • sends the same request,

  • creates a SOAP request on activation,

  • and logs the response sent back.

Updating SBB Security Permissions

To develop a SOAP service, you must add the following permissions to the the <security-permissions/> element in the sbb-jar.xml file.

Warning When using a custom javax.xml.soap implementation library, different permissions may be required for the resource adapter and SBB.

1

Allow access to Document Object Model (DOM) classes required by the SAAJ API library.

permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.xerces.internal.dom";

2

Allow access to the Java API for XML Processing (JAXP) classes required by the SAAJ API library.

permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.xerces.internal.jaxp";
Warning Release 2.2.0 of the SOAP resource adaptor includes SOAP libraries that are redundant when using Java SDK 1.6 and above. Therefore, when editing the permissions of a deployed service with REM or Rhino Console, Rhino must be restarted to allow classes to be loaded in the correct order.