【问题标题】:how can i get the service from wsdl generated by bepl如何从 bepl 生成的 wsdl 获取服务
【发布时间】:2012-12-08 14:06:13
【问题描述】:

我正在使用 flex 完成一个需要获取 web 服务的浏览器客户端,

     <s:WebService id="wsTest" wsdl="blablabla">

        <s:operation name="?" result="doResault(event)">

            <s:request>

            </s:request>

        </s:operation>

    </s:WebService>

但是问题来了,因为这个 wsdl 是由 BEPL 生成的,我在那里看不到操作名称,所以我该怎么办?

BEPL生成的wsdl如下,我删了很多东西: BEPL应该是个大函数,就是不知道bepl的入口在哪里,用什么方法

    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions>
    <wsdl:types>
    ...
    </wsdl:types>

    <wsdl:message name="mainRequest">
        <wsdl:part name="parameters" element="ns:main"/>
    </wsdl:message>
    ...
    <wsdl:portType name="PositioningWebServicePortType">
        <wsdl:operation name="main">
            <wsdl:input message="ns:mainRequest" wsaw:Action="urn:main"/>
        </wsdl:operation>
    <wsdl:operation name="training">
        <wsdl:input message="ns:trainingRequest" wsaw:Action="urn:training"/>
        <wsdl:output message="ns:trainingResponse" wsaw:Action="urn:trainingResponse"/>
        <wsdl:fault message="ns:IOException" name="IOException" wsaw:Action="urn:trainingIOException"/>
        <wsdl:fault message="ns:SQLException" name="SQLException" wsaw:Action="urn:trainingSQLException"/>
    </wsdl:operation>

    </wsdl:portType>

    <wsdl:binding name="PositioningWebServiceSoap11Binding" type="ns:PositioningWebServicePortType">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
        <wsdl:operation name="main">
            <soap:operation soapAction="urn:main" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
            </wsdl:operation>
        <wsdl:operation name="training">
             <soap:operation soapAction="urn:training" style="document"/>
                 <wsdl:input>
                    <soap:body use="literal"/>
                  </wsdl:input>
                  <wsdl:output>
                     <soap:body use="literal"/>
                  </wsdl:output>
        <wsdl:fault name="IOException">
            <soap:fault use="literal" name="IOException"/>
        </wsdl:fault>
        <wsdl:fault name="SQLException">
            <soap:fault use="literal" name="SQLException"/>
        </wsdl:fault>
    </wsdl:operation>


    </wsdl:binding>

    <wsdl:service name="PositioningWebService">

    </wsdl:service>
</wsdl:definitions>

【问题讨论】:

    标签: apache-flex wsdl


    【解决方案1】:

    您可以通过多种方式查看操作或集成服务。以下是一些帮助您入门的方法:

    1) 使用 Web 浏览器打开输出的 WSDL 的 URL。您可以通过它查看所有操作节点。在这些节点中,您将看到它需要的参数以及响应中的预期内容。

    2) 使用 FlashBuilder 中的数据连接功能。选择您的项目,然后选择 Data -> Connect to web service... 并按照向导导入 WSDL 并为您内省服务。然后您将看到所有操作等。然后它们可以用于数据绑定等。

    这是一个关于使用 WSDL、WebService 组件甚至使用操作和绑定的深入教程。 http://www.adobe.com/devnet/flex/videotraining/exercises/ex2_05_web.html

    【讨论】:

    • 是的,它适用于普通 wsdl...但是当我导入由 BEPL 生成的 wsdl 时(它可能与普通的略有不同),它不起作用
    • 好的,WSDL 应该是“标准的”。你能粘贴一个链接吗?通过一点谷歌搜索,我查看了 BEPL WSDL,我看到的那些看起来不错。也许发生了一些非标准的事情。
    • 是的,WSDL 中有大量的遗漏和错误。可以使用其他工具吗?这绝对是 BEPL WSDL 问题,而不是 flex 问题。
    猜你喜欢
    • 2010-11-26
    • 1970-01-01
    • 1970-01-01
    • 2010-11-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多