Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

Tip: Use Data Dictionary Links for XML and Web Services Schemata

By Uche Ogbuji
2005-04-09


Semantic links in WS descriptions

Because you've taken so much care in organizing and presenting your Web services budget requests, you've won approval, and now it's time for implementation. One of the newly-funded services is a calendar and appointment service, and you now need to write the WSDL for it. Of course, you want to be sure that the schema snippets in the WSDL contain semantic links, but you also want to try to sprinkle semantic links into other parts of the description as well. Listing 2 is such a snippet of WSDL, conforming to WSDL 1.1.

Listing 2. Portion of WSDL that includes a semantic link for a message part


<wsdl:message name="get-upcoming-appointments">
<wsdl:part name="requested-duration" element="schema:duration">
<wsdl:documentation>
<owl:sameClassAs
resource="http://www.w3.org/2002/12/cal/ical#duration"/>
</wsdl:documentation>
</wsdl:part>
</wsdl:message>
In defining a message that requests the upcoming appointments from now through a given duration, you establish precision about what you mean by duration when defining that parameter in the request. You do this by referencing the W3C's suggested expression of the iCalendar standard (RFC 2445) as a formal ontology. You place this link in a wsdl:documentation element, which is not ideal since this element is usually reserved for human-readable documentation. You want to do this because of constraints in the WSDL specification, which like WXS restricts the places where foreign elements (called "extensibility element") can be placed. The model for extensibility is still being developed for WSDL 2.0. I hope the working group decides to loosen unnecessary restrictions before they're done (never mind for now the fact that it seems the idea of message part is being overhauled for 2.0).

Tutorial Pages:
» Tip: Use Data Dictionary Links for XML and Web Services Schemata
» What exactly is a service anyway?
» Semantic links in WS descriptions
» Wrap-up
» Resources


First published by IBM DeveloperWorks


 | Bookmark
Related Tutorials:
» Starting with XML
» Performing Client-Side XSL Transformations
» Create a Google Sitemap for your Web Site
» XML and Scripting Languages
» Parsing Comma-Separated Values
» XML Security Suite: Increasing the Security of E-Business