JaxWsServerFactoryBean serviceFactory = new JaxWsServerFactoryBean();
serviceFactory.getServiceFactory().setDataBinding(binder);
DefaultTypeMappingRegistry tmr = (DefaultTypeMappingRegistry)binder.getTypeMappingRegistry();
Configuration configuration = tmr.getConfiguration();
configuration.setDefaultMinOccurs(1);
configuration.setDefaultNillable(false);
// Create a properties hashmap
Map<String, Object> props = new HashMap<String, Object>();
// Enable the writing of xsi:type attributes