0 0

CXF中如何用一个address发布多个服务20

现在配置了两个CXF服务,发布地址分别为Helloworld和Welcome,这样我得发布两个wsdl
<jaxws:endpoint <br="">id="hello"
implementor="com.HellowordImpl"
address="/Helloworld">
</jaxws:endpoint>

<jaxws:endpoint <br="">id="welcome"
implementor="com.welcomeImpl"
address="/Welcome">
</jaxws:endpoint>

我如何通过一个地址来发布这两个服务呢,也就是我仅通过提供一个wsdl服务来提供客户调用.
2008年8月12日 18:48

1个答案 按时间排序 按投票排序

0 0

   这样写就可以了,我也是刚弄好这个问题!
    <bean id="helloService" class="com.kingtopware.service.impl.HelloWorldImpl" />
    <bean id="discountService" class="com.kingtopware.service.impl.DiscountImpl"></bean>

    <jaxws:server id="helloWebService" 
        serviceClass="com.kingtopware.service.HelloWorld" 
        address="/HelloWorld"> 
        <!-- 要暴露的 bean 的引用,上面定义的bean id -->
        <jaxws:serviceBean>     
            <ref bean="helloService"/> 
        </jaxws:serviceBean>
    </jaxws:server>
   
    <jaxws:server id="disWebService" 
        serviceClass="com.kingtopware.service.Discount" 
        address="/Discount"> 
        <!-- 要暴露的 bean 的引用,上面定义的bean id -->
        <jaxws:serviceBean>     
            <ref bean="discountService"/> 
        </jaxws:serviceBean>
    </jaxws:server>

2013年3月29日 09:43

相关推荐

Global site tag (gtag.js) - Google Analytics