Hi,

darrickc wrote:
> That makes sense, thanks for the definitive answer. 
You are welcome.

> To answer your previous question... it's a pain because we don't really have
> an installer for our product, we just deploy a jar. Now well have to extract
> this xml file from the jar and use it, or deploy 2 files, neither of which I
> like.
Sorry, but I do not understand your pain here. Why do you need to deploy
two files or extract the mapping file from the JAR ? As long as the
mapping file is available on the classpath (e.g. within the JAR file),
you can easily access it by using e.g. ClassLoader.getResource() and
pass it to Castor XML.

Regards
Werner
> 
> 
> Werner Guttmann wrote:
>> Hi,
>>
>> You will need a class mapping for the class that has the Map property,
>> and a field mapping for just this property. As long as you use the
>> auto-complete attribute in the enclosing class mapping, that should be it.
>>
>> Regards
>> Werner
>>
>> darrickc wrote:
>>> So, in order to get Map<String, Map<String, Object>> to marshal/unmarshal
>>> I'll have to use a mapping file just for this object? 
>>>
>>>
>>>
>>> Werner Guttmann wrote:
>>>> Hi,
>>>>
>>>> darrickc wrote:
>>>>> Or do I have to start using a mapping file if I want this sort of
>>>>> Marshalling/Unmarshalling to work? 
>>>> Yes, but with the auto-complete feature in place, just map whatever is
>>>> required and leave the rest to the introspector.
>>>>
>>>>> Up to this point I've just used
>>>>> Introspection instead of a mapping file as I have relatively simple
>>>>> objects
>>>>> to marshal. Now I want to have a Map <String, Map<String,
>>>>> CustomObject>>
>>>>> marshalled through Castor. I've tried to implement this with
>>>>> introspection
>>>>> but when I unmarshal I run into problems as it's complaining about not
>>>>> being
>>>>> able to cast from MapItem to java.util.Map. I would much prefer to
>>>>> continue
>>>>> using introspection as deploying a mapping file would really be a pain
>>>>> for
>>>>> me.
>>>> Really ? Why ?
>>>>
>>>>> Any help would be greatly appreciated!
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>     http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
> 

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

    http://xircles.codehaus.org/manage_email


Reply via email to