uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

30.4.1 Behavior of the JAX-WS engine on a Web Service machine

The availability of attachments in MTOM/XOP specification format in the Web Service side JAX-WS engine depends upon the field value of the SOAPBinding interface specified in the javax.xml.ws.soap.MTOM annotation or javax.xml.ws.BindingType annotation specified in the Web Service implementation class. The following table describes the usage of attachments in MTOM/XOP specification format, and the behavior upon receiving the request messages:

Table 30-2 Availability of attachments in MTOM/XOP specification format and the behavior upon receiving the request messages

No. Attachment in MTOM/XOP specification format Data included in the received messages Successfully received/failed Relation between the threshold and the attachment to be sent# Data included in the response messages to be sent
1 Used Binary data Successful Threshold [Figure]attachment size Binary data
2 Base64 type data Successful Threshold>attachment size
3 Not used Binary data Successful None Base64 type data
4 Base64 type data Successful None

#
Not determined with the threshold if the javax.activation.DataHandler is used. Always sent as binary data.

If the javax.xml.ws.soap.MTOM annotation is not specified in the Web Service implementation class, or if SOAPBinding.SOAP11HTTP_MTOM_BINDING and SOAPBinding.SOAP12HTTP_MTOM_BINDING are not specified in the field values of the SOAPBinding interface that is specified in the javax.xml.ws.BindingType annotation, attachments in MTOM/XOP specification format are not used. Irrespective of whether binary data is included, all request messages are received. Also, response messages with Base64 type data are sent.

Organization of this subsection
(1) Changes due to the javax.xml.bind.annotation.XmlMimeType annotation

(1) Changes due to the javax.xml.bind.annotation.XmlMimeType annotation

Depending upon whether the javax.xml.bind.annotation.XmlMimeType annotation, which links Java type and MIME type, is annotated or not annotated in SEI etc, the value of the Content-Type field in the attachment part of the messages sent through the attachments in MTOM/XOP specification format changes. See below for how the Content-Type value in the attachment part changes depending upon whether the javax.xml.bind.annotation.XmlMimeType annotation is used.

#
If you use DataHandler, the value set in the Content-Type field differs according to the method used for generating the DataHandler object.
  • If generated by using the DataHandler (DataSource) constructor
    In FiledataSource, from the extension of the file data that is used as an input, the MIME type decided by JAF is set as the value of the Content-Type field.
  • If generated by using the DataHandler (Object, String) constructor
    The contents (MIME type) specified in the 2nd argument of the constructor when the DataHandler object is generated is set as is as the Content-Type field value.