What can go wrong?

To see what can go wrong with VO services, first we take a look at how we use VO services. We need to know where to find these services. Then we need to know how to query these services and how to interpret the results. Finally, we need to know how to validate the data.

Problems with VO Registry

Problems with services

Cone search and SIAP services use HTTP-GET as transport mechanism. Besides issues with underlying networking layers, web services based on HTTP-GET have their own set of problems. HTTP-GET does not provide any specialized support for handling web service exceptions.

SOAP problems

Interoperability amongst different SOAP implementations is one of the most common problems concerning web services. The two main types of SOAP encoding, rpc/encoded and document/literal, are both widely used, with newer implementations leaning towards document/literal. Both the VO Registry as well as the SkyNode SOAP implementations follow the document/literal encoding style. Axis default encoding style is rpc/encoded and extra care must be taken to communicate with document/literal implementation.

There are two ways to use WSDL to specify the communication interface between server and client. First, a tool can generate code in a programming language, for example Java, that describe needed data types, classes and methods. Programmers can then use the generated code to build applications. Alternatively, WSDLs can be interpreted in runtime. In this case, all methods and parameters binding occur also in runtime.

In the first case, on the client side, the WSDL is not longer needed once the code is generated. However, any changes in the WSDL require new cycles of code generation and compilation. When server and client are out of sync, unpredicted errors can occur that are very difficult to detect. On the other hand, when WSDL is processed in runtime, any incompatiblity in the interface can be detected and handled.

In both case, some knowledge of the WSDL is necessary to make the communication work. However, when WSDL is processed in runtime, mapping of data types can be automatically handled. This can be done with dynamically typed languages, such as PHP or Python, but also with statically typed languages such as Java because the serialization of SOAP messages is inherent dynamic.

SOAP exception handling

Another common problem with SOAP web services is the use of SOAP exceptions to describe errors situations. SOAP exceptions must be thrown by the server and caught by the client application. The server application must catch other exceptions before throwing SOAP exceptions. Otherwise, a plain stack trace could be returned to the client.

Other inconsistencies

Shui Hung Kwok
NVO Summer School 2005