Simone Bordet wrote:
Hi Øyvind !
Create a startup class that just registers all your types in the
defaultTypeMapping of the typeMappingRegistry. I am using a Spring bean
to do this, getting the typeMappingRegistry from the xfire context.
I tried this code:
XFire xfire = XFireFactory.newInstance().getXFire();
CustomTypeMapping typeMapping = new CustomTypeMapping();
typeMapping.register(Foo.class, new QName("http://foo.com/", "Foo",
"foo"), new FooType());
TypeMappingRegistry typeMappingRegistry = new DefaultTypeMappingRegistry();
typeMappingRegistry.registerDefault(typeMapping);
Maybe try this instead:
TypeMappingRegistry typeMappingRegistry = new DefaultTypeMappingRegistry();
TypeMapping tm = typeMappingRegistry.getDefaultTypeMapping();
tm.register(yourType);
Cheers,
- Dan
--
Dan Diephouse
(616) 971-2053
Envoi Solutions LLC
http://netzooid.com