Serialization of interfaces

From: Juri Papay <jp_at_ECS.SOTON.AC.UK>
Date: Wed, 07 May 2003 05:34:58 -0600

We would appreciate any help with the following problem:

1. We are currently trying to deploy a web service with several APIs using JAX-RPC.

2. The parameters and return types of the methods in these APIs are given as Java interfaces rather than classes,to make the API extensible.

3. For each parameter/return type interface there is an implementation class which is a JAX-RPC value type.

4. We create instances of these implementation classes using a factory (so keeping our implementation separate from our API in the standard factory design pattern).

5. However, the default behaviour of JAX-RPC reference implementation (specifically, wscompile) is to treat the parameters and return types as Java classes rather than interfaces, which means that the parameters of the tie classes and of the clients do not match up.

6. We understand that type mappers can be declared in the config.xml/jaxrpc-ri.xml (or, at least, in the previous
JWSDP using xrpcc) but we have been unsuccessful in getting wscompile to parse our declarations of type mappers.

Can you tell us whether we are taking the right approach and give an example of how to handle interfaces as parameter types and factories to create their implementation instances? We are currently trying to get this to work with JWSDP 1.1.