[jboss-user] [JBossWS] - Re: Can a webservice have a constructor?
do-not-reply at jboss.com
Tue Jan 8 04:22:15 EST 2008
Essentially web-services are Java classes, so I think there is no harm in having a constructor in web-service. As far as having parameterized constructors are concerned, you can have that too but you need to have default constructors too.
The very need of default constructor is: the application server on which web service is hosted, creates the instances of the the web service class internally and absent of default constructor will cause an exception (a runtime exception in my opinion).
>From design point of view, web services should not contain any methods that are not going to be exposed to the client unless they are private members.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117816#4117816
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117816
More information about the jboss-user