我使用服务堆栈创建了一个服务,并想使用 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 测试
发布评论