首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >简单的WSDL,获取ConnectException

简单的WSDL,获取ConnectException
EN

Stack Overflow用户
提问于 2011-07-28 00:20:47
回答 1查看 5.6K关注 0票数 0

在WSDL最简单的事情上,我真的需要帮助。

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

代码语言:javascript
复制
<?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 Services Explorer“测试服务时,我总是得到以下异常:

代码语言:javascript
复制
IWAB0135E An unexpected error has occurred.
java.net.ConnectException
Connection refused: connect

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

提前做好准备,马特

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-07-28 00:27:49

可能是因为http://localhost:8197/MyFirstService/没有从您呼叫的位置应答。

您可以尝试通过the或简单地在浏览器窗口中输入地址来检查这一点。

尽管它是本地主机,但您应该知道是否启动了服务器,即是否接受web服务客户端。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6847809

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档