Java Web service using Apt. Do I need an annotation processor? What is wrong? -


I am trying to create a simple web service and it has been done later. Unfortunately I'm stuck. Here I have done this:

1) I have created this class:

  package server; Import javax.jws.WebService; @ WebService Public Category HelloImpl {/ ** * @ Ultimate Name * @ Hello to the person, say hello. * / Say public string is hello (string name) {return "hello," + name + "!"; }}  

2) I attended:

  apt HelloImpl.java  

3) I get this warning is:

  hostname [username: ~ / Desktop / webtest] [534]% suitable HelloImpl.java Warning: annotation type without processor: [JavaxkxmlkbindkannotationkXmlRootElement , Javax.xml. bind.annotation.XmlAccessorType, javax.xml.bind.annotation.XmlType, javax.xml.bind.annotation.XmlElement] 1 Warning  

production in the appropriate order should (according to the tutorial) files:

  HelloServiceImpl.wsdl schema1.xsd classes / server / HelloImpl.class classes / server / jaxrpc / SayHello.class classes / server / jaxrpc / SayHelloResponse.class classes / server / jaxrpc / SayHello .java classes / server / jaxrpc / SayHelloResponse.java  

Designed do when went generated I called it:

  HelloImpl.java ( Not generated, but it is still in the directory Not have) HelloImpl.class server / jaxws / SayHello.cass server / jaxws / SayHell.java server / jaxws / SayHelloResponse.class server / jaxws / Say HelloResponse.java  

(missing :)

  HelloServiceImpl.wsdl schema1.xsd  

(paths are also slightly different)

I suspect that generated warning Going and other files are not being generated because I have "annotation type without processor".

I think the warning tells that he needs an annotation factory (processor). I know that you can specify what a factory is:

Enter the code here -cp Where to find user class files and annotation processor factory

< P> I'm just sure to specify a factory (or maybe I need to configure some different way)

The 5-year tutorial could be a bit longer than Jax-RCP's successor , May require that you run only APT instead of equipment.

Take a look here for a mini tutorial


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -