使用 SOAPUI 进行 servicestack webservice 测试

编程入门 行业动态 更新时间:2024-10-25 20:21:50
本文介绍了使用 SOAPUI 进行 servicestack webservice 测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用服务堆栈创建了一个服务,并想使用 SOAPUI 对其进行测试.当我使用 soap12 wsdl url [<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 [<developmenturl>/soap12], I keep getting the below error :

Mon Mar 13 15:14:29 GMT 2013:ERROR:Could not find element [{schemas.servicestack/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="www.w3/2003/05/soap-envelope" xmlns:typ="schemas.servicestack/types"> <soap:Header/> <soap:Body> <typ:requestDTOtype/> </soap:Body> </soap:Envelope>

任何帮助将不胜感激..

Any help will be much appreciated..

推荐答案

SOAPUI 似乎没有为 ServiceStack 生成正确的请求.ServiceStack 创建了 Soap1.2 请求的示例,它们可以在 metadata 页面中找到(例如 /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. <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="www.w3/2001/XMLSchema-instance" xmlns:xsd="www.w3/2001/XMLSchema" xmlns:soap12="www.w3/2003/05/soap-envelope"> <soap12:Body> <HelloText xmlns:i="www.w3/2001/XMLSchema-instance" xmlns="schemas.datacontract/2004/07/HelloWorld"> <Name>String</Name> </HelloText> </soap12:Body> </soap12:Envelope>

更多推荐

使用 SOAPUI 进行 servicestack webservice 测试

本文发布于:2023-10-29 10:29:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1539450.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:测试   SOAPUI   servicestack   webservice

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!