You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "hellozengsong@gmail" <he...@gmail.com> on 2013/10/12 10:08:26 UTC

axis2 Could not identify the Annotation

axis2-1.6.2 Deploy tomcat7.0 
console:
Could not identify the Annotation....
Could not identify the Annotation....

my code: 
@Service("iMSServiceImpl") 
public class SimpleServiceImpl implements SimpleService{
@Autowired
@Qualifier("iMSServiceFunction")
private SimpleDao simpleDao;
}

out Could not identify the Annotation Tips for how to solve this 



hellozengsong@gmail

RE: axis2 Could not identify the Annotation

Posted by Martin Gainty <mg...@hotmail.com>.
if your intention is to PUBLISH a service you should annotate with @Produces
https://jsr311.java.net/nonav/javadoc/javax/ws/rs/Produces.html
(the container WILL USE THE VALUE of the Produces when sending a response)
If on the other hand the container sees no acceptable value for Produces
"If no such method is available the container must respond with a HTTP "406 Not Acceptable" as specified by RFC 2616"

HTH,
Martin


  





Date: Sat, 12 Oct 2013 16:08:26 +0800
From: hellozengsong@gmail.com
To: java-user@axis.apache.org
Subject: axis2 Could not identify the Annotation




axis2-1.6.2 Deploy tomcat7.0 
console:

Could not identify the Annotation....
Could not identify the Annotation....
 
my code: 
@Service("iMSServiceImpl") 
public class SimpleServiceImpl implements SimpleService{

@Autowired
@Qualifier("iMSServiceFunction")
private SimpleDao simpleDao;
}
 
out Could not identify the Annotation Tips for how to solve this 


hellozengsong@gmail 		 	   		  

RE: axis2 Could not identify the Annotation

Posted by Martin Gainty <mg...@hotmail.com>.

you are missing @Path(ClassName) 

Why?

Path Identifies the URI path that a resource class or class method will serve requests for. 


An example:
@Path("widgets")
public class WidgetsResource {
  @GET
  String getList() {...}
 
  @GET @Path("{id}")
  String getWidget(@PathParam("id") String id) {...}
}
In the above, if the application path is catalogue and the application is 
deployed at http://example.com/, then GET requests for 
http://example.com/catalogue/widgets 
will be handled by the 
getList method while nnn requests for 
http://example.com/catalogue/widgets/nnn 
(where nnn is some value) will be handled by the 
getWidget method. 
The same would apply if the value of either @Path annotation started with '/'. 
https://jsr311.java.net/nonav/javadoc/javax/ws/rs/Path.html

Classes and methods may also be annotated with Consumes and Produces to filter the requests they will receiveif your intention is to consume a service you should annotate with @Consumes
https://jsr311.java.net/nonav/javadoc/javax/ws/rs/Consumes.htmlif your intention is to consume a service you should annotate with @Produces
https://jsr311.java.net/nonav/javadoc/javax/ws/rs/Produces.html
(the container WILL USE THE VALUE of the Produces when sending a response)
If on the other hand the container sees no acceptable value for Produces
"If no such method is available the container must respond with a HTTP "406 Not Acceptable" as specified by RFC 2616"


HTH,
Martin
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

  




Date: Sat, 12 Oct 2013 16:08:26 +0800
From: hellozengsong@gmail.com
To: java-user@axis.apache.org
Subject: axis2 Could not identify the Annotation




axis2-1.6.2 Deploy tomcat7.0 
console:

Could not identify the Annotation....
Could not identify the Annotation....
 
my code: 
@Service("iMSServiceImpl") 
public class SimpleServiceImpl implements SimpleService{

@Autowired
@Qualifier("iMSServiceFunction")
private SimpleDao simpleDao;
}
 
out Could not identify the Annotation Tips for how to solve this 


hellozengsong@gmail