I am using a custom datetime type with the Aegis binding, very similar to org.codehaus.xfire.aegis.type.basic.DateTimeType. I have registered the type with the type mapping.

The mapping works for bean properties of that type - it does not work if I use the type as service method parameter: I get type="ns1:SomeDateTime" in the WSDl operation parameter instead of type="xsd:dateTime".

1. How can I register a custom type also for parameter/return types?
2. Should I register the custom type separately for every service or can I register it once for all services?

Here's the code which registered the custom type for a single service but does not work for parameters:

    XFire xfire = XFireFactory.newInstance().getXFire();
    ObjectServiceFactory serviceFactory = new ObjectServiceFactory();

    Service service = serviceFactory.create(ItemsService.class);
    service.setInvoker(new BeanInvoker(new ItemsImpl()));
    TypeMapping tm = ((AegisBindingProvider)
      service.getBindingProvider()).getTypeMapping(service);
    tm.register(new SomeDateTimeXFireType());
    xfire.getServiceRegistry().register(service);

Werner

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to