Skip to main content

WS Annotation - Ignoring methods

2 replies [Last post]
gabryh
Offline
Joined: 2007-08-02
Points: 0

Hi,
I am using the @WebService annotation to make my classes act as web services.
How can I make a specific method in one of my Web Serviec classes not be exposed in the auto generated WSDL?

Gabriel

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gkidd
Offline
Joined: 2007-11-20
Points: 0

[url=https://jax-ws.dev.java.net/nonav/2.1.7/docs/annotations.html#2.2%20javax.jws.WebMethod|outline]@WebMethod annotation[/url].

The "exclude" parameter is what you want.

gabryh
Offline
Joined: 2007-08-02
Points: 0

It seems that the exclude parameter is excluded from the WebMethod annotation.
Using it gives me the following error:
"@WebMethod must not have exclude element set to true"