cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: What if the @webservice annotation is not present in the implementation class
Date Thu, 10 Feb 2011 19:37:07 GMT
On Thursday 10 February 2011 11:10:05 am Glen Mazza wrote:
> You shouldn't need to duplicate the annotation on the implementation
> class (if you did, that would be a CXF bug) -- it inherits from the
> interface it implements.  

Actually, per JAX-WS spec, the @WebService annotation is not supposed to be 
inherited.   According to spec, the impl has to have one as well.  The RI 
won't work without it. 

CXF on the other hand will search for it on the interfaces and such and is 
thus a little more flexible.



Dan

> Does this problem actually go away if you
> duplicate the @WebService annotation on the implementation class?
> 
> Also, do Request1 and Request2 have different operation signatures?  If
> they're the same that could be due to another problem[1] why Request1 is
> getting mapped to Operation #2.
> 
> Glen
> 
> [1]
> http://www.ws-i.org/profiles/basicprofile-1.1-2004-08-24.html#Operation_Sig
> natures
> 
> On 10.02.2011 06:42, Fansi wrote:
> > Hi people,
> > 
> > I would like to know the impact of the absence of @Webservice
> > annotation in the implementation class of the webservice, given that
> > the interface is properly annotated.
> > 
> > While inspecting a service developped using CXF 2.2.3 I notice that
> > the implementation class hos no annotation, even the @webservice
> > annotation. The service is however exposed, but has abnormal behavior
> > such as returning the expected result to request 1 (which target
> > operation 1)  to request 2 which target operation 2 and vice versa.
> > 
> > If I am right,  CXF uses a MessageContext variable that is ThreadLocal
> > to allow safe concurrent access to web services. Is the absence of
> > @Webservice annotation the root cause of this malfunction? Of course,
> > I have already inserted that annotation, but given that the problem
> > does not occur everytime I want to be sure that I am on the right way
> > to solve it, thus this message.
> > 
> > Thank you in advance for your reply and for any hint you may give.
> > 
> > Cheers,
> > 
> > Maj

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message