代码之家  ›  专栏  ›  技术社区  ›  Arthur

SOAPUI错误:未关闭标记

  •  0
  • Arthur  · 技术社区  · 8 年前

    当使用以下URL(在我自己网络中的服务器上)启动SOAPUI SOAP项目(从我的本地计算机)时: http://myinternaldomainname/test2?wsdl

    加载时出错[ http://myinternaldomainname/test2?wsdl] : 错误:不关闭标记

    服务器已添加到“我的主机”文件:

    192.168.2.1 myexampledomain
    

    当我将WSDL页面的结果存储为WSDL文件时,我可以将WSDL文件作为新的SOAP项目打开。

    我使用Zend\Soap\Autodiscovery生成这个WSDL:

    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://myexampledomain/test2" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" name="MySoapService" targetNamespace="http://myexampledomain/test2">
        <types>
            <xsd:schema targetNamespace="http://myexampledomain/test2"/>
        </types>
        <portType name="MySoapServicePort">
            <operation name="method1">
                <documentation>This method takes ...</documentation>
                <input message="tns:method1In"/>
                <output message="tns:method1Out"/>
            </operation>
            <operation name="method2">
                <documentation>This method takes ...</documentation>
                <input message="tns:method2In"/>
                <output message="tns:method2Out"/>
            </operation>
        </portType>
        <binding name="MySoapServiceBinding" type="tns:MySoapServicePort">
            <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
            <operation name="method1">
                <soap:operation soapAction="http://myexampledomain/test2#method1"/>
                <input>
                    <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://myexampledomain/test2"/>
                </input>
                <output>
                    <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://myexampledomain/test2"/>
                </output>
            </operation>
            <operation name="method2">
                <soap:operation soapAction="http://myexampledomain/test2#method2"/>
                <input>
                    <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://myexampledomain/test2"/>
                </input>
                <output>
                    <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://myexampledomain/test2"/>
                </output>
            </operation>
        </binding>
        <service name="MySoapServiceService">
            <port name="MySoapServicePort" binding="tns:MySoapServiceBinding">
                <soap:address location="http://myexampledomain/test2"/>
            </port>
        </service>
        <message name="method1In">
            <part name="inputParam" type="xsd:int"/>
        </message>
        <message name="method1Out">
            <part name="return" type="xsd:string"/>
        </message>
        <message name="method2In">
            <part name="inputParam1" type="xsd:int"/>
            <part name="inputParam2" type="xsd:string"/>
        </message>
        <message name="method2Out">
            <part name="return" type="xsd:float"/>
        </message>
    </definitions>
    

    在SOAPUI中,我尝试了禁用代理/启用代理/自动代理

    3 回复  |  直到 8 年前
        1
  •  1
  •   Oranit Dar    5 年前

    如果有人遇到这个问题,对我有效的方法是按CTRL+ALT+P并将代理设置设置为“无”

        2
  •  0
  •   Arthur    8 年前

    问题的原因是登录页面阻止我在SOAP UI中使用WSDL。

        3
  •  0
  •   Imran Sabir    4 年前

    请使用CTRL+ALT+P禁用代理,并禁用系统防火墙。希望它能起作用。