Working with Web Service Data

Working with the

Working with XML Understanding the Developing with Privacy and eBay Supplied Tools^in the eBay API ^eBay API Structure ^ Security Issues in Mind

All Web services rely on some form of eXtensible Markup Language (XML) to receive requests and send information. Web services use XML to transfer data within a specific context, so the meaning of the data isn't lost. This chapter isn't going to drown you in XML terminology, and it certainly won't make you an expert, but it does contain helpful information on using XML with eBay Web Services.

eBay currently supports two different programming models. The API uses XML requests and responses. The Software Development Kit (SDK) completely hides the XML from view—the function calls appear much as they would for a local resource. The "Choosing between the API and SDK" section of Chapter 5 discusses the merits of each approach to application development. A third option, Simple Object Access Protocol (SOAP), will eventually appear on the scene as part of the SDK, according to a recent eBay press release. You can learn more about this option in Appendix C and at KB_SearchDocs/OReilly_Conference_Release-Final.pdf.

You do need to understand some XML basics to use some features of eBay Web Services. The first section of the chapter helps you understand these basics, including the formats that eBay uses to return data from requests. You'll receive enough information in this section to work with the examples in the book. However, once you start working with XML, you might find that you want to know more, so the section also includes a listing of resources (including tutorials) that you can use to increase your XML knowledge.

XML isn't necessarily easy for the average human to read—it includes text mixed with tags in such a way that you can see the structure if you look hard enough, but the data isn't easy to interpret. The eXtensible Stylesheet Language Transformations (XSLT) technology can transform XML into a readable Web page. Again, this section won't make you an expert, but you'll leave the section with enough information to create basic reports and informational layouts. Like the XML section, this XSLT section contains additional information on where you can learn more about XSLT.

The next few sections describe some eBay-specific issues you need to consider when working with XML. You'll begin by learning how to use an important tool, the eBay API Test Tool. Far from an actual testing feature, this tool can reduce the development time of your project. When you finish these sections, you'll know how to build an XML message for eBay and how to interpret a response.

Finally, this chapter discusses two essential issues. The first is the problem of maintaining privacy with Web service applications. Because you handle user data with your application, you need to consider how best to protect the user's identity, while ensuring transactions occur in the most efficient manner possible. The second is the problem of security. Your application handles sensitive information, so you must consider security measures when building your application.

Many of the examples in this chapter rely on the XML-over-HTTPS method of communicating with eBay. This technique is also known as REpresentational State Transfer (REST) or the API method in eBay terms. Unfortunately, the eBay SDK Reference that comes with the eBay Web Services Kit doesn't tell you anything about this technique, even though it's actually more flexible than using the SDK method. You can learn more about the API using the documentation at You can see a number of API examples in Chapter 6.

Was this article helpful?

0 0
Interview With eBay Powerseller

Interview With eBay Powerseller

At Last! The eBook that generated over 50,000 in sales for one eBay member is now on sale again. Plus you will have the opportunity to find out the secrets behind his success. Author and creator of The 10,000 auction. The auction that generated over 50,000 in sales.

Get My Free Ebook

Post a comment