uCosminexus Application Server, Web Service Development Guide

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

19.2.4 Core API

This subsection describes the support range of the core APIs.

Organization of this subsection
(1) com.sun.xml.ws.developer.StreamingAttachmentFeature class
(2) com.sun.xml.ws.developer.StreamingDataHandler class
(3) org.jvnet.mimepull.MIMEConfig class
(4) javax.xml.ws.Binding interface
(5) javax.xml.ws.handler.Handler<C extends MessageContext> interface
(6) javax.xml.ws.handler.HandlerResolver interface
(7) javax.xml.ws.handler.LogicalMessageContext interface
(8) javax.xml.ws.handler.MessageContext interface
(9) javax.xml.ws.handler.PortInfo interface
(10) javax.xml.ws.handler.soap.SOAPHandler<T extends SOAPMessageContext> interface
(11) javax.xml.ws.handler.soap.SOAPMessageContext interface
(12) javax.xml.ws.Holder<T> class
(13) javax.xml.ws.LogicalMessage interface
(14) javax.xml.ws.ProtocolException class
(15) javax.xml.ws.soap.AddressingFeature class
(16) javax.xml.ws.soap.MTOMFeature class
(17) javax.xml.ws.soap.SOAPBinding interface
(18) javax.xml.ws.soap.SOAPFaultException class
(19) javax.xml.ws.WebServiceException class

(1) com.sun.xml.ws.developer.StreamingAttachmentFeature class

The following table describes the support range of the com.sun.xml.ws.developer.StreamingAttachmentFeature class.

Table 19-13 Support range of the com.sun.xml.ws.developer.StreamingAttachmentFeature class

No. Return value type Method name Support
1 -- StreamingAttachmentFeature() N
2 -- StreamingAttachmentFeature(String dir,boolean parseEagerly,long memoryThreshold) Y
Explanation Creates StreamingAttachmentFeature.
Argument

dir:
This is the path of the output destination directory for the temporary file. If a non-existent directory, a directory without access permissions, or an existing file name is specified, a message is displayed, and the MIME body included in the SOAP message containing the received attachment is expanded in the memory (KDJW10026-W).

parseEagerly:
Specifies whether the SOAP message containing the received attachment will be parsed in detail. If true, the SOAP message containing an attachment is parsed in detail.

memoryThreshold:
This is the threshold value (unit: byte) for determining whether the MIME body included in the SOAP message will be expanded in the memory when a SOAP message containing an attachment is received. Specify a value greater than 16 KB (16384 L) or -1. If any other value is specified, the operation is not guaranteed. If you specify -1, the MIME body is always expanded in the memory.
3 java.lang.String getID() Y
Explanation Obtains a unique identifier for StreamingAttachmentFeature.
4 org.jvnet.mimepull.MIMEConfig getConfig() Y
Explanation Obtains the MIMEConfig instance indicating the streaming settings. If you invoke this method once, you cannot change the streaming settings by using the following setter methods:
  • setDir(String dir)
  • setParseEagerly(boolean parseEagerly)
  • setMemoryThreshold(int memoryThreshold)
5 void setDir(String dir) Y
Explanation Specifies the directory to be used to output the MIME body, which is included in the SOAP message containing the received attachment, as a temporary file, when streaming is enabled. If this method is invoked multiple times, the value specified last is valid. If you invoke the getConfig() method, you cannot reset the values using this method.
Argument

dir:
This is the path of the output destination directory for the temporary file. If a non-existent directory, a directory without access permissions, or an existing file name is specified, a message is displayed, and the MIME body included in the SOAP message containing the received attachment is expanded in the memory (KDJW10026-W).
6 void setParseEagerly(boolean parseEagerly) Y
Explanation Specifies whether the SOAP message containing the received attachment will be parsed in detail, when streaming is enabled. If this method is invoked multiple times, the value specified last is valid. If you invoke the getConfig() method, you cannot reset the values using this method.
Argument

parseEagerly:
Specifies whether the SOAP message containing the received attachment will be parsed in detail. If true, the SOAP message containing an attachment is parsed in detail.
7 void setMemoryThreshold(int memoryThreshold) Y
Explanation Specifies the threshold value for determining whether the MIME body included in the SOAP message will be expanded in the memory when a SOAP message containing an attachment is received, when streaming is enabled. If this method is invoked multiple times, the value specified last is valid. If you invoke the getConfig() method, you cannot reset the values using this method.
Argument

memoryThreshold:
This is the threshold value (unit: byte) for determining whether the MIME body included in the SOAP message will be expanded in the memory when a SOAP message containing an attachment is received. Specify a value greater than 16 KB (16384 L) or -1. If any other value is specified, the operation is not guaranteed. If you specify -1, the MIME body is always expanded in the memory.

Legend:
--: Indicates that there is no return value type.
Y: Supported in the Cosminexus JAX-WS functionality.
N: Not supported in the Cosminexus JAX-WS functionality.

(2) com.sun.xml.ws.developer.StreamingDataHandler class

The following table describes the support range of the com.sun.xml.ws.developer.StreamingDataHandler class.

Table 19-14 Support range of the com.sun.xml.ws.developer.StreamingDataHandler class

No. Return value type Method name Support
1 -- StreamingDataHandler(Object o, String s) N
2 -- StreamingDataHandler(URL url) N
3 -- StreamingDataHandler(DataSource dataSource) N
4 java.io.InputStream readOnce() Y
Explanation Obtains java.io.InputStream of this object.
Exception

IOException:
This exception occurs when InputStream corresponding to this object cannot be obtained.
5 void moveTo(File file) Y
Explanation Moves the attachment indicated by this object to the specified file.
  • If null is specified in the argument file, java.io.IOException occurs (KDJW10023-E).
  • If the file or directory path existing in the argument file, or a file path containing a non-existent parent directory is specified, IOException occurs (KDJW10027-E).
Argument

file:
This is the output destination file path.
Exception

IOException:
This exception occurs in the following cases:
  • null is specified in the file.
  • An existing file or directory path, or a file path containing a non-existent parent directory is specified in the file.
  • An I/O error occurs.
6 void close() Y
Explanation Releases the resources of the attachment indicated by this object.
Exception

IOException:
This exception is thrown when an I/O error occurs.

Legend:
--: Indicates that there is no return value type.
Y: Supported in the Cosminexus JAX-WS functionality.
N: Not supported in the Cosminexus JAX-WS functionality.

(3) org.jvnet.mimepull.MIMEConfig class

The following table describes the support range of the org.jvnet.mimepull.MIMEConfig class.

Table 19-15 Support range of the org.jvnet.mimepull.MIMEConfig class

No. Return value type Method name Support
1 -- MIMEConfig() N
2 void setParseEagerly(boolean parseEagerly) Y
Explanation Specifies whether the SOAP message containing the received attachment will be parsed in detail, when streaming is enabled. If this method is invoked multiple times, the value specified last is valid.
Argument

parseEagerly:
Specifies whether the SOAP message containing the received attachment will be parsed in detail. If true, the SOAP message containing an attachment is parsed in detail.
3 void setMemoryThreshold(long memoryThreshold) Y
Explanation Specifies the threshold value for determining whether the MIME body included in the SOAP message will be expanded in the memory when a SOAP message containing an attachment is received, when streaming is enabled. If this method is invoked multiple times, the value specified last is valid.
Argument

memoryThreshold:
This is the threshold value (unit: byte) for determining whether the MIME body included in the SOAP message will be expanded in the memory when a SOAP message containing an attachment is received. Specify a value greater than 16 KB (16384 L) or -1. If any other value is specified, the operation is not guaranteed. If you specify -1, the MIME body is always expanded in the memory.
4 void setDir(String dir) Y
Explanation Specifies the directory to be used to output the MIME body, which is included in the SOAP message containing the received attachment, as a temporary file, when streaming is enabled. If this method is invoked multiple times, the value other than null or null character ("") and the one specified first is valid.
Argument

dir:
This is the path of the output destination directory for the temporary file.
5 void validate() Y
Explanation Validates whether a temporary file can be created. If the temporary file cannot be created, specify settings to expand the attachment in the memory.
If a non-existent directory, a directory without access permissions, or an existing file name is specified using the setDir(String dir) method and not validated using this method, org.jvnet.mimepull.MIMEParsingException occurs when a temporary file is output by streaming.

Legend:
--: Indicates that there is no return value type.
Y: Supported in the Cosminexus JAX-WS functionality.
N: Not supported in the Cosminexus JAX-WS functionality.

(4) javax.xml.ws.Binding interface

The following table describes the support range of the javax.xml.ws.Binding interface. For details, see the JAX-WS 2.2 specifications.

Table 19-16 Support range of the javax.xml.ws.Binding interface

No. Return value type Method name and Description Support
1 java.lang.String getBindingID() N
2 java.util.List<Handler> getHandlerChain() Y
Description Acquires a copy of the handler chain of the protocol binding instance.
3 void setHandlerChain (java.util.List<Handler> chain) Y
Description Specifies the handler chain of the protocol binding instance.
Argument

chain:
List of handlers that configure the handler chain.
Exception

javax.xml.ws.WebServiceException:
The exception is thrown if an error occurs when setting the handler chain or when null is specified in chain.

Legend:
Y: Supported in the JAX-WS functionality of Application Server.
N: Not supported in the JAX-WS functionality of Application Server

(5) javax.xml.ws.handler.Handler<C extends MessageContext> interface

The following table describes the support range of the javax.xml.ws.handler.Handler<C extends MessageContext> interface. For details, see the JAX-WS 2.2 specifications.

Table 19-17 Support range of the javax.xml.ws.handler.Handler<C extends MessageContext> interface

No. Return value type Method name/ Explanation Support
1 MessageContext.Scope close(MessageContext context) Y
Explanation This method is invoked just before the JAX-WS runtime dispatches a message, fault, or exception, when the message exchange is completed.
2 boolean handleFault(C context) Y
Explanation This method is invoked to process a fault message.
3 boolean handleMessage(C context) Y
Explanation This method is invoked to perform normal processing for the inbound and outbound messages.

Legend:
Y: Supported in the Cosminexus JAX-WS functionality.

(6) javax.xml.ws.handler.HandlerResolver interface

The following table describes the support range of the javax.xml.ws.handler.HandlerResolver interface. For details, see the JAX-WS 2.2 specifications.

Table 19-18 Support range of the javax.xml.ws.handler.HandlerResolver interface

No. Return value type Method name/ Explanation Support
1 java.util.List<Handler> getHandlerChain(PortInfo portInfo) Y
Explanation Obtains the handler chain of the specified port. This method must not return null.
Argument

portInfo:
This is the information of the port you want to access.

Legend:
Y: Supported in the Cosminexus JAX-WS functionality.

(7) javax.xml.ws.handler.LogicalMessageContext interface

The following table describes the support range of the javax.xml.ws.handler.LogicalMessageContext interface. For details, see the JAX-WS 2.2 specifications.

Table 19-19 Support range of the javax.xml.ws.handler.LogicalMessageContext interface

No. Return value type Method name/ Explanation Support
1 LogicalMessage getMessage() Y
Explanation Obtains the messages from this message context.

Legend:
Y: Supported in the Cosminexus JAX-WS functionality.

(8) javax.xml.ws.handler.MessageContext interface

The following table describes the support range of the javax.xml.ws.handler.MessageContext interface. For details, see the JAX-WS 2.2 specifications.

Table 19-20 Support range of the javax.xml.ws.handler.MessageContext interface

No. Return value type Method name/ Explanation Support
1 MessageContext.Scope getScope(java.lang.String name) Y#1
Explanation Obtains the scope of the property.
Exception

java.lang.IllegalArgumentException:
This exception occurs when null, an empty string, and a property name not associated with this message context is specified in name.
The standard message context properties and user-defined message context properties are assumed to be associated with the message context.
For details on the message context properties, see 19.2.5(1) Support range of the message context properties.
2 void setScope(java.lang.String name, MessageContext.Scope scope) Y#2
Description Specifies scope of the property.
Exception

java.lang.IllegalArgumentException
This exception is thrown if null, a blank character string, or a property name not associated with the message context is specified in the name.The standard message context properties and user-defined message context properties are regarded as the property names associated with the message context.
For details on the message context properties, see 19.2.5(1) Support range of the message context properties.

Legend:
Y: Supported in the Cosminexus JAX-WS functionality.

#1
Supported only when used in a handler.

#2
This is a service side handler for inbounding and supports the addition of the user-defined message context property only. For details on the notes when adding the user-defined message context property, see 10.21.2(2) Notes when adding a user-defined message context property.

(9) javax.xml.ws.handler.PortInfo interface

The following table describes the support range of the javax.xml.ws.handler.PortInfo interface. For details, see the JAX-WS 2.2 specifications.

Table 19-21 Support range of the javax.xml.ws.handler.PortInfo interface

No. Return value type Method name/ Explanation Support
1 java.lang.String getBindingID() Y
Explanation Obtains the URI that identifies the binding, used by the port to be accessed.
2 javax.xml.namespace.QName getPortName() Y
Explanation Obtains QName from the WSDL port to be accessed.
3 javax.xml.namespace.QName getServiceName() Y
Explanation Obtains QName of the WSDL service that includes the port to be accessed.

Legend:
Y: Supported in the Cosminexus JAX-WS functionality.

(10) javax.xml.ws.handler.soap.SOAPHandler<T extends SOAPMessageContext> interface

The following table describes the support range of the javax.xml.ws.handler.soap.SOAPHandler<T extends SOAPMessageContext> interface. For details, see the JAX-WS 2.2 specifications.

Table 19-22 Support range of the javax.xml.ws.handler.soap.SOAPHandler<T extends SOAPMessageContext> interface

No. Return value type Method name/ Explanation Support
1 java.util.Set<javax.xml.namespace.QName> getHeaders() Y
Explanation Obtains the headers that can be processed with this handler instance.

Legend:
Y: Supported in the Cosminexus JAX-WS functionality.

(11) javax.xml.ws.handler.soap.SOAPMessageContext interface

The following table describes the support range of the javax.xml.ws.handler.soap.SOAPMessageContext interface. For details, see the JAX-WS 2.2 specifications.

Table 19-23 Support range of the javax.xml.ws.handler.soap.SOAPMessageContext interface

No. Return value type Method name/ Explanation Support
1 java.lang.Object[] getHeaders(javax.xml.namespace.QName header, javax.xml.bind.JAXBContext context, boolean allRoles) Y
Explanation Obtains a header with a specific QName from the messages of this message context. If this message context does not have messages or if a header that matches with QName specified in header does not exist, this method returns an empty array.
Exception

javax.xml.ws.WebServiceException:
This exception occurs in the following cases:
  • When null is specified in the header
  • When null is specified in the context
2 javax.xml.soap.SOAPMessage getMessage() Y
Explanation Obtains the SOAP message from this message context.
3 java.util.Set<java.lang.String> getRoles() Y
Explanation Obtains the SOAP actor and role associated with the execution of the handler chain.
4 void setMessage(javax.xml.soap.SOAPMessage message) N

Legend:
Y: Supported in the Cosminexus JAX-WS functionality.
N: Not supported in the Cosminexus JAX-WS functionality.

(12) javax.xml.ws.Holder<T> class

The following table describes the support range of the javax.xml.ws.Holder<T> class. For details, see the JAX-WS 2.2 specifications.

Table 19-24 Support range of the javax.xml.ws.Holder<T> class

No. Return value type Method name/ Explanation Support
1 -- Holder() Y
Explanation Creates a new holder containing a null value.
2 -- Holder(T value) Y
Explanation Creates a new holder containing the specified value.

Legend:
--: Indicates that there is no return value type.
Y: Supported in the Cosminexus JAX-WS functionality.

(13) javax.xml.ws.LogicalMessage interface

The following table describes the support range of the javax.xml.ws.LogicalMessage interface.

Table 19-25 Support range of the javax.xml.ws.LogicalMessage interface

No. Return value type Method name/ Explanation Support
1 javax.xml.transform.Source getPayload() Y
Explanation Obtains the message payload as an XML source.
2 java.lang.Object getPayload(javax.xml.bind.JAXBContext context) Y
Explanation Obtains the message payload as a JAXB object.
3 void setPayload(java.lang.Object payload, javax.xml.bind.JAXBContext context) N
4 void setPayload(javax.xml.transform.Source payload) N

Legend:
Y: Supported in the Cosminexus JAX-WS functionality.
N: Not supported in the Cosminexus JAX-WS functionality.

(14) javax.xml.ws.ProtocolException class

The following table describes the support range of the javax.xml.ws.ProtocolException class. For details, see the JAX-WS 2.2 specifications.

Table 19-26 Support range of the javax.xml.ws.ProtocolException class

No. Return value type Method name/ Explanation Support
1 -- ProtocolException() Y
Explanation Sets up a new exception where the detailed message is null.
2 -- ProtocolException(java.lang.String message) Y
Explanation Sets up a new exception containing the specified detailed message.
3 -- ProtocolException(java.lang.String message, java.lang.Throwable cause) Y
Explanation Sets up a new exception using the specified detailed message and cause.
4 -- ProtocolException(java.lang.Throwable cause) Y
Explanation Sets up a new exception containing the specified cause and detailed message.

Legend:
--: Indicates that there is no return value type.
Y: Supported in the Cosminexus JAX-WS functionality.

(15) javax.xml.ws.soap.AddressingFeature class

The following table describes the support range of the javax.xml.ws.soap.AddressingFeature class. For details, see the JAX-WS 2.2 specifications.

Table 19-27 Support range of the javax.xml.ws.soap.AddressingFeature class

No. Return value type Method name Support
1 -- AddressingFeature() Y
Explanation Creates AddressingFeature.
2 -- AddressingFeature(boolean enabled) Y
Explanation Creates AddressingFeature.
Argument

enabled:
Specifies whether to enable or disable WS-Addressing.
3 -- AddressingFeature(boolean enabled, boolean required) Y
Explanation Creates AddressingFeature.
Argument

enabled:
Specifies whether to enable or disable WS-Addressing.

required:
Specify this argument when you want to use WS-Addressing.
4 -- AddressingFeature(boolean enabled, boolean required,
AddressingFeature.Responses responses)
Y
Explanation Creates AddressingFeature.
Argument

enabled:
Specifies whether to enable or disable WS-Addressing.

required:
Specify this argument to request the use of WS-Addressing.

responses:
Specifies the type of response endpoint to be requested. You can specify one of the following response endpoint types: #
  • All URIs
    javax.xml.ws.soap.AddressingFeature.Responses.ALL
  • Only anonymous URIs
    javax.xml.ws.soap.AddressingFeature.Responses.ANONYMOUS
  • Only non-anonymous URIs
    javax.xml.ws.soap.AddressingFeature.Responses.NON_ANONYMOUS
5 java.lang.String getID() Y
Explanation Obtains a unique identifier for AddressingFeature.
6 AddressingFeature.Responses getResponses() Y
Explanation Obtains the type of response endpoint to be requested.
7 Boolean isRequired() Y
Explanation Obtains information about whether the use of AddressingFeature will be requested.

Legend:
--: Indicates that there is no return value type.
Y: Supported in the Cosminexus JAX-WS functionality.

#
The specification of responses does not affect the operations of the client-side JAX-WS engine.

(16) javax.xml.ws.soap.MTOMFeature class

The following table describes the support range of the javax.xml.ws.soap.MTOMFeature class. For details, see the JAX-WS 2.2 specifications.

Table 19-28 Support range of the javax.xml.ws.soap.MTOMFeature class

No. Return value type Method name Support
1 -- MTOMFeature() Y
Explanation Creates MTOMFeature.
2 -- MTOMFeature(boolean enabled) Y
Explanation Creates MTOMFeature.
Argument

enabled:
Specifies whether to use attachments in the MTOM/XOP specification format.
3 -- MTOMFeature(boolean enabled, int threshold) Y
Explanation Creates MTOMFeature.
Argument

enabled:
Specifies whether to use attachments in the MTOM/XOP specification format.

threshold:
This is the size (unit: byte) of the binary data to be sent as an attachment in the MTOM/XOP specification format. If the value specified for the threshold <= binary data size, the binary data is sent as an attachment in the MTOM/XOP specification format.
4 -- MTOMFeature(int threshold) Y
Explanation Creates MTOMFeature.
Argument

threshold:
This is the size (unit: byte) of the binary data to be sent as an attachment in the MTOM/XOP specification format. If the value specified for the threshold <= binary data size, the binary data is sent as an attachment in the MTOM/XOP specification format.
5 java.lang.String getID() Y
Explanation Obtains the unique identifier of MTOMFeature.
6 int getThreshold() Y
Explanation Obtains the threshold value to determine whether to send the binary data as an attachment in the MTOM/XOP specification format.

Legend:
--: Indicates that there is no return value type.
Y: Supported in the Cosminexus JAX-WS functionality.

(17) javax.xml.ws.soap.SOAPBinding interface

The following table describes the support range of the javax.xml.ws.soap.SOAPBinding interface. For details, see the JAX-WS 2.2 specifications.

Table 19-29 Support range of the javax.xml.ws.soap.SOAPBinding interface

No. Return value type Method name Support
1 javax.xml.soap.MessageFactory getMessageFactory() N
2 java.util.Set<java.lang.String> getRoles() N
3 javax.xml.soap.SOAPFactory getSOAPFactory() N
4 boolean isMTOMEnabled() Y
Explanation Returns true if attachments in the MTOM/XOP specification format are enabled.
5 void setMTOMEnabled(boolean flag) Y
Explanation Enables or disables attachments in the MTOM/XOP specification format.
If the enabling or disabling of attachments in the MTOM/XOP specification format is not set up by using MTOMFeature or this method, you can specify the settings with this method. If the enabling or disabling of attachments in the MTOM/XOP specification format is already set up, you cannot respecify the settings using this method.
Argument

flag:
Specifies whether to enable or disable attachments in the MTOM/XOP specification format.
6 void setRoles(java.util.Set<java.lang.String> roles) N

Legend:
Y: Supported in the Cosminexus JAX-WS functionality.
N: Not supported in the Cosminexus JAX-WS functionality.

(18) javax.xml.ws.soap.SOAPFaultException class

The following table describes the support range of the javax.xml.ws.soap.SOAPFaultException class. For details, see the JAX-WS 2.2 specifications.

Table 19-30 Support range of the javax.xml.ws.soap.SOAPFaultException class

No. Return value type Method name/ Explanation Support
1 -- SOAPFaultException (javax.xml.soap.SOAPFault fault) Y
Explanation Sets up a new exception of SOAPFaultException.
2 javax.xml.soap.SOAPFault getFault() Y
Explanation Obtains the embedded SOAPFault instance.

Legend:
--: Indicates that there is no return value type.
Y: Supported in the Cosminexus JAX-WS functionality.

(19) javax.xml.ws.WebServiceException class

The following table describes the support range of the javax.xml.ws.WebServiceException class. For details, see the JAX-WS 2.2 specifications.

Table 19-31 Support range of the javax.xml.ws.WebServiceException class

No. Return value type Method name/ Explanation Support
1 -- WebServiceException() Y
Explanation Sets up a new exception where the detailed message is null.
2 -- WebServiceException (java.lang.String message) Y
Explanation Sets up a new exception containing the specified detailed message.
3 -- WebServiceException(java.lang.String message, java.lang.Throwable cause) Y
Explanation Sets up a new exception containing the specified detailed message and cause.
4 -- WebServiceException (java.lang.Throwable cause) Y
Explanation Sets up a new exception containing the specified cause and detailed message.

Legend:
--: Indicates that there is no return value type.
Y: Supported in the Cosminexus JAX-WSfunctionality.