The immediate exception is evidence of some pretty interesting confusion, insofar as the 'schema schema' is being added to the schema collection twice.
Can I ask you to grab a 2.2 snapshot and see what you see? If not that, how about a JIRA with a self-contained test case? On Mon, Feb 16, 2009 at 12:59 PM, relphie <[email protected]> wrote: > > Hello, I am having problems registering custom type mappings in CXF 2.1 with > an Aegis databinding. Previously in CXF 2.0, my type mappings were > registered successfully. > > My basic need is that I have a service that returns a Map, keyed by a bean > interface. I needed to tell cxf what implementation to use for the keys so > that hashcode and equals were implemented correctly. > > Now, my service is throwing exception on startup, and it only occurs when I > add my custom type mappings: > > Caused by: org.apache.ws.commons.schema.XmlSchemaException: Schema name > conflict in collection. Namespace: http://www.w3.org/2001/XMLSchema > at > org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:104) > at > org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:83) > > Is there a better way to tell CXF what class to use for the map key, or can > someone point out what I need to change in my configuration code? Here is > what I am currently doing: > > JaxWsProxyFactoryBean clientFactory = new JaxWsProxyFactoryBean(); > clientFactory.setAddress(url); > > clientFactory.setServiceClass(com.cerner.healthe.organization.service.OrganizationService.class); > > AegisDatabinding dataBinding = new AegisDatabinding(); > OrganizationAliasTypeRegistrar typeRegistrar = new > OrganizationAliasTypeRegistrar(); > typeRegistrar.setDataBinding(dataBinding); > typeRegistrar.register(); > clientFactory.setDataBinding(dataBinding); > > organizationClient = (OrganizationService) clientFactory.create(); > > And the registrar: > > public class OrganizationAliasTypeRegistrar { > private AegisDatabinding dataBinding; > > /** > * Registers the ImpreciseDateTimeType to the data binding. > */ > public void register() { > dataBinding.getAegisContext().getTypeMapping().register( > OrganizationAliasType.TYPE_CLASS, > OrganizationAliasType.QNAME, > new OrganizationAliasType()); > } > > /** > * Sets the data binding. > * > * @param dataBinding > * The data binding to set. > */ > public void setDataBinding(AegisDatabinding dataBinding) { > this.dataBinding = dataBinding; > } > } > -- > View this message in context: > http://www.nabble.com/Aegis-Type-Mapping-tp22042434p22042434.html > Sent from the cxf-user mailing list archive at Nabble.com. > >
