【问题标题】:cxf webservice over jms, how to get wsdlcxf webservice over jms,如何获取 wsdl
【发布时间】:2013-09-17 23:13:19
【问题描述】:

我有一个这样配置的网络服务。

<jaxws:endpoint 
    id="helloWorld"
    xmlns:hello="http://service.test.com/"
    serviceName="hello:MyServiceImplService"
    endpointName="hello:MyServiceImplPort" address="jms://"
    implementor="com.test.service.MyServiceImpl" >
        <jaxws:features>          
            <bean class="org.apache.cxf.feature.LoggingFeature" />      
            <bean class="org.apache.cxf.transport.jms.JMSConfigFeature">
                <property name="jmsConfig" ref="jmsConfig"/>
            </bean>
        </jaxws:features>
  </jaxws:endpoint>`

我想让 cxf 为我生成 wsdl。当服务是http时,我可以从http://localhost:8080/server/hello?wsdl这样的url访问wsdl,在我将传输更改为jms后,我如何访问wsdl?我需要发送什么 jms 消息来获取 wsdl。或者我必须先编写 wsdl 并通过常规的 http 请求公开它。我问这个是因为客户端需要知道 wsdl 才能获取所有类型和绑定信息来生成类。客户端应该已经知道如何连接队列。

【问题讨论】:

    标签: web-services jms cxf


    【解决方案1】:

    您可以使用命令行 java2ws 工具(请参阅http://cxf.apache.org/docs/java-to-ws.html)将您的实现类传递给它。还有一个来自 Ant 脚本的示例调用。它将生成 WSDL,您的客户端可以使用它来生成客户端代码。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-20
      • 2016-12-07
      • 1970-01-01
      相关资源
      最近更新 更多