strAppId + ; + strCertId) web.Headers.Add( X-EBAY-API-DEV-NAME , strDevId) web.Headers.Add( X-EBAY-API-APP-NAME ,
Figure 5-10Executing a Query Using SOAPAs you learned in Chapter 1, when you call a Web API over SOAP, you specify the location of the WSDLfile so your application knows how the Web API functions. The WSDLfile for the eBay API is currentlylocated at: http://developer.ebay.com/webservices/latest/eBaySvc.wsdl The WSDLfile is then interpreted by your programming language, such as Visual Studio .NET, to allowyou to refer to the API in a more object-oriented fashion in your code. In other words, by using theSOAPprotocol to execute eBay calls, you can work with the results without having to parse XML. Let slook at an example of how this works. Walkthrough Example Calling the eBay API Using SOAP from Visual Studio .NETYou can extend the prior example to add the functionality to call the eBay API using SOAP. Because youare using SOAPinstead of HTTP-POST, the steps to call that same Web service are quite different. 1.Reopen the eBaySample application you created in the prior example if it is not already open. 2.Add a reference to the eBay API by selecting Project.Add Web Reference. For the URLfield, specify the location of the WSDLfile, for example with this URL: http://developer.ebay. com/webservices/latest/eBaySvc.wsdl. 3.Click the GO button so that Visual Studio locates the eBay Web API. 4.Change the Web Reference Name to eBayso that you can use a shorter name in your project. 130Chapter
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Mac Web Hosting services