JAXM and SOAP Messaging Styles

printer-friendly version of this section  Print  e-mail this section  E-Mail  add a public, group or private note  Add Note  add a bookmark about this section  Add Bookmark    

Java APIs for XML Kick Start
By Aoyon Chowdhury, Parag Choudhary

Table of Contents
Chapter 7.  Messaging Fundamentals


There are two types of packaging models for SOAP messages: with and without attachments. JAXM provides a standard way of creating and consuming both types of SOAP messages.

SOAP Message with Attachments

Figure 7.7 represents a JAXM message with attachments.

Figure 7.7. SOAP message with attachments.

graphics/07fig07.gif

Depending upon the application requirements, a JAXM application can choose to create or consume a SOAP message with attachments. For example, with the asynchronous update with acknowledgment message category, an acknowledgment message is sent to the requesting client. This acknowledgment need not have an attachment part. However, if an application needs to send an image file, then it will have to create a SOAP message with attachment, because an image file is non-XML data and can be sent only as an attachment.

It is important to remember that a JAXM client that receives a message is required to identify and process the attachment part of a message.

A message that contains attachments must necessarily contain a MIME envelope. This envelope contains the SOAP part of the message as well as the attachment part. The MIME envelope is automatically created when the client creates an attachment and the JavaBeans Activation Framework (JAF) is used to provide a flexible way to handle attachments based on MIME types.

SOAP Message Without Attachments

Figure 7.8 represents a JAXM message without attachments.

Figure 7.8. A SOAP message without attachments.

graphics/07fig08.gif

The model for the SOAP message without attachments is very similar to the SOAP message with attachments, except that there is no MIME envelope and no attachment part.


printer-friendly version of this section  Print  e-mail this section  E-Mail  add a public, group or private note  Add Note  add a bookmark about this section  Add Bookmark    
Top

[0672324342/ch07lev1sec3]

 
 


JavaT APIs for XML Kick Start
JAX: Java APIs for XML Kick Start
ISBN: 0672324342
EAN: 2147483647
Year: 2002
Pages: 133

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net