uCosminexus Application Server, Web Service Development Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Glossary]](FIGURE/GLOSS.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
The following table lists the support range and elements of the javax.xml.ws.WebServiceRef annotation.
Table 19-33 List of elements of the annotations of the JAX-WS
| No. |
Annotation |
Support |
| Annotation name |
Element name |
| 1 |
javax.xml.ws.WebServiceRef |
lookup |
N |
| 2 |
mappedName |
N |
| 3 |
name |
N |
| 4 |
type |
N |
| 5 |
value |
Y |
| 6 |
wsdlLocation |
Y |
- Legend:
- Y: Indicates the annotations and elements that you can specify.
- N: Indicates the annotations and elements that you cannot specify (not supported).
The support range for each element is as follows:
- Organization of this subsection
- (1) value elements(javax.xml.ws.WebServiceRef)
- (2) wsdlLocation element (javax.xml.ws.WebServiceRef)
The value element specifies the service class that inherits javax.xml.ws.Service.
If the javax.xml.ws.WebServiceRef annotation is specified for methods or fields of the service class type, you cannot specify the value element. If you specify the value element, the operation is not gurenteed.
You must specify the value element when specifying the javax.xml.ws.WebServiceRef annotation for the fields or methods of the port type. If you do not specify the value element, the operation is not guerenteed.
The wsdlLocation element specifies the location of aWSDL document of Web Services.
You can specify the element in the following formats:
- URL
Specify a URL of a WSDL document. The specification format is according to the java.net.URL class specifications. You can specify only http and https protocols.You cannot specify other protocols.
- Relative path
Specify the WSDL document in the WAR file or EJB JAR file in the form of a relative path as described below. Note that the path must be a character string conforming to the rules of the RFC 2396 specifications.
- When storing a Web Services client where the javax.xml.ws.WebServiceRef annotation is specified, in the WAR file, specify a relative path starting with WEB-INF. Store the WSDL document under the path that is specified in the WAR file.
- When storing a Web Services client where the javax.xml.ws.WebServiceRef annotation is specified, in the EJB JAR file, specify a relative path starting with META-INF. Store the EJB JARfile under the path that is specified in the WAR file.
- Absolute path
Specify the absolute path of aWSDL document. The path must be in the form of a system dependant absolute path .The specification format is according to the java.io.File class.
Notes when specifying the wsdlLocation element are as follows:
- When creating an instance of the Web Services client, create a service class by using a value specified in the wsdlLocation element and inject service classes and ports. To do so, you must specify a location of a valid WSDL document in the wsdlLocation element when creating an instance. If you specify a non-existing WSDL location or the location of WSDL containing incorrect contents, service classes and ports are not injected, and, the value of fields and the return value of the setter method remain null.
- If you do not specify the wsdlLocation element in the similar way as the default constructor of the service class, create an instance of a port or a service class by using the value of the wsdlLocation element of the javax.xml.ws.WebServiceClient annotation specified in a service class.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.