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 4 ■ INSTALLING AND CREATING WCF SERVICES 129ramrameshreddy.blog.comIf you launch the ASP.NET development server and view TradeService.svc in the browser,you’ll see the error shown in Figure 4-8.Figure 4-8. Error page for nonserializable or missing data contractAt this point, WCF doesn’t know what to do. Therefore, let’s apply the Serializable attributeto the Trade type and take a look at the generated schema, as shown in Listing 4-15.Listing 4-15. Trade Type with the Serializable Attributenamespace ExchangeService{[Serializable]public class Trade{string _ticker;char _type;string _publisher;...To view the generated schema for the modified contract, first navigate to the following page:http://localhost:8888/ExchangeWeb/TradeService.svc?wsdl. Once at that page, if you locate theschema import, using the XPath /wsdl:definitions/wsdl:import, you’ll see another reference toa schema. You need to load that schema as well. That location should be, depending upon yourhost and IP port, as follows: http://localhost:8888/ExchangeWeb/TradeService.svc?wsdl=wsdl0.ramrameshreddyramrameshreddy■Note Again, you need to first open the base WSDL and search for the element, whichwill provide the correct location for the imported WSDL.

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

Saved successfully!

Ooh no, something went wrong!