【问题标题】:Simple WSDL, getting a ConnectException简单的 WSDL,得到一个 ConnectException
【发布时间】:2011-10-14 10:30:34
【问题描述】:

在最简单的 WSDL 方面我真的需要帮助。

我得到了以下 WSDL,它基本上只是生成的代码:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="MyFirstWSDL"
    targetNamespace="http://www.example.org/MyFirstWSDL/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://www.example.org/MyFirstWSDL/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        targetNamespace="http://www.example.org/MyFirstWSDL/">
        <xsd:element name="getName">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element name="in" type="xsd:string"></xsd:element>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
        <xsd:element name="getNameResponse">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element name="out" type="xsd:string"></xsd:element>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
    </xsd:schema>
</wsdl:types>

<wsdl:message name="getNameRequest">
    <wsdl:part name="parameters" element="tns:getName"></wsdl:part>
</wsdl:message>

<wsdl:message name="getNameResponse">
    <wsdl:part name="parameters" element="tns:getNameResponse"></wsdl:part>
</wsdl:message>

<wsdl:portType name="MyFirstInterface">
    <wsdl:operation name="getName">
        <wsdl:input message="tns:getNameRequest"></wsdl:input>
        <wsdl:output message="tns:getNameResponse"></wsdl:output>
    </wsdl:operation>
</wsdl:portType>

<wsdl:binding name="NewBinding" type="tns:MyFirstInterface">
    <soap:binding style="document"
        transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="getName">
        <soap:operation
            soapAction="http://www.example.org/MyFirstWSDL/getName" />
        <wsdl:input>
            <soap:body use="literal" />
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" />
        </wsdl:output>
    </wsdl:operation>
</wsdl:binding>
<wsdl:service name="MyFirstService">
    <wsdl:port name="MyFirstPort" binding="tns:NewBinding">
        <soap:address location="http://localhost:8197/MyFirstService/" />
    </wsdl:port>
</wsdl:service>

现在,在生成提供程序并使用“Web 服务资源管理器”测试服务时,我不断收到以下异常:

IWAB0135E An unexpected error has occurred.
java.net.ConnectException
Connection refused: connect

那么,你有什么解决这个问题的线索或建议吗?

提前谢谢,马特

【问题讨论】:

    标签: eclipse wsdl soa


    【解决方案1】:

    可能是因为http://localhost:8197/MyFirstService/ 没有从你打电话的地方接听。

    您可以尝试通过远程登录或简单地将地址放在浏览器窗口中来检查这一点。

    虽然是本地主机,但你应该知道你是否启动了服务器,即接受网络服务客户端。

    【讨论】:

    • 将其放入浏览器窗口时出现 404。但这应该没问题,因为 Web 服务资源管理器在这里做了一些神奇的事情;)我用给定的 WSDL 进行了尝试,设置相同,它可以工作,只是我自己编写的版本没有
    • 我也遇到了同样的问题,能详细解答吗?
    猜你喜欢
    • 1970-01-01
    • 2014-12-21
    • 2016-04-28
    • 1970-01-01
    • 1970-01-01
    • 2012-05-23
    • 2011-09-05
    • 2019-10-11
    • 1970-01-01
    相关资源
    最近更新 更多