I configure my JAX-WS web service using annotations. I use an endpoint interface which is annotated with some values and is used by the server as well as by the client, so they share the interface.
My interface looks like 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 the corresponding implementation I use the same annotations, which looks quite redundant to me.
Is there a way to tell the implementation to "pull" the annotations from the interface instead of defining them on both sides?