Web Services Interoperability between J2EE and .NET - Part 1

Page 4 of 4
  1. Introduction
  2. Start from WDSL
  3. Still RPC/encoded?
  4. Test conformance with the WS-I Conformance Testing

Test conformance with the WS-I Conformance Testing

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

You might also like...

Comments

About the author

Wangming Ye United States

Wangming Ye is an IBM Certified Enterprise Developer and a Sun Certified Enterprise Architect for J2EE Technology. He began as a developer in the DCE/DFS department at Transarc Corporation (late...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only two kinds of languages: the ones people complain about and the ones nobody uses” - Bjarne Stroustrup