Mule ESB-Web服务使用者-无法解析WSDL

Mule ESB-Web服务使用者-无法解析WSDL,mule,Mule,我在配置Web服务消费者时遇到了一些非常基本的问题,我希望有人能提供帮助 我正在使用 Anypoint Studio 2015年3月发布 版本:5.1.2 构建Id:201504301511 在Windows Vista上 我尝试使用的服务的WSDL是 <definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl" xmlns:tns="http://example.com/stockq

我在配置Web服务消费者时遇到了一些非常基本的问题,我希望有人能提供帮助

我正在使用 Anypoint Studio 2015年3月发布 版本:5.1.2 构建Id:201504301511 在Windows Vista上

我尝试使用的服务的WSDL是

<definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl" xmlns:tns="http://example.com/stockquote.wsdl" xmlns:xsd1="http://example.com/stockquote.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
  <types>
    <schema targetNamespace="http://example.com/stockquote.xsd" xmlns="http://www.w3.org/2000/10/XMLSchema">
      <element name="TradePriceRequest">
        <complexType>
          <all>
            <element name="tickerSymbol" type="string"/>
          </all>
        </complexType>
      </element>
      <element name="TradePrice">
        <complexType>
          <all>
            <element name="price" type="float"/>
          </all>
        </complexType>
      </element>
    </schema>
  </types>
  <message name="GetLastTradePriceInput">
    <part name="body" element="xsd1:TradePriceRequest"/>
  </message>
  <message name="GetLastTradePriceOutput">
    <part name="body" element="xsd1:TradePrice"/>
  </message>
  <portType name="StockQuotePortType">
    <operation name="GetLastTradePrice">
      <input message="tns:GetLastTradePriceInput"/>
      <output message="tns:GetLastTradePriceOutput"/>
    </operation>
  </portType>
  <binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="GetLastTradePrice">
      <soap:operation soapAction="http://example.com/GetLastTradePrice"/>
      <input>
        <soap:body use="literal"/>
      </input>
      <output>
        <soap:body use="literal"/>
      </output>
    </operation>
  </binding>
  <service name="StockQuoteService">
    <documentation>My first service</documentation>
    <port name="StockQuotePort" binding="tns:StockQuoteBinding">
      <soap:address location="http://localhost:8080/"/>
    </port>
  </service>
</definitions>

我的第一次发球
它是来自W3C站点的一个示例的副本,只修改了soap地址

我遇到的第一个问题是,在成功地将WDL文件导入mule项目后,我无法使用文件全局元素属性窗口使用文件浏览“按钮”填充WDSL位置文本框

单击“文件浏览”按钮可成功列出my mule项目中的所有*.wsdl文件,但选择其中任何一个都不会填充“wsdl位置”文本框

在项目中手动输入wsdl的文件路径似乎可以识别wsdl。它不再报告丢失的wsdl位置属性,并自动从wsdl(StockQuoteService)中的服务定义填充服务文本框。但是,端口(和地址)下拉列表不是从WSDL条目填充的

手动输入端口(StockQuotePort)会自动从WSDL填充地址文本框,但它会报告一个错误“Web服务使用者仅支持具有SOAP主体的端口”


如有任何帮助,我们将不胜感激。

ws-consumer也可与本地WSDL一起使用,并可在Mac上使用:

Anypoint Studio March 2015 Release
Version: 5.1.1
Build Id: 201504011500
可能是Windows Studio发行版的错误。但是,您也可以切换到XML视图并编辑ws-consumer-config以仅从类路径读取WSDL:

    <ws:consumer-config name="Web_Service_Consumer1"
        wsdlLocation="MyLocalWsdl.wsdl" service="ImportV200606" port="ImportV200606Soap"
        serviceAddress="https://MyLocalService/service.svc?responseTimeout=280000"
        doc:name="Web Service Consumer">
    </ws:consumer-config>


是的,我也有同样的问题,不过你可以试试这个。。。。我想知道WS-Consumer此时是否只与托管的wsdl一起工作……仅供参考,我能够使用