Rules

Follow these rules when you develop published business service value object classes:

  • Implement the serialize interface for all published value objects. This facilitates exposing the published business service as a web service.

  • Initialize published business service value object compound attributes. This is to prevent null pointer exceptions when the method calls accessors.

  • Expose published business service value object compound collections as arrays. Collection objects such as an ArrayList cannot be exposed from a web service at this time.

  • Do not change published value objects, because the change breaks the contract that was created by the original value object. This is to support backwards compatibility.

  • Do not add a new field, because this breaks the original contract that was set by the value object. You must create a new version of the value object and method.

  • Create response value objects that contain a complete message (more than just keys).

  • Place mappings between published and internal value objects in a method in the published value object.