java - SOAP UI 中未弹出“请求”选项卡

标签 java web-services soap wsdl soapui

我有一个 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 项目,但我得到了这个:

enter image description here

如果您查看下面的项目,就会发现有一个“请求 1”图标。下面的项目是另一个开发人员创建的,所以我不知道他是怎么做到的。为什么我的项目中没有这样的图标?

我从这里获取了 wsdl:enter link description here

最佳答案

导入 WSDL 时,您需要选择“为所有操作创建示例请求”。请参阅official docs .

或者,您可以通过右键单击并创建示例请求来手动创建它。

关于java - SOAP UI 中未弹出“请求”选项卡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59312082/

相关文章:

asp.net - 无法将类型 'System.Data.DataSet' 隐式转换为 'string'

java - 列表碰撞检测的最快方法?

java - 为什么我不能在运行时访问我的 Eclipse 插件的类?

java - POI 说单元格是空的,但单元格有一个值

java - 反转数组的问题

web-services - 使用 Seam 的 Web 服务

java - 从 wsdl 创建模拟 soap web 服务 - Java

java - 如何动态指定Spring Restful WebService URL?

php - iOS NSURLConnection - 响应中的错误描述

c# - 添加服务引用 : Ordering of Serialization Fields