11.07.2015 Views

y - Net Developer

y - Net Developer

y - Net Developer

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 3 ■ EXPLORING THE WCF PROGRAMMING MODEL 89ramrameshreddy.blog.comFigure 3-10. The metadata page for the trade serviceIn addition, it is possible to enable or disable the publication of this metadata through aWS-MetadataExchange (WS-MEX) request. If you know your consumers and handed themyour metadata, it is a viable option not to allow others to retrieve the metadata. By defaultwhen adding a baseAddress to your service, just like we did in several of our samples, theServiceMetadataBehavior is added automatically to the Behaviors collection. As expected, youcan change this behavior either through configuration or by using imperative code. This wayyou can appropriately set the properties (httpGetEnabled and httpHelpPageEnabled) of theclass. Of course, the best way to do this is by using a configuration file, as in the sample configurationfile shown in Listing 3-19. You can retrieve the metadata (WSDL) by retrieving the baseaddress appended with ?wsdl. For example:http://localhost:8080/QuickReturn?wsdlRetrieving the base address in a browser results in Figure 3-10 being shown.ramrameshreddyramrameshreddy

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!