Mocking a web service with SoupUI and using this in Visual Studyo
I want to use a mocked service in an enterprise project. So can I use Visual Studio to fetch data, get response from mocked service, when I have no connection to the actual service?
When I try this I get the error, "No connection coul开发者_JS百科d be made because the target machine actively refused it"
Or are you have another suggestion
Thank you...
This question might have the answer Quote:
Try File > Preferences > Proxy Settings Host 127.0.0.1 Port 8888
and use http://localhost./myservice/myservice.asmx
On the "another suggestion" front...
I had a similar requirement (discussed in this question) And chose not to use SOAPUI, but to get the service behind an interface, then use the real service as one implementation, and a mock service, which implements the same interface, as mock.
I wrote a blog post about how I did it here
精彩评论