Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No way to exclude method from being exposed by JAX-WS as web service operation

I'm creating a web service in Java EE 6 annotating an enterprise bean with @WebService. I need to expose only some of the bean methods, so I've annotated with @WebMethod only the required ones. Unfortunately JAX-WS ignores the annotations and try to expose all methods. The trouble is that there is one method, that's not intended to be used as a web service operation, that returns an interface and this cannot be managed by JAX-WS, so the web service is not deployed. Is this an expected behavior or am I missing something?

like image 877
remigio Avatar asked Nov 29 '12 16:11

remigio


1 Answers

You could add the attribute 'exclude' to the annotation and set it to true. The Javadoc states: Marks a method to NOT be exposed as a web method.

like image 87
Florian Avatar answered Sep 23 '22 23:09

Florian