1. A method of processing MTOM messages by a pipeline of message handlers in a Web services agent, the method comprising: receiving an inbound MTOM message which comprises a root document and at least one binary attachment referenced by the root document; unpackaging the received message including separating said binary attachment(s) from said root document; determining if conversion of said message is required by at least one of said message handlers; and responsive to the result of the determination selectively carrying out one of: i) converting said message, by encoding the binary data in each of said attachment(s) and replacing each reference in said root document to a binary attachment with the encoded data for that attachment, and processing the converted message by said pipeline; and ii) processing the root document and binary attachments by the pipeline.