Bom Dia Pessoal gostaria de saber se alguem pode me ajudar, estou tentando usar aqui no meu trabalho o Spring Remoting para distribuição de serviço, entretando não estou conseguindo usar. Estou usando Java 6 e Apache Tomcat 6.
Conforme algumas googlegadas eu encontrei o seguinte roteiro.
Na sua classe de serviço tem que estender a classe SpringBeanAutowiringSupport
você add o annotation @WebService e no método coloca @WebMethod
conforme código a baixo
[
package br.com…webservice;
import java.util.List;
import javax.jws.WebMethod;
import javax.jws.WebResult;
import javax.jws.WebService;
import org.springframework.web.context.support.SpringBeanAutowiringSupport;
import <a href="http://br.com">br.com</a>…entity.mmonline.Blog;
import <a href="http://br.com">br.com</a>…exception.ServiceException;
import <a href="http://br.com">br.com</a>…service.BlogService;
import <a href="http://br.com">br.com</a>…service.BlogServiceImpl;
@WebService(name = “blogWebService”, serviceName = “blogWebService”)
public class BlogWebServiceImpl extends SpringBeanAutowiringSupport implements
BlogWebService {
public BlogWebServiceImpl() {
super();
}
private BlogService blogService = new BlogServiceImpl();
@WebMethod(operationName = "getBlogs", action = "urn:getBlogs")
@WebResult(name = "blog")
public List<Blog> getBlogs() throws ServiceException {
return blogService.getBlogs();
}
}
]
No applicationContext.xml você irá colocar na configuração o <context:annotation-config /> para ele identificar a anotação.
A aplicação está subindo normalmente entretanto não estou conseguindo acessar o web service. Estou tentando acessar o serviço pelas URL.
http://localhost:8080/services/blogWebService
http://localhost:8080/blogWebService
[]'s
Danilo