Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Web Development

Interoperable Web Services


Feb04: Using the WS-I Basic Profile 1.0 in Development

Using the WS-I Basic Profile 1.0 in Development

By Jim Murphy

Jim is a developer for MindReef and can be contacted at [email protected].


True or false? Web services that pass the WS-I Basic Profile 1.0 are guaranteed to be interoperable. If you've been working with web services using SOAP toolkits, you no doubt correctly answered "false." But if interoperability is not guaranteed, what's the point of the WS-I and its Basic Profile?

Well, the point is that even though interoperability is the primary goal of XML Web Services, it's hard to do it in practice. (In the words of computer scientist Jan L.A. Van De Snepscheut: "In theory, there is no difference between theory and practice. But, in practice, there is.") The WS-I Basic Profile 1.0 describes the lowest common denominator for interoperable web services. But toolkit implementers still have plenty of wiggle room, thanks to optionality built into the specifications that define web-service stacks like XML 1.0 with Namespaces, SOAP 1.1, WSDL 1.1, and XML Schema.

Web-service-specification development has been an exercise in inclusion. Software development factions that normally don't see eye-to-eye on programming language, data representation, communication, or much of anything, have found a common interest in XML, and the need to integrate their systems. In the interest of keeping as many factions as possible "on the bus" and not alienating any one group, shoulds, coulds, and mays have crept into the specifications. Covering everything from how XML is serialized on a wire, to data typing, message framing, and discovery, these specs were developed without specific recommendations on how they should be combined. This causes ambiguities when you look at web services as a whole. The WS-I Basic Profile 1.0, therefore, is a vertical slice through the layers of XML Web Services specs aimed at helping pragmatic developers.

Although testing offers no guarantee for interoperability, it can still tell you what is not interoperable. It is essential to pass interoperability guidelines like the WS-I Basic Profile after deployment, but more importantly, while developing or evaluating web services.

The WS-I Basic Profile 1.0 exists as a document, but it also has an executable form in the WS-I Testing Tools and in tools like SOAPscope 3.0 from MindReef (the company I work for; http://www.mindreef.com/). SOAPscope captures and analyzes SOAP messages and WSDL documents to verify that a web service conforms to the WS-I Basic Profile 1.0. More likely, it exposes problem areas that limit use, or highlight problems in already deployed services.

In practice, problems found early in development cost less to fix than problems found after deployment. Testing against the Basic Profile could help you learn that a cornerstone in your organization's new Service-Oriented Architecture has no chance of working with SOAP toolkits other than the one you chose for implementation. Or, that RPC/encoded-style services—still the simplest and most obvious starting point for many toolkits—is a dead end. This makes a strong case for running analysis tools during development, when you can still respond to potential interoperability problems.

Since SOAP toolkits are often responsible for generating WSDL and serializing messages, it's easy to fall into an "out-of-sight, out-of-mind" trap, later discovering that a particular coding practice that seemed natural in a favorite language is discouraged by the WS-I Basic Profile. Consider overloaded operation names: In Java or C#, overloaded methods are common and can clarify the intention of related methods. This practice is explicitly disallowed according to R2304 of the WS-I Basic Profile 1.0 because it introduces ambiguities in a message's wire signature, making it hard to tell if a message is invalid, or just intended for a different method. It can also foil toolkits that use the operation name to dispatch messages.

Passing the WS-I Basic Profile 1.0 is an essential quality metric for any web service, whether it's one you're developing, or one you're considering using. To achieving interoperability in a webservices development project:

  • Familiarize yourself with the WS-I Basic Profile 1.0.
  • Continuously test for interoperability during development.

  • Include interoperability tests when regression testing.

  • Since you can never guarantee interoperability, so be prepared to quickly solve interoperability issues in deployed web services.

It is important to continuously check services against the WS-I Basic Profile 1.0. With SOAPscope 3.0, select a WSDL or set of messages, and click the WS-I button. SOAPscope sets up the necessary configuration, runs the C#- or Java-based WS-I Testing Tool, and displays the resulting conformance report (Figure 4). SOAPscope also includes an analysis framework that provides more information about each problem encountered, plus an interactive view that shows you where problems are located.

DDJ


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.