使用 SOAPUI 进行 servicestack webservice 测试 [英] servicestack webservice testing with SOAPUI

查看:31
本文介绍了使用 SOAPUI 进行 servicestack webservice 测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用服务堆栈创建了一个服务,并想使用 SOAPUI 对其进行测试.当我使用 soap12 wsdl url [http://<developmenturl>/soap12] 设置 SOAPUI 项目时,我不断收到以下错误:

I have created a service using Service Stack and would like to test it using SOAPUI. When I setup the SOAPUI project with the soap12 wsdl url [http://<developmenturl>/soap12], I keep getting the below error :

Mon Mar 13 15:14:29 GMT 2013:ERROR:Could not find element [{http://schemas.servicestack.net/types}<requestDTOobject>] specified in part [parameters]

最初我将 DTO 放在不同的命名空间下,由于上述错误消息,我将 DTO 对象更改为与服务位于同一命名空间中但我仍然收到此错误.

Initially I had the DTO under a different name space, due to the above error message I changed the DTO object to be in the same namespace as the service but still I get this error.

我已在生成的请求下方粘贴:

I have pasted below the request generated:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:typ="http://schemas.servicestack.net/types">
   <soap:Header/>
   <soap:Body>
      <typ:requestDTOtype/>
   </soap:Body>
</soap:Envelope>

任何帮助将不胜感激..

Any help will be much appreciated..

推荐答案

SOAPUI 似乎没有为 ServiceStack 生成正确的请求.ServiceStack 创建了 Soap1.2 请求的示例,它们可以在 metadata 页面中找到(例如 http:///metadata).要查找对您的操作"的请求,请单击元数据页面上它右侧的 SOAP 1.2 链接.您应该能够将此请求复制/替换到 SOAPUI 请求窗口的左窗格中.

It doesn't appear that SOAPUI is generating the correct request for ServiceStack. ServiceStack creates samples of the Soap1.2 requests and they can be found in metadata page (eg. http://<developmenturl>/metadata). To find the request for your 'Operation' click the SOAP 1.2 link to the right of it on the metadata page. You should be able to copy/replace this request into left pane of the SOAPUI request window.

HelloWorld SOAP 1.2 请求示例

<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>

<HelloText xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HelloWorld">
  <Name>String</Name>
</HelloText>

    </soap12:Body>
</soap12:Envelope>

这篇关于使用 SOAPUI 进行 servicestack webservice 测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆