This chapter contains the following sections:
A WSRP consumer, after learning of a producer existence, attempts to connect to the producer. When the consumer initially contacts the producer, the producer describes it’s capabilities and expectations through it’s service description. The producer can also require a consumer to provide information about itself in order to be able to access the services offered by the producer. The producer, in its service description, defines registration property keys (and descriptions thereof). The producer expects registering consumers to provide values for these keys.
The consumer describes its capabilities to the producer and also answers questions asked by the producer by providing registration property values in its registration data. At registration time, the consumer passes the registration data to the producer.
For producers that require registration, the consumer must register to use the producer. The consumer passes registration data to the producer and the producer validates the registration data provided by the consumer. If the registration data is deemed valid, the producer returns the consumer a registration handle. The consumer uses the registration handle for all further communications with the producer.
If in-band registration is supported in the producer, the consumer can register through the WSRP registration port type. If in-band registration is not supported by the producer, the consumer administrator must manually obtain the registration handle from the producer administrator.
A registration validation process can be implemented for informing the producer whether a registration (data from a consumer) is valid. A public service provider interface (the RegistrationValidator interface), povided with the Portal Server software, allows the logic that determines the validity of registration data.
RegistrationValidator is the Java interface for the registration validation service provider interface. Where non-standard logic is required for validating registration data from consumers, implement this Java interface to validate the data with arbitrary logic.
Each producer instance can be configured with a unique registration validator. The producer uses the configured registration validator when:
A consumer performs an inband registration
The producer administrator adds a consumer registration out of band
The RegistrationValidator interface will be passed the registration data and service description. It uses a subset of the information contained in those obejcts to determine the return value of the validate() method. The return value is a code indicating success or failure. Any non-negative value indicates that the validation was successful. Any negative value indicates a validation failure.
The integer code return value can be interpreted by the producer to provide meaningful error messages to users. That is, for each RegistrationValidator implementation, resource messages must be inserted into the producer’s resource bundle. When an attempt to add a registration via the administration console takes place, the administration console gets the RegistrationValidator and calls the validate() method. A return value greater or equal to zero indicates success (validation succeeded). A negative return value indicates that validation failed.
The administration console displays the localized human-readable message regarding the validation. Typically, this is used for error messages; but it can also be used to provide warning messages or differing success messages. Registration validation messages should be formatted as such:
<RV class name><code>=<mesage>
RV class name is the RegistrationValidator implementation class name
code is the return code from the validate() method
message is the human-readable error message
For example, to provide a message for RegistrationValidator class com.sun.portal.foo.FooValidator and for validator code -23:
com.sun.portal.foo.bar.FooValidator-23=Unknown company name
Javadocs for RegistrationValidator class is available online at http://hostname:port/portal/javadocs.
The Portal Server software WSRP producer includes two default RegistrationValidator implementations—DummyRegistrationValidator and DefaultRegistrationValidator.
The DummyRegistrationValidator class always returns code 0. The DefaultRegistrationValidator class verifies that every registration property defined in the service description’s registration property descriptions is present in the registration data’s registration properties, and that every registration property has a non-null, non-empty value.
By default, the DefaultRegistrationValidator is configured as active.
Unknown Validation Error