Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable APT web service validation in Eclipse 4.4 edition for JavaEE Developers

I have installed the JavaEE edition of Eclipse 4.4 (Luna) and it contains a validator that generates the invalid errors (4144 items that haven't been a problem in 5 years of production use) for web services:

  • @WebMethod is only supported on classes annotated with @WebService
  • @WebService annotation contains an endpointInterface attribute. No methods annotated with @WebMethod allowed in implementation class
  • etc.

These errors are prevalent in generated classes so there's little we can do about them (for now).

In order to make my Eclipse installation useful, I'd like to disable the plugin that generates these messages. As we use CXF to generate the web service classes, I have removed the CXF plugins from my Eclipse installation to no avail. I have looked in the settings to see if I can disable the generated warnings for web services but failed to discover these specific errors.

Even disabling all validations in the Preferences→Validation pane still keeps the APT web services validation enabled. Even suspending all validations doesn't do the trick.

The errors don't contain any information as to which plugin is responsible for them. So the question is two fold:

  1. which plugin is responsible for these errors?
  2. how do I disable these specific validations?
like image 771
Martijn Dashorst Avatar asked Sep 30 '22 10:09

Martijn Dashorst


2 Answers

The plugin responsible for generating these errors is: org.eclipse.jst.ws.jaxws.core_1.0.400.v201404292132.jar according to the code search I did (specifically the WebMethodCheckForWebServiceRule class is responsible for one of the generated errors)

like image 84
Martijn Dashorst Avatar answered Oct 28 '22 11:10

Martijn Dashorst


I found that I can get rid of these validation errors by going to project properties>Java compiler>Annotation processing and then disabling annotation processing for the project. Tested on Eclipse Luna.

I hope this helps!

like image 26
Sandman Avatar answered Oct 28 '22 12:10

Sandman