uCosminexus Application Server, Web Service Development Guide

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

16.2.9 javax.jws.WebService annotation

The javax.jws.WebService annotation is mandatory in the SEI and Web Service Implementation Class.

The following figure shows an example of customization with the javax.jws.WebService annotation:

Figure 16-17 Example of customization with the javax.jws.WebService annotation

[Figure]

Note that you can specify only one annotation between the javax.xml.ws.WebServiceProvider and javax.jws.WebService annotations. If you specify the javax.xml.ws.WebServiceProvider and javax.jws.WebService annotation annotations together, an error message will output to the standard error output and logs (KDJW61098-E).

Organization of this subsection
(1) targetNamespace element (javax.jws.WebService)
(2) endpointInterface element (javax.jws.WebService)
(3) name element (javax.jws.WebService)
(4) serviceName element (javax.jws.WebService)
(5) portName element (javax.jws.WebService)
(6) wsdlLocation element (javax.jws.WebService)

(1) targetNamespace element (javax.jws.WebService)

If the targetNamespace element is specified in SEI, the specified name space is enabled for the types element, message element, and portType element.

If this element is specified in the Web Service Implementation Class, the specified name space is enabled for the binding element and service element. If the endpointInterface element of the javax.jws.WebService annotation is not used in the Web Service Implementation Class, the same name space is assumed to be specified in both implicit SEI and the Web Service Implementation Class.

In the targetNamespace element, the http:// or urn: protocol is specified as a name space. The following name space formats and strings can be specified:

(2) endpointInterface element (javax.jws.WebService)

The precautions for specifying the endpointInterface element are as follows:

(3) name element (javax.jws.WebService)

The name element is specified to customize the mapping of the port type names. If the element value is specified in the name element, you can also customize all the elements that have the port type name in the default mapping value.

The precautions for specifying the name element are as follows:

(4) serviceName element (javax.jws.WebService)

You specify the serviceName element to customize the mapping of the service names.

The precautions for specifying the serviceName element are as follows:

(5) portName element (javax.jws.WebService)

You specify the portName element to customize the mapping of the port names.

(6) wsdlLocation element (javax.jws.WebService)

The wsdlLocation element is the value referenced when the Web Service is invoked, so the element is not interpreted when the apt command or the cjwsgen command is executed.