问题描述
- 请问cxf怎么发布多个web服务?
-
请问cxf怎么发布多个服务cxf2.7或者cxf3.1.1
接口:
@WebService
public interface HelloService {...实现类:
@WebService(serviceName="helloService",endpointInterface="server.system.service.HelloService")
public class HelloServiceImpl implements HelloService {...另外一个接口和实现类省略.
spring里面的配置文件
<?xml version="1.0" encoding="UTF-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">implementor="server.system.service.impl.HelloServiceImpl"
address="/helloService">
jaxws:features/jaxws:features
/jaxws:endpoint<jaxws:endpoint id="nihaoservice" implementor="server.system.service.impl.NihaoServiceImpl" address="/nihaoservice"> <jaxws:features> <bean class="org.apache.cxf.feature.LoggingFeature" /> </jaxws:features> </jaxws:endpoint>
上面的配置2个web服务,启动报错 ,如果发布一个是没有问题。
如果有几百个web服务需要发布,这样配置在xml里面应该不可行,请问有什么好办法?
解决方案
http://www.iteye.com/problems/2631