Java Mailing List Archive

http://www.gg3721.com/

Home » users.tapestry »

web service problem

Jun Tsai

2010-02-06

Replies: Find Java Web Hosting

Author LoginPost Reply
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
©2008 gg3721.com - Jax Systems, LLC, U.S.A.