uCosminexus Application Server, Web Service Development Guide

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

16.2.6 javax.jws.WebMethod annotation

The javax.jws.WebMethod annotation can be used to customize the mapping of operations.

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

Figure 16-14 Example of customization with the javax.jws.WebMethod annotation

[Figure]

Organization of this subsection
(1) exclude element (javax.jws.WebMethod)
(2) OperationName element (javax.jws.WebMethod)
(3) action element (javax.jws.WebMethod)

(1) exclude element (javax.jws.WebMethod)

Of the public methods in the Web Service Implementation Class, the public methods that you do not want to make public as an operation can be excluded from the mapped operations by annotating the method with the javax.jws.WebMethod annotation where the element value of the exclude element is true. For methods in an inherited parent class, that method is overridden and can be excluded from the mapped operations by annotating the method with the javax.jws.WebMethod annotation where the element value of the exclude element is true.

The precautions for specifying the exclude element are as follows:

(2) OperationName element (javax.jws.WebMethod)

The operationName element is specified when you customize the mapping for the operation name. If you specify the element value in the operationName element, you can customize the message name that has the operation name in the default mapping value. For the non-wrapper style, you can also customize the global element name and part name.

The precautions for specifying the operationName element are as follows:

(3) action element (javax.jws.WebMethod)

The action element is mapped to the action of the SOAP operation. In the action element, you can specify characters satisfying xsd:anyURI defined in RFC 2396, but the specified value is ignored at runtime.