servicestack webservice testing with SOAPUI

南楼画角 提交于 2019-12-02 02:10:55

问题


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]

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..


回答1:


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.

Sample of the HelloWorld SOAP 1.2 request

<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>


来源:https://stackoverflow.com/questions/15480563/servicestack-webservice-testing-with-soapui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!