Amit,

On 7/23/06, Rathore, Amit Singh (STSD) <[EMAIL PROTECTED]> wrote:
Hi People,
Has anyone really experienced in using SOAP attachments.

I have a few queries for him/her:
1) When I add attachments to my SOAP message, documents are attached as
reference or the whole content of the document is added in the SOAP
messsage (attached as value)?

"Attachment" implies attach by value. If you reference a file, you
don't need to use an attachment. You simply include a URL as an
element in your message.

Typically, an "attachment" refers to binary data. It's inefficient to
encode binary data in an XML document. It's more appropriate to send
the binary data in a separate package (e.g., a separate MIME part in a
MIME multipart/related message).

To date, there are three mechanisms used to pass binary data:

SOAP with Attachments (SwA) -- where the binary data is completely
separate from the data model of the SOAP message (the message InfoSet)
using MIME packaging.

WS-Attachments -- where the binary data is completely separate from
the SOAP message InfoSet using DIME packaging.

MTOM -- where the binary data is part of the SOAP message Infoset, but
it is packaged on the wire into a separate MIME part.

The original Java WS APIs (SAAJ, JAX-RPC, and JAXM) require SwA. ebXML
requires SwA. Unfortunately, Microsoft .NET WSE and WCF (aka "Indigo)
do not support SwA. They supports WS-Attachments. Axis1 supports both
SwA and WS-Attachments.

MTOM is rapidly becoming the new standard for sending binary data.
Originally designed for SOAP 1.2, a new spec also defines how to use
MTOM with SOAP 1.1. JAX-WS requires support for MTOM. .NET WSE 3.0 and
WCF both support MTOM. Axis2 supports MTOM.

2) If attached as value, what should be the considerable size of the
attachment?

You should always consider the size of the binary data you want to
send. All three binary data packaging systems support streaming, so
theoretically, you should be able to send any size file -- but reailty
is often different from theory. Many SOAP engines impose a limit on
binary data size. For extremely large files, it might be more
appropriate to pass the data by reference.

3) If the documents are attached as reference, how to download or upload
them? What about their serialization, security?

When attached by reference that data transfer is handled out-of-band
-- using FTP or a similar appropriate protocol.

4) What are the disadvantages of using Attachments?

Interoperability is still a serious issue.

5) Can attachments be used for download and upload of documents?

Attachments should be used to exchange binary data.

6) It would be great, if anyone can give me some links to read about
attachments with sample code? I am not looking out for SOAP attachment
specification link :-).

See 
http://www.mail-archive.com/[email protected]/msg08732/Fear_of_Attachments.pdf

7) Which version of Axis is best for Attachments?

For SwA and WS-Attachments, use Axis1.
For MTOM, use Axis2.


Thanks in advance.

--
Amit Singh Rathore

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to