uCosminexus Application Server, Web Service Development Guide

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

19.2.2 Client API

This subsection describes the support range of the client APIs.

Organization of this subsection
(1) javax.xml.ws.BindingProvider interface
(2) javax.xml.ws.Dispatch interface
(3) javax.xml.ws.EndpointReference class
(4) javax.xml.ws.Service class
(5) javax.xml.ws.wsaddressing.W3CEndpointReference class

(1) javax.xml.ws.BindingProvider interface

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

Table 19-4 Support range of the javax.xml.ws.BindingProvider interface

No. Return value type Method name/ Explanation Support
1 Binding getBinding() Y
Description Acquires binding of this binding provider.
2 EndpointReference getEndpointReference() N
3 <T extends EndpointReference> T getEndpointReference (java.lang.Class<T> clazz) N
4 java.util.Map <java.lang.String, java.lang.Object> getRequestContext() Y
Explanation Obtains the context used for initializing the message context of the request message.
5 java.util.Map <java.lang.String, java.lang.Object> getResponseContext() Y
Explanation Obtains the context acquired by the processing of the response message. If this method is invoked before the response message is processed, null is returned.Do not call this method for one-way operations as response messages are not available. Operation is not guerenteed if you use this method in the one-way operations.

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

(2) javax.xml.ws.Dispatch interface

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

Table 19-5 Support range of the javax.xml.ws.Dispatch interface

No. Return value type Method name Support
1 T invoke(T msg) Y
2 Response<T> invokeAsync(T msg) N
3 java.util.concurrent.Future<?> invokeAsync(T msg, AsyncHandler<T> handler) N
4 void invokeOneWay(T msg) Y

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

(3) javax.xml.ws.EndpointReference class

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

Table 19-6 Support range of the javax.xml.ws.EndpointReference class

No. Return value type Method name Support
1 -- EndpointReference() Y
2 <T> T getPort (java.lang.Class<T> serviceEndpointInterface, WebServiceFeature... features) N
3 static EndpointReference readFrom (javax.xml.transform.Source eprInfoset) Y
4 java.lang.String toString() N
5 abstract void writeTo(javax.xml.transform.Result result) N

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.Service class

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

Table 19-7 Support range of the javax.xml.ws.Service class

No. Return value type Method name/ Explanation Support
1 -- Service(java.net.URL wsdlDocumentLocation, javax.xml.namespace.QName serviceName) Y
Explanation Constructor that generates the Service instance.
Argument

wsdlDocumentLocation:
This is the location of the WSDL document. If null is specified, the value of the wsdlLocation attribute of the javax.xml.ws.WebServiceClient annotation, specified in the class that invokes the Service constructor, is set up. For details on the URL format to be specified, follow the specifications for the java.net.URL class. If the catalog functionality is active, this method maps the value specified in this argument to the URI that points to a different WSDL location specified in the catalog file.

serviceName:
This is the name of the service.
Exception

javax.xml.ws.WebServiceException:
This exception occurs in the following cases:
  • When a non-existent local path name is specified in wsdlDocumentLocation
  • When a non-existent HTTP URL with ?wsdl is specified in wsdlDocumentLocation
  • When a non-existent HTTP URL without ?wsdl is specified in wsdlDocumentLocation
  • When null is specified in serviceName
  • When QName other than WSDL service name (name attribute value of the wsdl:service element) is specified in serviceName
  • When null is specified in wsdlDocumentLocation and the javax.xml.ws.WebServiceClient annotation is not used in the class that invokes the Service constructor
  • When null is specified in wsdlDocumentLocation and the wsdlLocation attribute is not set in the javax.jws.WebService annotation of the class that invokes the Service constructor
2 void addPort(javax.xml.namespace.QName portName, java.lang.String bindingId, java.lang.String endpointAddress) Y
Note You must specify the same QName for portName when you invoke createDispatch(). You cannot specify null.
If you specify null in bindingId, the SOAP1.1/HTTP binding ID is set up.
3 static Service create(javax.xml.namespace.QName serviceName) Y
4 static Service create(javax.xml.namespace.QName serviceName, javax.xml.ws.WebServiceFeature ... features) N
5 static Service create(java.net.URL wsdlDocumentLocation, javax.xml.namespace.QName serviceName) Y
Explanation Generates the Service instance.
Argument

wsdlDocumentLocation:
This is the location of the WSDL document. For details on the URL format to be specified, follow the specifications for the java.net.URL class.

serviceName:
This is the WSDL service name (name attribute value of the wsdl:service element).
Exception

javax.xml.ws.WebServiceException:
This exception occurs in the following cases:
  • When a non-existent local path name is specified in wsdlDocumentLocation
  • When a non-existent HTTP URL with ?wsdl is specified in wsdlDocumentLocation
  • When a non-existent HTTP URL without ?wsdl is specified in wsdlDocumentLocation
  • When a name other than the WSDL service name (name attribute value of the wsdl:service element) is specified in serviceName (however, except when null is specified in wsdlDocumentLocation)
6 static Service create(java.net.URL wsdlDocumentLocation, javax.xml.namespace.QName serviceName, javax.xml.ws.WebServiceFeature ... features) N
7 <T> Dispatch<T> createDispatch (EndpointReference endpointReference, java.lang.Class<T> type, Service.Mode mode, WebServiceFeature... features) N
8 Dispatch <java.lang.Object> createDispatch (EndpointReference endpointReference, javax.xml.bind.JAXBContext context, Service.Mode mode, WebServiceFeature... features) N
9 <T> Dispatch<T> createDispatch (javax.xml.namespace.QName portName, java.lang.Class<T> type, Service.Mode mode) Y
Note In portName, you must specify the same port name as the name specified in the arguments of addPort(). You cannot specify null.
10 <T> Dispatch<T> createDispatch (javax.xml.namespace.QName portName, java.lang.Class<T> type, Service.Mode mode, WebServiceFeature... features) N
11 Dispatch <java.lang.Object> createDispatch (javax.xml.namespace.QName portName, javax.xml.bind.JAXBContext context, Service.Mode mode) Y
Note In portName, you must specify the same port name as the name specified in the arguments of addPort(). You cannot specify null.
12 Dispatch <java.lang.Object> createDispatch (javax.xml.namespace.QName portName, javax.xml.bind.JAXBContext context, Service.Mode mode, WebServiceFeature... features) N
13 java.util.concurrent.Executor getExecutor() N
14 HandlerResolver getHandlerResolver() Y
Explanation Returns the HandlerResolver instance used by this Service instance. If the HandlerResolver instance does not exist, returns null.
15 <T> T getPort (java.lang.Class<T> serviceEndpointInterface) Y
Explanation Returns port (proxy for accessing the service).
Argument

serviceEndpointInterface:
This is the SEI Class class.
Exception

javax.xml.ws.WebServiceException:
This exception occurs in the following cases:
  • When serviceEndpointInterface is null
  • When invoked from the Service instance generated with Service.create() where null is specified in wsdlDocumentLocation
  • When SEI that does not use the javax.jws.WebService annotation is specified in the argument
  • When the HandlerResolver object implementing getHandlerChain() that returns null is set up with setHandlerResolver() before this method is invoked
  • When the HandlerResolver object implementing getHandlerChain() that returns a handler chain containing a handler, which is neither a logical handler nor a SOAP handler, is set up using setHandlerResolver() before this method is invoked
16 <T> T getPort (java.lang.Class<T> serviceEndpointInterface, WebServiceFeature... features) N
17 <T> T getPort(EndpointReference endpointReference, java.lang.Class<T> serviceEndpointInterface, WebServiceFeature... features) Y#
Explanation Returns port (proxy for accessing the service).
Argument

endpointReference:
This is the service endpoint invoked by the port.

serviceEndpointInterface:
This is the SEI Class class.

features:
This is the list of WebServiceFeature configured on the port.
Exception

javax.xml.ws.WebServiceException:
This exception occurs in the following cases:
  • When an exception occurs while the port is being generated
  • When the WSDL required for processing this method does not exist
  • When the endpointReference Meta data does not match serviceName of the Service instance
  • When portName cannot be extracted from the WSDL or endpointReference Meta data
  • When an invalid endpointReference is specified
  • When an invalid serviceEndpointInterface is specified
  • When there is no compatibility with the port, or when an unsupported WebServiceFeature is specified
18 <T> T getPort(javax.xml.namespace.QName portName, java.lang.Class<T> serviceEndpointInterface) Y
Explanation Returns port (proxy for accessing the service).
Argument

portName:
This is the WSDL port name (name attribute value of the wsdl:port element).

serviceEndpointInterface:
This is the SEI Class class.
Exception

javax.xml.ws.WebServiceException:
This exception occurs in the following cases:
  • When QName other than the WSDL port name (name attribute value of the wsdl:port element) is specified in portName
  • When portName is null
  • When serviceEndpointInterface is null
19 <T> T getPort(javax.xml.namespace.QName portName, java.lang.Class<T> serviceEndpointInterface, WebServiceFeature... features) N
20 java.util.Iterator <javax.xml.namespace.QName> getPorts() Y
Explanation Returns the Iterator of the QName list indicating the service end point (port included in WSDL (wsdl:port element)).
Exception

javax.xml.ws.WebServiceException:
This exception occurs when the Service.create() method is invoked for the Service instance generated by specifying null in wsdlDocumentLocation.
21 javax.xml.namespace.QName getServiceName() Y
Explanation Returns this service name (WSDL service name (name attribute value of the wsdl:service element)).
22 java.net.URL getWSDLDocumentLocation() Y
Explanation Returns the location of the WSDL file for this service. Returns null when the Service.create() method is invoked for the Service instance generated by specifying null in the argument wsdlDocumentLocation.
23 void setExecutor (java.util.concurrent.Executor executor) N
24 void setHandlerResolver (HandlerResolver handlerResolver) Y
Explanation Set the HandlerResolver instance of this Service instance.

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.

#
The following table describes the operations when variable length arguments are specified in the getPort method.

Table 19-8 Specification methods and operations for the variable length arguments

No. Specification method Specification example Operation
1 Argument is omitted getPort(epr, sei) Operation is performed considering that no variable length argument is specified.
2 One argument is specified getPort(epr, sei, new FooFeatures()) Operation is performed considering that one variable length argument is specified.
3 Two arguments are specified getPort(epr, sei,
new FooFeatures(),
new BarFeatures())
Operation is performed considering that two variable length arguments are specified.
4 null is specified in the argument getPort(epr, sei, null) Operation is performed considering that no variable length argument is specified.
5 null is specified in the argument and cast in the WebServiceFeature type array getPort(epr, sei,
(WebServiceFeature) null)
Operation is performed considering that a variable length argument with null is specified, and the exception NullPointerException occurs.
6 null is specified in the argument and cast in the WebServiceFeature type array getPort(epr, sei,
(WebServiceFeature[]) null)
Operation is performed considering that no variable length argument is specified.

(5) javax.xml.ws.wsaddressing.W3CEndpointReference class

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

Table 19-9 Support range of the javax.xml.ws.wsaddressing.W3CEndpointReference class

No. Return value type Method name Support
1 -- W3CEndpointReference() Y
2 -- W3CEndpointReference (javax.xml.transform.Source source) Y
3 void writeTo(javax.xml.transform.Result result) N

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