The WS-I Basic Profile provides guidelines for conformance to Web Services specifications in order to build interoperable Web services. The WS-I Working Groups developed the WS-I Conformance Testing Tool to help developers determine whether their Web services are conformant with the Profile guidelines. A Profile Conformance Report can also be created from the WS-I Testing Tool Analyzer to document a conformance claim in your WSDL documents. Currently the C# and Java versions of the testing tool are available for download. By running the testing tool, much of the obvious violations of the WS-I Basic Profile 1.0 are reported. A conformance check on the WSDL document in Listing 4 results in the violation claim shown in Listing 6.
Listing 6. A failure report from the WS-I Testing Tools
Result: failed
Failure Message: The use attribute of a soapbind:body, soapbind:fault,
soapbind:header and soapbind:headerfault does not have value
of "literal".
Failure Detail Message:
SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
required=null
use=encoded
encodingStyles=[http://schemas.xmlsoap.org/soap/encoding/]
namespaceURI=http://cyclic.test
Element Location:
lineNumber=87
The failure message is self explanatory: "use=encoded" in the soapbind:body , soapbind:fault , soapbind:header or soapbind:headerfault is not considered conformant to the WS-I Profile. You should use "use=literal" instead. Since Document/encoded has no meaning, that is equivalent to saying that you should not use RPC/encoded .
Although the WS-I Conformance Testing Tool does not capture everything that might cause the Web services interoperability issues in the field, it is nonetheless a powerful tool. In parallel with the Web services development, incrementally developing a comprehensive test suite to capture potential interoperability issues is a best practice. For more details about the tool, refer to the articles in the Resources section.
Conclusion
The author stressed that the Web services semantics in WSDL must be carefully designed before the actual implementation, explained why RPC SOAP encoding is one of major roadblocks for Web services interoperability, and showed the importance of building comprehensive test suite to test for WS-I Profile conformance. Coming up in this series, the author will discuss interoperability issues resulting from inbound and outbound data types and namespace conventions. Read the next part now.
Resources
- Read pertinent specifications on WSDL, SOAP, and other standards:
- Determine which WSDL binding styles and uses are appropriate in the article Which style of WSDL should I use? by Russell Butek (developerWorks, October 2003).
- Get an overview of the architecture and functions of WS-I Test Tools in the article Understanding the WS-I Test Tools by Peter Brittenham (developerWorks, November 2003).
- See the tutorial Using the WS-I Test Tools with Java technology by Peter Brittenham for step-by-step instructions in using the Java versions of the WS-I test tools (developerWorks, November 2003).
- Find out more about the Web Services Interoperability Organization (WS-I) and IBM's commitment to interoperability.
- Visit the Developer Bookstore for a comprehensive listing of technical books, including hundreds of Web services titles .
- Want more? The developerWorks Web Services and SOA zone hosts hundreds of informative articles and introductory, intermediate, and advanced tutorials on how to develop Web services applications.
Comments