hfq01 2015-07-21 16:08 采纳率: 0%
浏览 2893

请问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里面应该不可行,请问有什么好办法?

  • 写回答

1条回答 默认 最新

  • threenewbee 2015-07-21 22:16
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题