Methods and apparatus are disclosed for designing a Web service that
processes one or more composite messages. The same techniques may be
applied to the design of clients of the Web service. The Web service is
comprised of service logic and compositional logic. The service logic is
comprised of a plurality of message handlers that process micro-messages
of one or more composite messages. The compositional logic is comprised
of a plurality of protocol demultiplexers that implement Web service
functionality for demultiplexing, sequencing, and multiplexing one or
more composite messages. The compositional logic is separated from the
service logic, such that the service logic does not include operations
for demultiplexing, sequencing, or multiplexing the composite messages.