Hope you have already given a look at http://ws.apache.org/axis2/0_94/mtom-guide.html
~Thilina
On 2/28/06, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
[same answer I posted on the JAX-WS list]
Florian,
There are three choices for attachment protocols:
- WS-Attachments over DIME (DIME)
- SOAP with Attachment over MIME (SwA)
- MTOM over MIME (MTOM)
ASP.NET with WSE 2.0 supports DIME.
ASP.NET with WSE 3.0 supports MTOM
WCF supports MTOM.
JAX-WS supports SwA (by default) and MTOM (when enabled).
Axis 1.x supports SwA and DIME.
Axis 2 supports MTOM.
The best choice for interoperability is definitely MTOM.
When using MTOM, you don't actually define an attachment -- you simply define the binary file as part of your SOAP message as type="xsd:base64Binary" or type="xsd:hexBinary. MTOM automatically packages all binary types as MIME attachments for you transparently. You indicate the type of content in the element at runtime using an MTOM attribute extension, xmime:contentType. So, for example, the element would be define thus:
The xmime:base64Binary and xmime:hexBinary types have been predefined adding xmime:contentType attribute. In addition, you can identify what type of data might be expected in the element using the xmime:expectedContentType attribute. e.g.,<xs:element name="MyBinaryData">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:base64Binary" >
<xs:attribute ref="xmime:contentType" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
xmime:expectedContentTypes="image/jpeg, image/png"
These MTOM extensions are defined in the "Describing Media Content of Binary Data in XML" specification ( http://www.w3.org/TR/2005/NOTE-xml-media-types-20050504/).
Here are some useful links with samples/instructions:
http://www.codeproject.com/soap/MTOMWebServices.asp
http://java.sun.com/webservices/docs/2.0/jaxws/mtom-swaref.html
Anne
On 2/28/06, Florian Rengers <[EMAIL PROTECTED] > wrote:Hi all,
I have to write a SOAP Service with Java that deliver different
documents like Word, pdf and image files.
As a Service Consumer I have to write a dotNET Client which invoke the
service with the identifier of the desired document.
I have three main questions:
1.)
There are many types of attachment handlings and encodings like MTOM,
sWA, DIME and MIME.
Which of these are really both supported from .NET and from a Java.
A read that I should use mime for an interoperable service, but I also
read that dotNET does not support MIME encoding.
2.)
Which Java Technology should I use for this, Apache Axis or JAX-WS?
3.)
Do I have to define the attachment type in the wsdl-file. I saw some
examples in which that was done.
This is a problem for me because as I described the attachment type will
differ for each response.
Hope that someone can help me out of my uncertainty.
greetings
Florian
--
"May the SourcE be with u"
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina
