I have a session bean for which I use @WebService annotation to publish the class for web-service.
but I want that only perticuler methods of that class should be published but in
JBoss 7 all the methods are getting published as web service.
I am using @WebMethod annotation to do so.
Actually my real probleam is that eariler I was working on JBoss 4.2.
And I used two methods with same name but different arguments(method overloading) and only one of the methods was published in web service.
But when I switched to JBoss 7 all the methods in th class are getting published by default so JBoss gives me error about having the same service name for two different services.
Ex.
@WebService
public class ServiceOk implements Service {
@WebMethod
public void foo(int a) {
}
public void foo(
String bar) {
}
}
since both the methods are published in JBoss 7 I am getting this error !!.
Is there any configuration for JBoss 7 to publish only the methods annotated with @WebMethod and not all the methods in the class.