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 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示