Multiple choice technology web technology

You are writing a web based utility that searches for existing web services provided by large companies. Your website searches these webservice, displays list and provides features through a very nice GUI to execute these webservices. In future, this utility can be enhanced to perform similar functionality for other enterprise services and need to be UI-rich. Which of the following APIs would you use for searching XML registries? Choose one answer.

  1. StaX

  2. JAXP

  3. JAXB

  4. JAXR

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

JAXR (Java API for XML Registries) is specifically designed for accessing business and service registries like UDDI and ebXML. It provides a standard API to search, retrieve, and manage registry metadata. StAX is for streaming XML parsing, JAXP is for general XML processing, and JAXB is for XML-Java binding - none of these handle registry queries.

AI explanation

JAXR (Java API for XML Registries) is specifically designed for accessing and searching XML-based business registries such as UDDI and ebXML — exactly the 'searching for existing web services' use case described. StaX (Streaming API for XML) is a pull-parsing API for reading/writing XML documents, not registries. JAXP (Java API for XML Processing) is a general umbrella API for parsing/transforming XML (SAX/DOM/XSLT), not registry lookup. JAXB (Java Architecture for XML Binding) converts XML to/from Java objects. None of these three address registry search, making JAXR the correct choice.