I am assuming that your WCF web service is already built and ready to test. Please refer my previous post on how to Create a WCF Web Service in Visual Studio 2010
Before proceeding with wcftestclient utility, you must know the URL of your WCF web service. Execute the web service you created and then you will get your WCF web service URL from following screen –
 |
| WCF Web Service - WCF Web Service Interface |
1) Once you get WCF service URL. Start a visual studio command prompt. In windows 7 OS, to start Visual Studio command prompt goto Start -> All Programs -> Microsoft Visual Studio 2010 -> Visual Studio Tools -> Visual Studio Command Prompt (2010)
You will get following command prompt.
 |
| WCF Web Service - Visual Studio 2010 Command Prompt. |
2) Type wcftestclient and hit enter/return key.
 |
| WCF Web Service - Visual Studio 2010 Command Prompt. |
3) A WcfTestClient user interface will open in another windows.
 |
| WCF Web Service - WCfTestClient User Interface. |
4) Goto File -> Add Service.. menu.
 |
| WCF Web Service - WCfTestClient User Interface. |
5) Type your WCF web service URL in the Add Service dialog box and click OK button.
 |
| WCF Web Service - WCfTestClient Add service User Interface. |
6) After some processing you will get following WCF Test Client user interface.
All your web methods will appear on the left pane under My Service Projects.
 |
| WCF Web Service - WcfTestClient - Web Methods. |
7) Double click on any of the web method. In our case, double clicking on “WelComeMessage” web method will display request and response interface on right pane.
 |
| WCF Web Service - WCfTestClient - Request. |
8) Double Click on value field(null) and type your name. I am giving here value as “Brad Pitt” for name variable.
 |
| WCF Web Service - WCfTestClient -Response. |
Now click on “Invoke” button. And check the response, it will show you the response from your web method.
9) Similarly double click on other web methods on the left pane. The corresponding request and response interface will open in right pane.
Related Posts : WCF,
Web Service Hosting
thank you very much, good article
ReplyDeleteVery helpful..thank U
ReplyDelete