soapUI与Fiddler结合使用

来源:互联网 发布:兆讯恒达微电子 知乎 编辑:程序博客网 时间:2024/06/03 17:36

Testing and Monitoring WCF Service using soapUI and Fiddler

By Dinesh K Mandal8 Sep 2011
 
Rate this:
vote 1vote 2vote 3vote 4vote 5
 

This article is not about understanding the details of .NET WCF service, soapUI and Fiddler as all these three are quite popular things among .NET developers. And tools like soapUI and Fiddler may already be in the arsenal of many web developers and QA engineers. Those who are new to these two tools should refer to following articles:

  • soapUI - SOA Tutorial
  • Fiddler - Fiddler Tool and ASP.NET Applications and Fiddler in Action – Part 1

However, we will take a look into how Fiddler can be used to Monitor SOAP Request and SOAP Response transmitting behind the soapUI.

Let’s start with a simple WCF service in place. No need to have a WCF .NET Client as of now to test and monitor HTTP traffic of WCF service calls.

  1. Open soapUI and set the following settings. Make sure the service’s wsdl path is correct.

    Loading wsdl definition

  2. After loading the definition of WSDL, service definitions will appear like shown below:

    Service requests definitions

  3. Double click on Request # node and navigate to the request window on the right.

    Submitting the request

  4. Fill the method parameters denoted by “?”.
  5. Open Fiddler and make sure it is ready to capture HTTP(S) traffic.
  6. Submit request to the specified endpoint and SOAP Response can be seen on the right pane.

    Service Request-Response in soapUI

  7. If you see the Fiddler window, there is no traffic captured. This is really frustrating if you have been testing your services using soapUI when you do not see the underlying details of the SOAP Request and SOAP Response in the wire.
  8. All you need to do following proxy settings in the soapUI File –> Preferences –> Proxy Settings window.

    soapUI Proxy Settings

  9. Re-submit web service request on soapUI.
  10. Now you see WCF Request-Response traffic in the Fiddler window Smile. You are now all in your territory to view the details of service request-response headers, body, and many more!

    SOAP Request-Response view in Fiddler

But why did we add Port No. 8888 in the proxy settings of soapUI? It is because Fiddler by default listens on port no. 8888.

Fiddler default listening port no.

If you have configured your Fiddler proxy tool to listen on some other port number, then you should use that one.

I hope you enjoyed this testing tip. No need to reiterate how blissful it is to test web services using soapUI and Fiddler if you are a web service developer/provider to remote clients.

1 0