uCosminexus Application Server, Web Service Development Guide
Specify the javax.xml.ws.soap.MTOM annotation in the Web Service that uses the attachments of MTOM/XOP specification format.
The description of the javax.xml.ws.soap.MTOM annotation is as follows.
When creating the Web Service that uses attachments of MTOM/XOP specification format with the help of the skeleton class of the Web Service Implementation Class generated by the cjwsimport command, the javax.xml.ws.soap.MTOM annotation is not mapped in the skeleton class of the Web Service Implementation Class. Therefore, you must specify the javax.xml.ws.soap.MTOM annotation. Note that even if the javax.xml.ws.soap.MTOM annotation is specified in the Web Service Implementation Class, an element or attribute indicating the usage of attachments of MTOM/XOP specification format does not appear in the WSDL file issued by the Web Service JAX-WS engine or WSDL file generated by the cjwsgen command.
The javax.xml.ws.soap.MTOM annotation is referenced only when starting the Web Services. Therefore, this annotation is not interpreted when executing the apt command and the cjwsgen command.
The following is an example using the javax.xml.ws.soap.MTOM annotation in Web Service:
.......
@MTOM
@WebService(endpointInterface = "jaxwstp.example.service.ExamplePortType", targetNamespace = "http://service.example.jaxwstp/", serviceName = "ExampleService", portName = "ExamplePort")
public class ExampleBinding implements ExamplePortType {
|
The enabled element specifies whether to use the attachments of MTOM/XOP specifications format in the Web Service. When true is specified, attachments of MTOM/XOP specifications format can be used, and when false is specified, attachments of MTOM/XOP specification format cannot be used. The default value is true.
The threshold element is the threshold for sending the binary data as attachments of MTOM / XOP specifications format when you can use attachments of MTOM / XOP specifications format in the Web Service. In classes other than the javax.activation.DataHandler class, for the binary data exceeding the specified value (threshold element value size of the data to be sent), binary data is sent as attachments of MTOM/XOP specifications format. The default value is 0.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.