This print for content only-size & color not accurate 7" X 9-1/4" / casebound / malloy



Download 21,46 Mb.
Pdf ko'rish
bet1725/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   1721   1722   1723   1724   1725   1726   1727   1728   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition

// To simulate a lengthy request. 

System.Threading.Thread.Sleep(5000);

return x + y;

}

}



}

Finally, open the supplied App.config file and replace all occurrences of IService1 with

IBasicMath, and all occurrences of Service1 with MathService. As well, take a moment to notice that

this *.config file has already been enabled to support MEX, and by default it is making use of the

wsHttpBinding protocol. 

Testing the WCF Service with WcfTestClient.exe

One benefit of using the WCF Service Library project is that when you debug or run your library, it

will read the settings in the *.config file and use them to load the WCF Test Client application

(WcfTestClient.exe). This GUI-based application allows you to test each member of your service

interface as you build the WCF service, rather than having to manually build a host/client as you

did previously simply for testing purposes. 

Figure 25-12 shows the testing environment for MathService. Notice that when you double-

click an interface method, you are able to specify input parameters and invoke the member. 

While this utility works out of the box when you have created a WCF Service Library project, be

aware that you can use this tool to test any WCF service when you start it at the command line by

specifying a MEX endpoint. For example, if you were to start the MagicEightBallServiceHost.exe

application, you would be able to specify the following command within a Visual Studio 2008 com-

mand prompt:

wcftestclient http://localhost:8080/MagicEightBallService

C H A P T E R   2 5  

I N T R O D U C I N G  W I N D O W S   C O M M U N I C AT I O N   F O U N D AT I O N



901

8849CH25.qxd  10/16/07  10:51 AM  Page 901




Figure 25-12.

Testing the WCF service using WcfTestClient.exe

Once you do, you will be able to invoke ObtainAnswerToQuestion() in a similar manner. 




Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   1721   1722   1723   1724   1725   1726   1727   1728   ...   1830




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2025
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish