An AS2 message conforms using the following structure:
HTTP header package: RFC2616/RFC2045
Encryption package: RFC2633 (application/pkcs7-mime)
Digitally signed package: RFC1847 (multipart/signed) (encrypted)
Message payload: RFC2376 (application/xml) (encrypted)
Digital signature: RFC2633 (application/pkcs7-signature) (encrypted)
The HTTP header is the outermost package, which is supplemented by the headers of the encryption package, which envelopes the signed multipart, which in turn binds the payload and signature parts.
Figure 1–1 shows a diagram of the basic AS2 protocol message format.