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