• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to stop all methods in a class from published as WebService in JBoss AS 7 ?

 
Greenhorn
Posts: 4
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which exact version of AS7 is this?
 
Rohan Bhanderi
Greenhorn
Posts: 4
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using jboss-as-7.1.1
My question is if there is any alternative to beacause in my application all the methods in the class annoted with are published in webservice.
And since my class has overloaded methods (with same number of arguments but of different types) I am forced to write on all the methods which I don't want to publish in webservice which was not the case with jboss-4.2.2.GA
 
reply
    Bookmark Topic Watch Topic
  • New Topic