Understanding How WSDL Fits In

It's possible to build a SOAP message that eBay will understand from scratch, but that's typically the most difficult way to communicate. In fact, even though it might be tempting to give message building a try, you should probably avoid it. WSDL provides a means for describing a Web service so that the Integrated Development Environment (IDE) you use can create the definitions needed. When you use a product such as Visual Studio .NET, the IDE downloads the WSDL from the eBay Web site and...

Writing Applications Using Java

the eBay-Supplied Code Jj Java Application the eBay Request Library Most people have heard about Java and many people have worked with it. Java appears on Web sites with some regularity because it lets Web designers create solutions that work with a number of browsers. Developers create Java applets for many Web-enabled applications as well as desktop applications. In short, Java appears in numerous places, so it's no wonder that you can use Java with eBay Web Services too. This chapter...

Considering the URL Search Form

A few developers might be under the impression that they only have two choices for searching the manual search and the one eBay Web Services provides. This view isn't entirely correct. You can also create a custom page that assembles a special URL for searching. The result still comes from the eBay site, but you have control over how the search is constructed. Some people might be tempted to use screen scraping techniques to retrieve the resulting data (essentially extracting the data from the...

Designing User Feedback

One of the problems in getting good user feedback is designing the form so that it elicits a response, especially from users who don't normally express themselves well. A nebulous question such as How do you feel about this input form won't net you a very good response. You need to direct the user to the kind of input you want, without contaminating the user's response. For example, Does the item search form help you find the information you need to make a purchase, or do you find yourself...

Considering the Usage Requirements

Some people would have you believe that the Web service does everything for you and that the client does nothing at all. However, the client interacts with the Web service, which means the client must possess some intelligence to perform the task. To use a Web service, you must understand the usage requirements. From a client perspective, the type of device you use to access the Web service (including the connection type and speed it offers) determines the access speed,...

Using Older Microsoft Products

You can use embedded Visual Basic (eVB) to create an eBay Web Services application. However, you need to bend the rules slightly to accomplish the task. The default eVB IDE doesn't include any form of XML on the Available References list in the References dialog box. Use the Project References command to see this dialog box. Even though the reference doesn't exist, the Pocket PC does have at least one version of the Microsoft XML library available. Click Browser in the References dialog box and...

Addressing Certification Requirements

Before eBay accepts any application you create, it must go through a certification test and meet all of the certification requirements. These requirements apply to everyone equally. There's no ambiguity here you must meet these requirements to get your application certified. Therefore, the first place you need to look for issues to address is the Certification Requirements page at Certi ficationRequirements.htm. You'll find that the information on the Certification Requirements is geared toward...

Writing a Simple XSLT Page

This section describes the XSLT page used with the transformation described in the Using a Script to Call an XSLT Page section (see Listing 4.2). Listing 4.3 shows how to create an XSLT page that outputs HTML code. You could use the same technique to create a report or any other form of output based on the XML input received from eBay. You'll find the complete source for this example in the Chapter 04 Viewing XSLT folder of the source code located on the Sybex Web site. Listing 4.3 Designing an...

W

Warning C4146 unary minus operator error message, 176 Web services, See also eBay Web Services defined, 4-5 steps in transaction process, 6-7 third-party resources on, 334 usage requirements, 7-8 Web Services Description Language (WSDL), 152, 153, 350-351, 351, 378 Web site addresses, See also e-mail addresses URLs Acronym Finder, 360 ActiveState's ActivePerl, 45 Apache Friends, 218 application design software, 98 applications using VBA, 143 articles Caching with PHP Cache_Lite, 294 eBay Office...

Using the eBay Demo

This portion of the example is a Web service that you can access from within your Office application. In fact, it's not really limited to Office at all. Any language or development environment that supports Web services can also use this portion of the example. The wonderful part about using Web services is that they're not language dependent you can use them with a number of languages. To use this application, you must set it up on a Web server that supports .NET. If you want to modify the...

Selecting a Development Language

Some developers have a mind-set that their particular language is the only perfect language in the world and they never plan to use anything else. I'd love to say these developers are really onto something because it would greatly reduce the efforts I go to in order to maintain proficiency with multiple languages. The sad truth is the world has yet to discover the perfect language and probably never will. Some development languages work best for one situation, and others work best in another...

Performing the Required Setup

Java requires special support for accessing eBay Web Services. The example assumes you're using a Windows machine. You'll need to copy Jacob.DLL from the Program Fi1es eBay SDK Java folder to the Windows System32 folder to ensure Java can find it when needed. As an alternative, you can add the Program Fi1es eBay SDK Java folder to your system path. JACOB is short for Java COM Bridge the function that the DLL serves. Make sure that you don't have any other version of Jacob.DLL available on the...

Using a Script to Call an XSLT Page

EBay doesn't know how you want to present the data it provides, so the XML you receive doesn't include any form of XSLT declaration (another kind of processing instruction). This declaration appears as < xm1-sty1esheet type text xs1 href SearchDisp1ay.xs1 > in the XML file. The href attribute tells where to find the XSLT file. Without this information, the browser will never display anything but XML on screen. It would seem that the situation is hopeless. However, you have other options,...

Becoming an eBay Developer Program Member

Once you decide on a licensing level, you need to join the eBay Developer Program. You'll find the easy five-step process at join.asp as shown in Figure 1.2. Make sure you enable full cookie and scripting support for the membership process. Otherwise, the process will fail and you'll need to contact eBay support at developer-relations ebay.com for help. One of the more important steps appears near the bottom of the page. Make sure you have your eBay user identification and password available...

Listing Creating a Unique Application Name

Var Req new Req.open(POST, false) Define the header information for the request. These headers appear in the same order recommended by the documentation at SubmissionForm.DevIDStr.value + + SubmissionForm.AppIDStr.value + + SubmissionForm.CertIDStr.value) GetRuName) Create the XML request object. var XMLData new Add the XML request header, var ProcInst xml, version 1.0 XMLData.appendChild(ProcInst) Construct the XML request message. All the Usual Entries Elem Elem Elem Elem Add the request data...

Listing Creating a Simple Access Page

Var Req new Define the header information for the request. These headers appear in the same order recommended by the documentation at SubmissionForm.DevIDStr.value SubmissionForm.AppIDStr.value SubmissionForm.CertIDStr.value 305 SubmissionForm.DevIDStr.value Submi ssionForm.AppIDStr.value SubmissionForm.CertIDStr.value GetSearchResults 0 0 text xml var XMLData new Add the XML request header, var ProcInst xml, version 1.0 XMLData.appendChild ProcInst Construct the XML request message. var Root...

Using Other Special Search Techniques

EBay provides a number of special search forms. You wouldn't locate an item using these search forms you would look for something else. For example, if you're a buyer, you might want to use the Seller Search page shown in Figure 3.4. Notice that you can search for a single seller or a group of sellers. eBay does limit you to searching for 10 sellers at a time. The search form lets you choose some of the data presented, including the list of bidder emails and the completed items for a specific...

Working with Your Data

Generally, you or your organization will generate two kinds of data. The first type is generated in-house as part of your analysis of eBay data. You might make notes about specific items you're bidding on or keep track of certain kinds of products you need. There aren't any refresh requirements for this kind of data no one will ever see it but you. The second kind of data is based on eBay information but is generated as the result of your activities on eBay. You need to consider the value of...

Other Refinements You Should Consider

GetShippingRates Call J SuggestedCategories Call J Building an application that works with eBay Web Services means doing more than simply writing code that interacts with the Web service and making it perform well. You must consider refinements that don't improve application performance or affect the user directly. For example, a user is unlikely to notice that you've added extra features to protect privacy, but will definitely notice when you don't. Likewise, a feedback form might not seem...

Listing Setting the URL Request Entries

Elem Elem Elem Elem Elem.text SetReturnUrl El em Elem Elem.text SubmissionForm.RuNameStr.value Elem Elem.text SubmissionForm.SuccessPgStr.value Elem Elem.text Add the request data to the XML request. XMLData.appendChild Root Send the request. Req.send XMLData var Positl var Posit2 Positl ParseStr ParseStr.substring Posit1, Posit2 SubmissionForm.ResultStr.value ParseStr else As you can see, the SetReturnUr1 call requires several important pieces of information. The lt Action gt element defines...

Using the eBay PHP Example

The eBay PHP example is a bare bones demonstration of what you can do with PHP using the SDK technique. The example runs from the command line and doesn't make use of any of the PHP Web features at all. You can theoretically run it from a browser, but you'd need to modify the code a little first. The example creates a new listing and sends it to eBay Web Services. Your server must have the eBay Web Services Kit installed to run this example, along with the proper PHP support. You don't need any...

Understanding the Parts of a SOAP Message

To understand SOAP, you need to consider the features that make up a SOAP message. A SOAP message includes the SOAP package, the XML envelope, and the HyperText Transfer Protocol HTTP or Simple Mail Transfer Protocol SMTP transport. Think about this system in the same way that you do a letter, with SOAP acting as the letter, XML as the envelope to hold the letter, and HTTP or SMTP as the mail carrier to deliver the letter. The most common transport protocol in use today is HTTP, so that's what...

1

ValidateTestUserRegistration call, 357 VBA applications, 143-170, See also writing applications alternative to, 145-146, 147 authenticating users with eBay API Test Tool, 147-148 benefits of, 143-144 caching search data using Access databases, 164-165 benefits, 165-166 creating cache applications, 166-169 overview, 164-165 defined, 378 VBA For Dummies Visual Studio applications using eBay Microsoft examples.overview, 148 153-154, 154 configuring for use, 148-149, 149 eBay Demo, 151-152, 152-153...

Listing Transitioning between XSLT Views

Check for data in the data store. if SubmissionForm.DataStore.value.length gt 0 Load the XML document from the hidden variable. var ProcDoc new Create an XSLT document and load the transform into it. var XSLTData new Display the output on screen. a1ert P1ease Submit the Data First This function accepts the name of an XSLT file as input. You can provide any XSLT file that includes instructions for handling the output from the GetCategoryListings call. The secret to this particular function is...

Writing Applications Using VBA

Understanding How to Writing Applications Script Web Services x with Microsoft Excel with Microsoft Accessy Many people associate Visual Basic for Applications VBA with Microsoft Office. While it's true that Microsoft Office does rely on VBA as a development language, you'll find VBA used with other applications too see the list at Therefore, even though the examples in this chapter do rely on Microsoft products, you can use the information with any product that supports VBA. This chapter...

Simple List Example

The C version of the SimpleList example works much like the Visual Basic 6 version described in the Using the eBay Visual Basic 6 Example section of the chapter. However, this example does have an important difference it shows how to handle SDK events. In this case, you'll find two check boxes for the IAPICall.OnPostRequestXml and IAPICall.OnReceiveResponseXml events. When you make a call with these two check boxes selected, you receive additional information from eBay Web Services. Handling...

Creating an Offline Archive

Generally, you can build an offline archive of data with any Web service. Some Web services restrict the amount of time you can store the data. In most other ways, however, the Web service leaves the details of how you store the data you receive up to you. eBay Web Services go a lot farther by providing integrated database support as part of the library. At the time of this writing, eBay Web Services provides support for both Microsoft Access and Microsoft SQL Server. This support isn't...

Adding Hints for Desktop Applications

Desktop applications commonly rely on hints to help a user understand its operation. For example, when you see a letter of a field underlined, you realize that pressing Alt Letter selects that field. If the developer has wisely selected a different letter for each field, every field is a single key combination away. The use of speed keys helps touch typists work faster by allowing them to keep their hands on the keyboard, rather than using a mouse. However, speed keys also help those who can't...

Using Microsoft Access as a Database

Sometimes it's simply not efficient to query eBay Web Services repeatedly throughout the course of a single session for the same information. It's true that items listed on eBay change daily. In fact, one of the reasons for the GetSellerEventsC call described in the Developing an Application with the API section is that things do change rapidly, in some cases, and this call helps you keep up-to-date without a lot of effort. However, it's likely that some items will remain somewhat constant....

Listing Getting Seller Events Using the API Technique

' Define the header information for the request. These headers ' appear in the same order recommended by the documentation at ' Req.setRequestHeader _ Sheet1.Ce11s 5, 2 _ Sheet1.Ce11s 6, 2 _ Sheet1.Ce11s 7, 2 Other Important Headers ' Create the XML request object. Set XMLData New DOMDocument40 Set ProcInst XMLData.createProcessingInstruction _ xml, version '1.0' encoding 'iso-8859-1' XMLData.appendChild ProcInst ' Construct the XML request message. Set Root Root.setAttribute xm1ns, urn...

Developing with Visual Basic NET

Visual Basic .NET isn't the same language as Visual Basic 6 the two are so different that many developers gave up trying to move code from one to the other. Many of the changes in Visual Basic .NET are actually advantageous, especially for eBay Web Services application designers. For example, you have better access to the low-level details of your application. In addition, Visual Basic .NET comes with many Web service support items built in. The following sections discuss how to use Visual...

Using the Get ShippingRates Call

This example shows how to obtain an estimate of the cost for shipping an item based on a number of factors including the starting and ending point, the weight, packaging type, the method of shipment, and the value of the item. You can use this call to estimate the shipping costs before you put the item up for sale and also when you complete a sale. The call helps you determine what to charge for a product when the seller pays for shipping. Listing 14.3 shows the code for this example. You'll...

Selling and Relisting Products

The main reason that some people spend time on eBay is to sell items. Generally, the seller uses a manual interface to define facts about the item, such as an item description and picture. The seller also provides information such as the payment terms and method of shipment. You can automate all of these tasks using eBay Web Services. Any task that you can perform using the manual interface, you can also perform using the automation of eBay Web Services. This includes relisting a product if it...

Considering Reliability Issues

Reliable application performance is essential if you plan to use eBay Web Services for any type of business purpose. Most people associate reliability with availability, but that's only part of the picture. When working with eBay Web Services, you need to consider five reliability factors. Availability of Data Unless a user can access the eBay data, using the application you create is useless. Fortunately, eBay Web Services has a high availability rate, so most desktop applications will run...

What Is a Web Service

You can look at a Web service from a number of perspectives. The easiest way to view a Web service is as a means of obtaining access to information. Essentially, you ask the server for information and the server returns that information in some form. The request and the returned information normally appear in eXtensible Markup Language XML form. Using XML preserves the meaning behind the information, regardless of the diversity of the platforms involved, so that you receive not only the...

Addressing Speed Concerns

Speed measures how fast an application can perform a task. Many developers concentrate on this factor when developing an application because it's relatively easy to quantify. You can easily demonstrate that a particular coding change or technique improvement provides a corresponding increase in speed. Making changes that result in a speed increase is important when using a Web service such as eBay Web Services because your application incurs a performance penalty when it requests the data....

Using Visual Studio

Visual Studio 6 is the last version of Microsoft's language product to provide full support for native applications those that run directly from the Win32 API. Developers who don't want to adopt Microsoft's .NET strategy have continued to use this version of Visual Studio and it will probably remain viable for a long time. This book discusses the two most popular languages included with Visual Studio 6 Visual Basic 6 and Visual C 6. I'm assuming that you have installed the latest service pack...

Using the eBay SDK Configuration Wizard

In order to use eBay Sample Selling Application, you need to configure it by modifying the eBaySales.exe.config file located in the Program Fi1es eBay SDK folder. This configuration task is an important first step you must perform it before you start the sample application. The following steps show you how to perform the task with an Access database. Working with other databases follows a similar sequence. 1. Start the eBay SDK Configuration Wizard using the Start Programs eBay SDK gt -Database...

Using the eBay Lister

Ebay Api Inventory

This part of the program contains the actual Office document and is the one you should concentrate on if you're interested mainly in how a partnership between Office and eBay can exist. Open eBayLister.xls and you'll see an opening page named Settings with the same information requirements as every other example in the book. Depending on how you configure Office, you might also see a macro warning you can dismiss it to use the application. You must provide your eBay keys, as well as a valid...

Understanding Internationalization Issues

Many developers don't consider internationalization issues when they develop a Web application today, but it's an important issue. Unless you know that no one who speaks another language will ever have any reason to access your site, you have to consider the possibility that internationalization could benefit your site. Not every site requires internationalization, but many do. You also have to consider how to handle the internationalization of your site. In many cases, you can simply ensure...

Using Web Services from Any Visual Studio Version

Chapter 5 demonstrates the two common techniques for working with eBay Web Services SDK and API. Visual Studio developers also have these options, but implementing the solutions is a lot easier because Visual Studio provides a number of additional tools that Office developers can only dream about. For example, you can easily mix eBay Integration Library support with standard database calls. Just because Visual Studio provides a robust development environment, doesn't mean that all versions of...

Performing Research

Some people assume that eBay is only about buying and selling products. In most cases, that's what happens a seller offers an item that someone else buys. The buying and selling on eBay does lend itself to other forms of activity. One of the most important alternative activities today is the use of all that data for research purposes. For example, you might want to know how well a particular item retains its value. By comparing the list price, the new selling price, and the prices for items of...

Using the eBay Visual C Example

One of the examples you get with the eBay Web Services Kit is a Visual C application that demonstrates basic usage. In this case, like many others, the example shows how to upload a listing to eBay. You'll find this example in the Program Files eBay SDK Samples C SimpleList folder of your eBay Web Services Kit installation. Make sure you read the ReadMe.TXT file in the source code folder it contains setup instructions you need for the example. In general, you need to add the folder for the .NET...

Writing Applications Using Visual Studio

Visual C 6 yyVisual Basic .NETy Visual C .NET One of the best ways to work with eBay Web Services when you want to create a free-form desktop application is to use Visual Studio. With Visual Studio, you have access to a full user interface, Web service, and database tools. Given time and resources, you can create seamless access to eBay Web Services for any need, including many forms of Web application access. If you use Visual Studio .NET, mobile applications become relatively easy to create...

Using the SDK Technique with Visual C NET

The example in this section performs a standard search using the SDK technique. The unique feature of this example is the use of a DataSet to store the results. The use of DataSet means that you can perform a number of data manipulations at the speed of local memory, but with all of the benefits of a database. Listing 8.3 shows the essential source code for this example. You'll find the complete source for this example in the Chapter 08 CSharp_ItemSearch folder of the source code located on the...

Defining the Common Communication Elements

No matter what form of communication you eventually select, you'll find that you need to provide some common pieces of information for all of them. Every communication requires your developer information the keys that eBay provides when you sign up for the developer program. These include the developer identifier, application identifier, and the certificate identifier. You also need to provide user information, which includes a user identifier and a user password. The user information you...

Authenticating the User

At this point, you've registered your application and you have a Web server that eBay can access. To authenticate the user and obtain the token you need, you must provide a connection to eBay and a means for eBay to redirect the response to your site. The three Web pages to perform this task appear in the Chapter 05 GetUserAuth folder of the source code on the Sybex site. The Default.HTM file begins the authentication process. It contains a simple script that combines the URL for the eBay...

Openwave SDK

Like the Microsoft emulators, the Openwave SDK is also a free download, but the Openwave Web site offers plenty of opportunity to purchase products as well. You must complete a registration form to get the free download. The Openwave file you download is an executable, so double-clicking it starts the installation process. Simply follow the prompts to install the product. Most versions of the product require yes or no answers to each question. The Openwave Web site offers a number of versions...

Using the API Technique

The example in this section shows how to receive feedback. The send and receive process doesn't differ for buyer or seller, except in the content of the feedback. When a buyer provides feedback about a seller, the seller has an opportunity to respond to that feedback. This system ensures that everyone has a chance to say what they need to say about a particular transaction. As previously mentioned, this example relies on the Microsoft XML support that you can obtain for Windows. The code uses...

Writing the Code

Frmresult Show

The example in this section uses the GetMyEBayCa11 method to retrieve the items that a user is watching, bidding on, has lost, or has won. Listing 13.1 shows how to work with this call to retrieve the required information. You'll find the complete source for this example in the Chapter 13 MyEBayDemo folder of the source code located on the Sybex Web site. O Listing 13.1 Using the GetMyEBayCall private void btnTest_C1ick object sender, System.EventArgs e ApiSession Session The eBay session....

Contents at a Glance

Part I_Discovering eBay Web Services_1 Chapter 1 Learning about eBay Web Services 3 Chapter 2 Using eBay Web Services to Your Advantage 25 Chapter 3 Defining a Search 47 Chapter 4 Working with Web Service Data 63 Part II_Writing eBay Web Services Programs_95 Chapter 5 Starting the Development Process 97 Chapter 6 Writing Browser-Based Applications 121 Chapter 7 Writing Applications Using VBA 143 Chapter 8 Writing Applications Using Visual Studio 171 Chapter 9 Writing Applications Using PHP 215...

Using SQL Server as a Database

Using a cache to hold your eBay search data is a good idea for a number of reasons. For example, using a cache helps you improve application performance. For more information on how to use caching, see the Caching as a Practical Performance Enhancing Technique section of Chapter 7. The example in this section relies on SQL Server to provide caching functionality. However, you could easily adapt the example to use any Database Management System DBMS . In fact, you don't have to use a DBMS at all...

Using the eBay Visual Basic Example

The Visual Basic 6 example looks and works much like the Visual C example shown in Figure 8.1. As with the Visual C example, you provide the developer, user, and environment information as input to the first dialog box. The second dialog box provides entries for adding a new item to eBay. If you run the application and get a Can't find library or object. error, make sure you verify that all of the references are correct. To do this, open the Reference dialog box using the Project References...

Using the API Technique with Visual Basic

The example in this section discusses the GetStoreDetails call. Some sellers on eBay have an electronic storefront that offers specific benefits that improve sales and generally make using eBay easier. The GetStoreDetails call helps you learn more about the stores. You can learn more about storefronts in the API help topic at http developer.ebay.com A general discussion of this call appears at GetStoreDetailsLogic.htm. Most important of the features available to an eBay store is a special...

Yms

Generate .NET Code with XSLT article, 79 getApiCredential method, 355 GetCategories call, 202-209, 247, 248, 289 GetCategoryListings call, 138, 140, 289 GetData function, 140, 234 GetFeedback call, 289-290 GetHighBidders call, 188-192, 192, 201 GetItem call, 156, 158-159, 159, 166, 188 GetMyEBayCall , 307-311, 310-311 GetRecommendations call, 357 GetReturnUrl call, 103, 126 GetRuName call, 103, 104, 126, 133 GetSearchResults call eBay API Test Tool and, 84, 84 in Java applications using API,...

Using Visual Studio NET

Visual Studio .NET promises to deliver a lot in the way of language functionality, so it's almost a shame that I only cover C and Visual Basic in this chapter. You still have an option to use Visual C for development purposes. See my book Visual C .NET Developer's Guide Osborne, 2002 for details on using this language. In fact, the inclusion of new designer tools for Visual C developers in Visual Studio .NET 2003 makes this language a viable choice the first version of Visual Studio .NET didn't...

Defining Static and Dynamic Data

Applications that rely on data from an outside source, such as a Web service, can include the concept of static and dynamic data. Dynamic data is the best type to use for Web services because it reflects changes in the eBay database. An application gains important benefits by using dynamic data. For example, you won't try to purchase a product that eBay no longer carries because the dynamic nature of your application automatically tells you that product is no longer part of the eBay catalog....

An Alternative to VBA

One issue to consider before you invest a lot of time in VBA is whether you need VBA at all. Most Office 2003 applications and many third party applications can work with XML data directly. You can even format that data using XSLT. Consequently, you could download the information you need using any of the browser techniques discussed in Chapters 2, 4, and 6. Simply save the resulting XML file to disk and you have the raw information you need to perform an analysis, develop a report, or create a...

Using a Browser Example

Ebay Api Examples

This first browser example simply performs a search. Generally, browser applications provide a good way to experiment with eBay Web Services and provide utility-like applications. One of the best features of a browser application is that it works on a lot of platforms and devices. Unfortunately, the browser needs some type of XML support, so you generally have to provide an XML solution for a particular need. In this case, the browser example relies on a Microsoft XML solution. Figure 2.4 shows...

Making Sensible Queries

EBay Web Services can help you perform a number of tasks. The problem is that each request and response consumes resources. To get the most from this Web service, you need to optimize the requests and responses so that the value of the information you receive exceeds the cost of transmitting and manipulating the data. Creating a request and then handling the response has several costs associated with it. Some of the costs are real world in that you must provide the infrastructure required to...

Creating Messages for eBay Using XML

At this point, you know what XML is about and how to use the eBay API Test Tool to reduce your workload. However, you haven't really put everything together to generate messages of your own. The concept of a Web service is that you send a request and the Web service sends a response to that request. As you've seen in the chapter, eBay uses a number of request and response message formats to support the kinds of tasks that most developers will have to include with their applications. Although...

Configuring the JCreator Editor

Jcreator Project Classpath

The professional version of the JCreator editor can make working with eBay Web Services a lot easier because it provides help with the various packages and libraries. You don't have to spend time working with batch files because the application compiles within the IDE. In addition, the debugger makes it easy to see how requests to and responses from eBay Web Services work. Because there are a number of ways to work with eBay Web Services, I decided to create a setup that could work with them...

Adding a Microsoft XML Reference to Visual Basic

Unlike many Web services that you'll use, eBay doesn't require you to install the Microsoft SOAP Toolkit you can work with eBay Web Services using simple XML techniques. Chapter 4 discusses most of the XML techniques you'll use. However, before you use XML with Visual Basic 6, make sure you install Microsoft XML version 4.0, rather than use the older version that comes with the product. You can download Microsoft XML 4.0 Service Pack 2 at To add the Microsoft XML reference to your project, use...

Understanding the Benefits of Using VBA

Most of the examples you'll see for eBay Web Services outside this book probably focus on Web technologies. Developers use eBay Web Services to create connections to their Web site to make sales or their Pocket PC to perform quick searches or auction updates . However, VBA lets you view eBay Web Services from an entirely different perspective. Instead of looking for the next sale or generating some type of search result, using VBA with your application lets you concentrate on data it helps you...

Resources for Learning VBA

This chapter won't teach you how to use VBA. I'm assuming that you already know enough about VBA to create your own simple applications. If you don't already have this knowledge, you can get it from a number of sources. The first place to look is my book, VBA for Dummies, Fourth Edition Wiley, 2003 . This book introduces you to VBA and takes you through examples using all of the major Microsoft Office applications. You'll also want to look at some of the resources that Microsoft provides. For...

Understanding the Main Section

The Individual.PDF document begins with a list of things you can do. You combine this portion of the document with Appendix D to determine what kinds of actions you can perform and consequently the kind of application you can create . It's essential to rely on this portion of the document as you design your application. Trying to work with the document after the application is designed simply wastes time. Some requirements also affect actual coding practices, such as the manner in which you...

Using the eBay Sample Selling Application

The eBay Sample Selling Application provides you with a full-fledged example of a complete eBay management application. The example is heavily skewed toward the needs of a seller, but it contains a host of great ideas for the developer of any application. You can find this example in the Program Fi1es eBay SDK folder of the eBay Web Services Kit. Unfortunately, the eBay Web Services Kit appears to lack the full source code for this example making it of limited usefulness for learning coding...

Using the eBay API Test Tool

The eBay API Test Tool is an essential aid to understand how eBay works. In fact, you should probably create a link to this particular site and use it as part of your application development process. This tool helps you build the XML documents required to make an eBay Web Services request. Yes, it's also a test tool, but I've begun looking at it less as a tool for testing and more as a tool for designing. You'll find this tool at http developer.ebay.com DevZone build-test test-tool.asp. Figure...

Creating a Cached Application

This example is the next step in the GetItem call example described in the Developing an Application with the SDK section of the chapter. The main difference is that this example uses caching to reduce the need to request information from eBay. In addition, it uses the eBay SDK Integration library to reduce the amount of coding required to keep the database in synch with eBay Web Services. To ensure you have full SDK access, add all of the libraries used in the previous example, plus the...

Getting the Category List and Storing It

Almost every application you create is going to require some knowledge of the categories that eBay supports. In fact, most of the sample applications that eBay provides require a category entry or present category information. The reason for this concentration on categories is that effective selling relies on categorization of the item for sale. Consequently, one of the first database applications I built for myself was a tool to download, store, and display categories locally. The example in...

Creating an Application Using SOAP

Writing an eBay Web Services application that relies on SOAP is a little different than using either the API or SDK method. Many advanced language products simplify the process for you by encapsulating the SOAP functionality in standard objects. This is what happens when you create a reference for a Visual Studio application. The example in this section shows a simple SOAP call that you can use as a basis for building other applications. Listing C.1 contains the essential source code for this...

Configuring the Sample Application

When you start the sample application for the first time, it asks you some simple questions. These questions add information to the database so it provides complete support for the Integration Library. For example, even though the database has a complete set of tables, it doesn't contain any users. You need to create a user in order to use the sample application the configuration process accomplishes that task. The following steps take you through the initial configuration process. 1. Start the...

Integration Library Example

The Integration Library example found in the Program Fi1es eBay SDK Samp1es VB.NET IntegrationLibraryDemo folder relies on a connection string that you create for the Sample Selling Application to work You can learn more about the eBay Sample Selling Application in the Using the eBay Sample Selling Application section of the chapter. To begin using the example, open the App.CONFIG file and modify the following line of code to reflect the connection string for your database. Even though the...

Defining the Parts of an XML Message

All XML messages consist of three components elements, attributes, and data. For all of the complexity of the examples in the previous chapters, XML doesn't contain very much in the way of complex information. In addition, XML messages consist entirely of text for the most part. Yes, you can attach encoded data, but the message itself is pure text, which makes XML quite readable. Here's a simple example that shows all three kinds of XML message components. You'll find this example in the...

Creating a Java SDK Application

The Java SDK currently distributed with the eBay Web Services Kit is admittedly difficult to use and error prone for some developers. Because eBay wants to make the development experience as easy as possible, you now have access to a new Java SDK. You can download the new eBay SDK for Java at If you're using JCreator Pro, the product that I'm using for the example, you'll need to create a new library reference. The library files for this new SDK appear in the eBaySDKforJava lib folder. You may...

Understanding How XSLT Works

Unlike an XML file, an XSLT file generates some type of presentation, using information from the XML file as input. Consequently, XSLT or simply XSL files often contain a combination of output text and XML. In fact, all XSLT files begin with the usual header and the special XSLT header shown here. lt xm1 version 1.0 encoding UTF-8 gt lt xs1 sty1esheet version 1.0 The results of using a script to transform XML data received from eBay. 3 XSI-T Transformation Example - Microsoft Internet Explorer...