HOME |  ADVERTISE |  SUBSCRIBE |  CONTACT |  SYS-CON.COM FREE XML-J ARCHIVES  

This Issue Sponsored By
  • Actional
  • EclipseCon 2005
  • Ektron
  • EV1 Servers
  • Gilbane Conference
  • Global Knowledge
  • HostMySite
  • IBM
  • Itemfield
  • LinuxWorld Conf & Expo
  • Mindreef
  • Panacea Software
  • Parasoft
  • Promind Systems
  • Stylus Studio
  • WebAppCabaret

  • MAGAZINE
     
  • Advertise
  • Buyer's Guide
  • Customer Service
  • Digital Edition
  • Editorial Board
  • FREE Newsletters
  • JDJStore.com
  • Readers' Choice
  • RSS Feed
  • Subscribe


  •  TOPICS
     
  • XML Tips & Tricks
  • XML Protocols
  • WebServices
  • XML-J News Desk
  • Editorials
  • Interviews
  • Product Reviews
  • All Topics
  • Archives
  • Source Code
  • Write for Us

  • Home > XML > Archives > Volume 03 Issue 01 >

     

    Figures: Click to Enlarge
    Figure 1 | Figure 2 | Figure 3 | Figure 4 | Figure 5

    If multiple ClassificationNodes are supplied, they are AND'ed together. That is, the object returned must be classified, either directly or indirectly, by each of the supplied ClassificationNodes.

    It's easy to see how the Browse and Drill Down Query interface could be used to build an interactive GUI. This is exactly why it was created: to facilitate the creation of ebXML Registry browsers that a business could use to locate a particular service.

    Filter Query
    While the Browse and Drill Down Query interface is well suited for building a GUI, it isn't very powerful. To support more complex queries, the Filter Query interface is provided, which supports an XML syntax that describes a set of class filters. Each of these class filters is a predicate clause intended to restrict the result set.

    The topmost restriction when performing a Filter Query pertains to the type of object you're looking for. For example, you may be interested in finding a RegistryEntry, an AuditableEvent, or a ClassificationNode. From there you specify various class filters to restrict the result set. A working example may be the best way to describe how this Filter Query interface operates. Take a look at the sample in Listing 1, which is taken from the ebXML Registry Specification.

    • Line 1: This identifies this request as a request for a RegistryEntry. Other possible types of queries include the AuditableEventQuery, the ClassificationNodeQuery, the RegistryPackageQuery, the OrganizationQuery.
    • Lines 2-4: This describes the first filter that's placed on our return items. In this case we place a restriction on the status attribute of the RegistryEntry in which the status must be equal to "Approved." A full set of string operators, such as EQUAL, STARTSWITH, and ENDSWITH, as well as numerous other operators for boolean and numeric values, exist.
    • Line 5: This section begins a filter on the Classifications associated with this RegistryEntry.
    • Lines 6-9: In this first section we specify that there must be a ClassificationNode that starts with, or has a parent identifier of, urn:ebxml:cs:industry. This indicates that we are placing a restriction on the industry of the result set. The next predicate furthers that restriction to the "Automotive" industry through an XPATH-like identifier.
    • Lines 10-13: Similar to the previous clause, this clause restricts us to a particular geography, namely Japan.
    Once the XML describing your query has been created, it can be executed by making a call to the submitAdhocQuery method of the ObjectQueryManager interface.

    As you can see, the Filter Query provides the capability to execute rich and complex queries against an ebXML Registry. This query interface is mandatory for any ebXML registry. However, many people are familiar with a different query language, namely SQL. To provide a query interface that's already known by the masses, the ebXML specification also specifies an optional SQL Query interface.

    SQL Query
    A given ebXML Registry implementation may choose to support the optional SQL Query interface. This interface supports a basic subset of the SELECT statement as described by the SQL-92 standard. It's also been extended to allow for the calling of stored procedures. Although the ebXML Registry specification does supply a sample relational database schema for data storage, the data can be stored in any manner and still be ebXML compliant.

    The specification essentially defines a binding between the RIM and a set of fictional database tables that are used in a given SQL Query statement. For example, if you wanted to find the global ID of any RegistryEntry with a name containing "Java" and a version number other than 2, you could issue the following SQL Statement to the SQL Interface:

    SELECT id
    FROM RegistryEntry
    WHERE name LIKE '%Java%'
    AND majorVersion > 2

    When querying ClassificationNodes, the primary identifier is a unique ID created by the registry. Using these IDs you can query other nodes by parents and so forth. However, an alternative identifier has also been provided for use in SQL Queries. Each ClassificationNode can also be located by an XPATH-like expression describing this node. An example path for a ClassificationNode would be something like "/Geography/Asia/Japan/Tokyo".

    To submit a SQL Query, the text of the SQL statement is passed as a parameter to the submitAdhocQuery method of the ObjectQueryManager, just as a Filter Query would be submitted.

    Content Retrieval
    The query methods we've examined don't return the actual content we're interested in. Rather, they return a unique identifier of the RepositoryEntries that we want to retrieve.

    3 of 5

    About the Author: Kristian Cibulskis is a freelance consultant focusing on Enterprise Java and XML solutions.

    Other Recent Articles by Kristian Cibulskis

    Reader Feedback | 2 Replies | Post Message

    ebXML Registry English Version is now available by KTNET.
    Posted by Chaemee Kim on Feb. 4 @ 12:14 AM

    Dear Kristian,

    This is ebXML Lead in KTNET.
    I appreciate you quote KTNET's ebXML Registry in your article.

    Now we're providing English Version of ebXML Registry 1.0 at http://www.gxmlhub.com/english/index.htm

    Plz, revise it correctly.

    The Korea Trade Network provides an openly accessible registry service. However, most of the site is in Korean, so if you can't read it I suggest using something like AltaVista's Babel Fish to translate the pages in real time.


    Good article
    Posted by Bobby on Mar. 7 @ 03:33 PM

    v good article


    Post Feedback

    Name:
    E-Mail Address:
    Subject:

    Message:

    Optional Link:
    Link Title:

    All Rights Reserved
    Copyright © 2005 SYS-CON Media, Inc.
    E-mail: info@sys-con.com

    The World's Leading IT Solution Providers
    Click here for product demos
    from the world's leading IT solution providers!


    Global Knowledge: Why Open Source Software Can Help Create a More Secure IT Infrastructure ...learn more and download FREE Copy!

    FusionWare: Reducing Complexity Through FusionWare Integration Server ...learn more and download FREE Copy!

    Promind Systems: XSL Maker:Complete Toolset for Building Web Pages from XML Data with XSL & CSS ...learn more and download FREE Copy!

    EV1 Servers: Four Steps to Web Hosting Success ...learn more and download FREE Copy!

    Itemfield: Defining the Benchmark for Complex Data Transformations ...learn more and download FREE Copy!

    JadeLiquid Software: WebRenderer:Seamlessly Displaying Web Content Within Your Java Application ...learn more and download FREE Copy!

    PointBase: J2EE Development with PointBase Embedded ...learn more and download FREE Copy!

    Gluecode JOE: Simplifying Java Development with Gluecode JOE ...learn more and download FREE Copy!

    NetOp Remote Control: NetOp Remote Control Enables Building Automation ...learn more and download FREE Copy!

    Enerjy Software: Why Coding Standards? ...learn more and download FREE Copy!


    World's Leading Web Services Resources

    Stylus Studio - Wondering how to build XQuery-based Web Service aggregation and reporting applications? Want to learn more about how to get the most out of XML Schemas? Download free XML whitepapers at Stylus Studio.

    Panacea Software - BPEL, WSDL, XML Schema, Xpath and WS-Security editors in one product. Download free evaluation copy of the most comprehensive and easy-to-use BPEL editor available. A single integrated development environment with a point-and-click programming interface, easy to learn and easy to use. Simply connect to www.panaceasoftware.com.

    IBM - Middleware is Everywhere. Can you see it?

    Mindreef - Make Your SOA more Agile. Try SOAPscope FREE at www.Mindreef.com.

    Parasoft - Verify Web Services Instantly with Parasoft... Just point SOAPtest to your Web services server.

    Ektron - Ektron - CMS400.NET offers robust content management built on the .NET Framework. Free download or demo.

    EV1 Servers - Start your own web hosting business today!

    Promind System - XSLmaker – the Smart Way to Transform XML to Web Pages. Download free trial at www.xslmaker.com

    Global Knowledge - Free cool stuff for you. Just come and get it.

    HostMySite.com - FREE Setup, a FREE domain name, and 2FREE months on any shared hosting account. Satisfaction is 100% Guaranteed.

    Iron Speed - Free Trial! Rapidly Build Custom Web apps for .NET

    XMLSpy - Download your FREE 30-day evaluation copy of XMLSPY

    EclipseCon 2005 - 2nd Annual Gathering of the Eclipse Community on February 28 – March 3, 2005. Register at www.eclipsecon.org.

    LinuxWorld Conference & Expo - February 14 – 17, 2005. Register today at linuxworldexpo.com for you FREE Exhibit Hall pass. www.linuxworldexpo.com

    Gilbane Conference - Our educational conference includes everything a project team needs to know, and provides IT, business, & content strategists a hype-free, clear-headed look at the existing and upcoming technologies necessary to implement content management applications. Learn more about upcoming conferences...