SOAPUI:在 [文件 ...\test.wsdl] 中找不到要导入的内容

SOAPUI: Found nothing to import in [file ...\test.wsdl]

谁能告诉我如何解决这个 XSD 和 WSDL:

XSD:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="testRequest">
    <xs:complexType>
      <xs:sequence>
        <xs:element type="xs:string" name="BETA"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

WSDL:

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="test" 
    targetNamespace="http://www.examples.com/wsdl/test" 
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
    xmlns:tns="http://www.examples.com/wsdl/test"   
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <wsdl:types>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" namespace="http://www.examples.com/wsdl/test">
        <xs:import namespace="http://www.examples.com/wsdl/test" schemaLocation="../wsdl/testRequest.xsd"/>
    </xs:schema>
  </wsdl:types>
   <wsdl:message name="testRequest">
      <wsdl:part name="testRequest" element="testsRequest"/>
   </wsdl:message>
</wsdl:definitions>

SOAPUI 错误:

Found nothing to import in [file ...\test.wsdl]

我该如何解决这个问题?

您的 WSDL 中缺少一些元素。

WSDL 基本上包括; 定义, 类型, 信息, 端口类型, 捆绑, 服务与 端口

理解这一点的最简单方法是遵循 https://www.tutorialspoint.com/wsdl/wsdl_example.htm

这样的示例

尝试在您的 SoapUI 中加载它。确认一切正常,然后开始尝试各种元素以查看它们的作用。