You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jun Tsai <ju...@gmail.com> on 2010/02/07 05:52:37 UTC
web service problem
hi,all
I want to export tapestry service as web service.
ServiceActivityScoreboard sas =
registry.getService(ServiceActivityScoreboard.class);
List<ServiceActivity> activities = sas.getServiceActivity();
for(ServiceActivity activity:activities){
Class<?> serviceInterface = activity.getServiceInterface();
WebService annotation = serviceInterface.getAnnotation(WebService.class);
if (annotation != null) {
Endpoint endpoint = Endpoint.create(registry.getService(serviceInterface));
String fullAddress = baseAddress + annotation.serviceName();
endpoint.publish(fullAddress);
}
}
I find exception is thrown.
Exception in thread "main" java.lang.IllegalArgumentException: class
$DataQueryService_126a6c0531a has neither @WebSerivce nor
@WebServiceProvider annotation
at
com.sun.xml.internal.ws.server.EndpointFactory.verifyImplementorClass(EndpointFactory.java:277)
at
com.sun.xml.internal.ws.transport.http.server.EndpointImpl.getPrimaryWsdl(EndpointImpl.java:273)
at
com.sun.xml.internal.ws.transport.http.server.EndpointImpl.createEndpoint(EndpointImpl.java:213)
at
com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:143)
I think the service is enhanced lost the @WebService annotation .
give me some advice?
thanks
--
regards,
Jun Tsai
Re: web service problem
Posted by Jun Tsai <ju...@gmail.com>.
JAX-WS
2010/2/9 Peter Stavrinides <P....@albourne.com>
> Jun, what does your binding look like?
>
> regards,
> Peter
>
>
> ----- Original Message -----
> From: "Jun Tsai" <ju...@gmail.com>
> To: "Tapestry users" <us...@tapestry.apache.org>
> Sent: Tuesday, 9 February, 2010 07:08:18 GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: Re: web service problem
>
> 2010/2/8 Peter Stavrinides <P....@albourne.com>
>
> > > Currently, Tapestry-IoC doesn't copy the annotations put in the service
> > > implementation class and methods to the generated proxy. A workaround
> is
> > > to put the annotation in the service interface.
> > Do you mean put it in the implementation class rather? just tested it and
> > it seems to work in the implementation class but not when annotating in
> the
> > proxy!
> >
> > i.e. this works:
> > @WebService(serviceName="myService")
> > public class MyServiceImpl{
> >
> > }
> >
> > but not:
> > public class SpotfireConnectImpl implements ServiceInterface{
> >
> > }
> >
> > @WebService(serviceName="myService")
> > public interface ServiceInterface {
> >
> > }
> >
> >
> I had tested it ,put the @WebService in implemention class,but it doesn't
> work.
>
> > regards,
> > Peter
> >
> > --
> > If you are not an intended recipient of this e-mail, please notify the
> > sender, delete it and do not read, act upon, print, disclose, copy,
> retain
> > or redistribute it. Please visit http://www.albourne.com/email.html for
> > important additional terms relating to this e-mail.
> >
> > ----- Original Message -----
> > From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
> > To: "Tapestry users" <us...@tapestry.apache.org>
> > Sent: Monday, 8 February, 2010 14:02:51 GMT +02:00 Athens, Beirut,
> > Bucharest, Istanbul
> > Subject: Re: web service problem
> >
> > On Sun, 07 Feb 2010 02:52:37 -0200, Jun Tsai <ju...@gmail.com> wrote:
> >
> > > hi,all
> >
> > Hi!
> >
> > > Exception in thread "main" java.lang.IllegalArgumentException: class
> > > $DataQueryService_126a6c0531a has neither @WebSerivce nor
> > > @WebServiceProvider annotation
> >
> > Currently, Tapestry-IoC doesn't copy the annotations put in the service
> > implementation class and methods to the generated proxy. A workaround is
> > to put the annotation in the service interface.
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> > and instructor
> > Owner, software architect and developer, Ars Machina Tecnologia da
> > Informação Ltda.
> > http://www.arsmachina.com.br
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> regards,
> Jun Tsai
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
regards,
Jun Tsai
Re: web service problem
Posted by Peter Stavrinides <P....@albourne.com>.
Jun, what does your binding look like?
regards,
Peter
----- Original Message -----
From: "Jun Tsai" <ju...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Tuesday, 9 February, 2010 07:08:18 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: web service problem
2010/2/8 Peter Stavrinides <P....@albourne.com>
> > Currently, Tapestry-IoC doesn't copy the annotations put in the service
> > implementation class and methods to the generated proxy. A workaround is
> > to put the annotation in the service interface.
> Do you mean put it in the implementation class rather? just tested it and
> it seems to work in the implementation class but not when annotating in the
> proxy!
>
> i.e. this works:
> @WebService(serviceName="myService")
> public class MyServiceImpl{
>
> }
>
> but not:
> public class SpotfireConnectImpl implements ServiceInterface{
>
> }
>
> @WebService(serviceName="myService")
> public interface ServiceInterface {
>
> }
>
>
I had tested it ,put the @WebService in implemention class,but it doesn't
work.
> regards,
> Peter
>
> --
> If you are not an intended recipient of this e-mail, please notify the
> sender, delete it and do not read, act upon, print, disclose, copy, retain
> or redistribute it. Please visit http://www.albourne.com/email.html for
> important additional terms relating to this e-mail.
>
> ----- Original Message -----
> From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
> To: "Tapestry users" <us...@tapestry.apache.org>
> Sent: Monday, 8 February, 2010 14:02:51 GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: Re: web service problem
>
> On Sun, 07 Feb 2010 02:52:37 -0200, Jun Tsai <ju...@gmail.com> wrote:
>
> > hi,all
>
> Hi!
>
> > Exception in thread "main" java.lang.IllegalArgumentException: class
> > $DataQueryService_126a6c0531a has neither @WebSerivce nor
> > @WebServiceProvider annotation
>
> Currently, Tapestry-IoC doesn't copy the annotations put in the service
> implementation class and methods to the generated proxy. A workaround is
> to put the annotation in the service interface.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
regards,
Jun Tsai
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: web service problem
Posted by Jun Tsai <ju...@gmail.com>.
2010/2/8 Peter Stavrinides <P....@albourne.com>
> > Currently, Tapestry-IoC doesn't copy the annotations put in the service
> > implementation class and methods to the generated proxy. A workaround is
> > to put the annotation in the service interface.
> Do you mean put it in the implementation class rather? just tested it and
> it seems to work in the implementation class but not when annotating in the
> proxy!
>
> i.e. this works:
> @WebService(serviceName="myService")
> public class MyServiceImpl{
>
> }
>
> but not:
> public class SpotfireConnectImpl implements ServiceInterface{
>
> }
>
> @WebService(serviceName="myService")
> public interface ServiceInterface {
>
> }
>
>
I had tested it ,put the @WebService in implemention class,but it doesn't
work.
> regards,
> Peter
>
> --
> If you are not an intended recipient of this e-mail, please notify the
> sender, delete it and do not read, act upon, print, disclose, copy, retain
> or redistribute it. Please visit http://www.albourne.com/email.html for
> important additional terms relating to this e-mail.
>
> ----- Original Message -----
> From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
> To: "Tapestry users" <us...@tapestry.apache.org>
> Sent: Monday, 8 February, 2010 14:02:51 GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: Re: web service problem
>
> On Sun, 07 Feb 2010 02:52:37 -0200, Jun Tsai <ju...@gmail.com> wrote:
>
> > hi,all
>
> Hi!
>
> > Exception in thread "main" java.lang.IllegalArgumentException: class
> > $DataQueryService_126a6c0531a has neither @WebSerivce nor
> > @WebServiceProvider annotation
>
> Currently, Tapestry-IoC doesn't copy the annotations put in the service
> implementation class and methods to the generated proxy. A workaround is
> to put the annotation in the service interface.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
regards,
Jun Tsai
Re: web service problem
Posted by Peter Stavrinides <P....@albourne.com>.
> Currently, Tapestry-IoC doesn't copy the annotations put in the service
> implementation class and methods to the generated proxy. A workaround is
> to put the annotation in the service interface.
Do you mean put it in the implementation class rather? just tested it and it seems to work in the implementation class but not when annotating in the proxy!
i.e. this works:
@WebService(serviceName="myService")
public class MyServiceImpl{
}
but not:
public class SpotfireConnectImpl implements ServiceInterface{
}
@WebService(serviceName="myService")
public interface ServiceInterface {
}
regards,
Peter
--
If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail.
----- Original Message -----
From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Monday, 8 February, 2010 14:02:51 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: web service problem
On Sun, 07 Feb 2010 02:52:37 -0200, Jun Tsai <ju...@gmail.com> wrote:
> hi,all
Hi!
> Exception in thread "main" java.lang.IllegalArgumentException: class
> $DataQueryService_126a6c0531a has neither @WebSerivce nor
> @WebServiceProvider annotation
Currently, Tapestry-IoC doesn't copy the annotations put in the service
implementation class and methods to the generated proxy. A workaround is
to put the annotation in the service interface.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da
Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: web service problem
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Sun, 07 Feb 2010 02:52:37 -0200, Jun Tsai <ju...@gmail.com> wrote:
> hi,all
Hi!
> Exception in thread "main" java.lang.IllegalArgumentException: class
> $DataQueryService_126a6c0531a has neither @WebSerivce nor
> @WebServiceProvider annotation
Currently, Tapestry-IoC doesn't copy the annotations put in the service
implementation class and methods to the generated proxy. A workaround is
to put the annotation in the service interface.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da
Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org