Hi all,
 
I have created a custom Provider that performs some type mappings of interfaces. The project I am working in have some versioning requirements that forced me to implement multiple versions for each of my beans (mainly, to support older versions of the product).
 
This means that for a bean, let's say Task, I have to support a 1.0 and a 2.0 version, the newer one having more fields. I have created separated interfaces for each bean version, and a single class implementing all these interfaces that is used internally by the program. The pattern is something like:
 
    public interface Task {
      ...
    }
 
    public interface Task_2_0 extends Task {
      ...
    }
 
    public class TaskImpl implements Task_2_0 {
      ...
    }
 
After a couple of weeks of hard work, I managed to create a custom Axis EngineConfiguration implementation that allowed me to register the necessary type mappings for these classes/interfaces combination to work in a programmatic way.
 
This EngineConfiguration finds out via reflection the set of interfaces to deploy and fills a structure for each bean version:
 
    public class ApiReflector {
      String beanName;
      Class beanClass;
      Class beanInterface;
    }
 
And uses it to deploy the bean with the following code:
 
  private void deployMapping(TypeMapping tm, ApiReflector reflector) {
    SerializerFactory   isf = null;
    DeserializerFactory bdf = null;
   
    QName qname = new QName("urn:myurn", reflector.beanName);
 
    isf = new BeanSerializerFactory(reflector.beanInterface, qname);
    bdf = new BeanDeserializerFactory(reflector.beanClass, qname);
                                     
    tm.register( reflector.beanInterface, qname, isf, null );
    tm.register( reflector.beanClass, qname, isf, bdf );
  }

This works perfectly in Axis 1.0, but I guess most of the code is not portable to more recent Axis versions, not to mention other SOAP engines :-(
 
I would like to register these types via wsdd, but the last line of the code above is a great problem for me.
 
I am associating to the bean class the interface serializer, and the class deserializer. Reading the docs, it seems that WSDD does not support this.
 
Does anybody know how to express this combination in a wsdd file?
 
Thanks in advance,
 

GRIDSYSTEMS                    Rodrigo Ruiz Aguayo
Parc Bit - Son Espanyol        Analista Programador
07120 Palma de Mallorca       
[EMAIL PROTECTED]
Baleares - Espaņa              Tel:+34-971435085
www.gridsystems.com            Fax:+34-971435082

Reply via email to