jax ws - JAX-WS implementation annotations vs. interface annotnations -


i configure jax-ws web service using annotations. use endpoint interface annotated values , used server client, share interface.

my interface looks this:

@webservice(name = constants.name, servicename = constants.service_name, targetnamespace = constants.namespace) @soapbinding public interface imanagementbean {     @webmethod(operationname = "getstatistics")     igetstatsresponse getstatistics(igetstatsrequest request,         @webparam(name = "gridname", header = true, partname = "gridname") string gridname)         throws webserviceexception; } 

in corresponding implementation use same annotations, looks quite redundant me.

is there way tell implementation "pull" annotations interface instead of defining them on both sides?

if don't interface, avoid interface.

you can safely start without interfaces , introduce them later need arises. approach fundamentally different in java ee 5. compared java 2 platform, enterprise edition (j2ee) 2003, java ee 6 code simpler, in terms of elimination of several layers, indirections, , abstractions. unlike j2ee, java ee 6 consists of annotated classes without dependencies on platform. approach eliminates need separate business logic infrastructure , makes majority of j2ee patterns , best practices superfluous. in java ee 6, simple cases can solved 2 layers: presentation , business logic.

java ee 6: simplicity design - adam bien


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -