Re: Proposed resolution for issue 440

John,

Sorry for taking so much time to reply.

I think Noah has already replied to some of your questions by showing 
some API for using MTOM. Here are more tentative answers below.

John J. Barton wrote:

> Thanks Herve; this sounds ok but I want to explore it a bit more to be 
> convinced.
> I appreciate your patience. Please see below.
> 
> 
> 
> In reality the application that creates the document and the application 
> that packages it for transmission will be different.  For example we 
> will have something like Dreamweaver to create the content and something 
> like infozip+ftp to send it.  The created XML document will have 
> references to external binary files, probably as relative links.  A file 
> may be linked multiple times.  I understand the process under SwA: I 
> pick up the SOAP root, find all the relative links,  assign them to 
> ContentLocation values in my package, create the MIME, zip, send.  Under 
> MTOM I am not sure how to take those first steps since the original 
> information model isn't a tree. I guess I have to create an XML 
> representation of my file system directory with entries being 
> "includes", re-write the relative links in the SOAP root to point into 
> this XML data, then pass it to MTOM?

I would think that for sending your XML document and its bunch of 
external binary files using MTOM, you have currently two solutions.

1 - Using representation headers:
- You put your XML document into a SOAP message body.
- For each "include" in your XML document, you create a representation 
header containing the base64 encoded binary file (using some API similar 
to what Noah suggested in order to hopefully never encode the binary 
file in base64) and change the "include" to refer the representation header.
- You send your SOAP message using MTOM. Each binary file will be 
transfered as a MIME part.

2 - Using an external packaging mechanism:
- You zip (or package in any other way) your XML document and its 
external binary files.
- You create a SOAP message and add to its body this zip package as 
base64 encoded data (using the same API as in the previous case).
- You send your SOAP message using MTOM. Your zip package will be 
transfered as a MIME part.

Best regards,

Hervé.

Received on Monday, 17 November 2003 10:08:38 UTC