You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Fansi <jm...@gmail.com> on 2011/02/10 12:42:59 UTC
What if the @webservice annotation is not present in the
implementation class
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
Re: What if the @webservice annotation is not present in the implementation class
Posted by Daniel Kulp <dk...@apache.org>.
On Thursday 10 February 2011 6:42:59 am 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.
With or without annotation should definitely not affect that. That would be
really bad. Is this reproducible in a test case at all? I'd like to see it
if it is.
Dan
> 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
Re: What if the @webservice annotation is not present in the
implementation class
Posted by Fansi <jm...@gmail.com>.
Thank you guys for your inputs.
Every operation in the wsdl has its own signature. More importantly
the names, the arguments and the return types of all operation are
different from one to another.
We haven't yet reproduce this bug on the developement, and
pre-production environment. What's scaring is that the client has
already put his application in production and it is there that the
problem is reported and yes we can reproduce it when sending requests
to Production.
We are also thinking about a network issue.
We are going to deploy to the production environnement (we can't
actually replicate that environnment) of the amended version of the
app with @Webservice in the implementation class and run the test
again. Even if the message by Dan commands us to look for the cause
elsewhere.
Will appreciate any hint as to where the issue may live.
Thank you again,
Maj
On 10 February 2011 20:37, Daniel Kulp <dk...@apache.org> wrote:
> 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
>
Re: What if the @webservice annotation is not present in the implementation class
Posted by Daniel Kulp <dk...@apache.org>.
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
Re: What if the @webservice annotation is not present in the implementation
class
Posted by Glen Mazza <gm...@talend.com>.
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. 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_Signatures
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
--
Glen Mazza
Software Engineer, Talend (http://www.talend.com)
blog: http://www.jroller.com/gmazza