cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christofer Dutz" <c.d...@upw.de>
Subject AW: Aegis databinding: Registering a custom type
Date Tue, 17 Mar 2009 13:09:28 GMT
Hi,

unfortunately this example configures the type mapping programmatically. I am configuring
Aegis using spring. As the AegisContext object has to be configured in a "prototype" spring
scope, It makes no sense to get an AegisContext, configure the mappings because a new context
is configured every time a context is requested.

This seems to be the only thing I cannot configure using spring.

Is there a way to do something like this:

    <bean id="aegisContext" class="org.apache.cxf.aegis.AegisContext" scope="prototype">
        <property name="readXsiTypes" value="true"/>
        <property name="writeXsiTypes" value="true"/>
        <property name="rootClassNames">
            <list>
                <value>de.upw.tiller.pgm.model.pgm.characteristics.impl.PgmSystemCharacteristicsImpl</value>
                <value>de.upw.tiller.pgm.model.pgm.results.impl.PgmResultsImpl</value>
            </list>
        </property>
        <property name="typeMappingRegistry">
            <bean class="org.apache.cxf.aegis.type.DefaultTypeMappingRegistry">
                <customMappings>
			<mapping class="org.safehaus.uuid.UUID" typeName="uuidString" type="de.upw.tiller.pgm.ws.datatypes.UuidType"/>
		    </customMappings>
            </bean>
        </property>
    </bean>

Which configures a TypeRegistry the same way as DefaultTypeMapping.createDefaultTypeMapping(...)
and adds the additional mappings configured in the customMappings list to this?

Chris




-----Ursprüngliche Nachricht-----
Von: Benson Margulies [mailto:bimargulies@gmail.com] 
Gesendet: Dienstag, 17. März 2009 13:28
An: users@cxf.apache.org
Betreff: Re: Aegis databinding: Registering a custom type

Grab the source and see the unit test under
org.apache.cxf.aegis.custom that I recently added with help from Brian
Relph.

On Tue, Mar 17, 2009 at 8:08 AM, Christofer Dutz <c.dutz@upw.de> wrote:
> Hi,
>
>
>
> I have created a custom type mapping for a third party UUID datatype to
> String. This works fine wherever I deal with single value UUIDs. For this I
> defined my mapping in the ".aegis.xml" files. Unfortunately this doesn't
> seem to work when dealing with Lists/Arrays/Sets of UUIDs. I did a little
> hack with a  ListOfUuidType custom type, but am rather unsatisfied with it.
>
>
>
> Somewhere I read that it should be possible to register my custom UUID type
> somewhere and wherever Aegis runs into a UUID object, it uses my custom
> mapping . how is this done?
>
>
>
> Chris
>
>
>
> PS: I documented all I did in:
>
> http://dev.c-ware.de/confluence/display/PUBLIC/Seting+up+Flex+to+communicate
> +with+Apache+CXF+web+service+using+Aegis+databinding
>
> So I didn't write all the details here again.
>
>
 

__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3942 (20090317) __________

E-Mail wurde geprüft mit ESET NOD32 Antivirus.

http://www.eset.com
 
 

__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3942 (20090317) __________

E-Mail wurde geprüft mit ESET NOD32 Antivirus.

http://www.eset.com
 


Mime
View raw message