Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

warning: Annotation types without processors & cannot find symbol @WebMeth

843833Dec 9 2008 — edited Jun 1 2009
Hello!

I'm new in the worl of web services. I want to try the simple web service example, but don't work:
package example;
import javax.jws.WebService;
import javax.jws.WebService;
import javax.xml.ws.Endpoint;

@WebService
public class Calculator {
    @WebMethod
    public int add(int a, int b) {
        return a+b;
    }
    
    public static void main(String[] args){
        // create and publish an endpoint
        Calculator calculator = new Calculator();
        Endpoint endpoint = Endpoint.publish("http://localhost:8080/calculator", calculator);        
    }
}
I'm using the apt commando of jdk1.6.0_10. And the error is the following.

*warning: Annotation types without processors: [WebMethod]*
*1 warning*
*warning: Annotation types without processors: [javax.xml.bind.annotation.XmlRoot*
Element, javax.xml.bind.annotation.XmlAccessorType, javax.xml.bind.annotation.Xm
lType, javax.xml.bind.annotation.XmlElement]
*1 warning*
Calculator.java:8: cannot find symbol
symbol : class WebMethod
location: class example.Calculator
*@WebMethod*
*^*
*1 error*

It doesn't found the @WebServce annotation, but .. the rt.jar is in my classpath. I don't know why don' found it. I just to know how I could generate WSDL file, because I tried with the tools wscompile and I didn't get anythigs.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 29 2009
Added on Dec 9 2008
2 comments
424 views