我有一个 Web 服务,我正在尝试使用 SOAP UI 来测试它。这是我的 wsdl:
<definitions name = "HelloService"
targetNamespace = "http://www.examples.com/wsdl/HelloService.wsdl"
xmlns = "http://schemas.xmlsoap.org/wsdl/"
xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns = "http://www.examples.com/wsdl/HelloService.wsdl"
xmlns:xsd = "http://www.w3.org/2001/XMLSchema">
<message name = "SayHelloRequest">
<part name = "firstName" type = "xsd:string"/>
</message>
<message name = "SayHelloResponse">
<part name = "greeting" type = "xsd:string"/>
</message>
<portType name = "Hello_PortType">
<operation name = "sayHello">
<input message = "tns:SayHelloRequest"/>
<output message = "tns:SayHelloResponse"/>
</operation>
</portType>
<binding name = "Hello_Binding" type = "tns:Hello_PortType">
<soap:binding style = "rpc"
transport = "http://schemas.xmlsoap.org/soap/http"/>
<operation name = "sayHello">
<soap:operation soapAction = "sayHello"/>
<input>
<soap:body
encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"
namespace = "urn:examples:helloservice"
use = "encoded"/>
</input>
<output>
<soap:body
encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"
namespace = "urn:examples:helloservice"
use = "encoded"/>
</output>
</operation>
</binding>
<service name = "Hello_Service">
<documentation>WSDL File for HelloService</documentation>
<port binding = "tns:Hello_Binding" name = "Hello_Port">
<soap:address
location = "http://www.examples.com/SayHello/" />
</port>
</service>
</definitions>
我可以通过localhost:8080/testws.wsdl
访问它。现在我想测试一下。我在 SOAP UI
中创建了一个新的 SOAP 项目,但我得到了这个:
如果您查看下面的项目,就会发现有一个“请求 1”图标。下面的项目是另一个开发人员创建的,所以我不知道他是怎么做到的。为什么我的项目中没有这样的图标?
我从这里获取了 wsdl:enter link description here
最佳答案
导入 WSDL 时,您需要选择“为所有操作创建示例请求”。请参阅official docs .
或者,您可以通过右键单击并创建示例请求来手动创建它。
关于java - SOAP UI 中未弹出“请求”选项卡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59312082/