Hi,
Schneiders, Bernd wrote:
> Hi Joachim,
>
> Thank you for your quick and helpful answer.
>
> The problem was located in the mapping file. I used a wrong class name
> for mapping in my case <class
> name="eu.esdihumboldt.mediator.context.webmapcontext.impl.ViewContextTyp
> e"> instead of <class
> name="eu.esdihumboldt.mediator.context.webmapcontext.impl.ViewContext">
>
> My problem is solved now :-) ... after wasting 2 days.
>
> Maybe it would be a good idea to implement a warning message if the
> mapping file does not cover the complete classes.
Hmm, not really what we want, as Castor supports partial mapping files
with the rest being covered by the means of introspection.
>
> Best regards,
> Bernd
>
>
>
> Hello,
>
> it looks a bit like it doesn't use the mapping file... can you provide
> me the mapping file and classes to reproduce your problem?
>
> Regards
>
> Joachim
>
> 2008/5/21 Schneiders, Bernd <[EMAIL PROTECTED]>:
>> Hi,
>>
>>
>>
>> I've a problem by using a Marshaller.
>>
>>
>>
>> I've created some Java classes by using the SourceGeneratorMain tool
> form a
>> xsd file. Then I'm using
> org.castor.spring.xml.CastorResolverFactoryBean to
>> marshall an object.
>>
>>
>>
>> After marshalling these classes I got a XML object like this:
>>
>>
>>
>> <view-context valid="true">
>>
>> <version>1.1.0</version>
>>
>> <general valid="true">
>>
>> ...
>>
>>
>>
>> But it should be like this:
>>
>>
>>
>> <ViewContext version="1.1.0">
>>
>> <General>
>>
>> ...
>>
>> What I don't understand, that some month ago I got the last one, but I
> can't
>> remember what I've changed until then.
>>
>>
>>
>> My code to marshal is:
>>
>> Writer out = new StringWriter();
>>
>> ApplicationContext applicationContext = new
>> ClassPathXmlApplicationContext("WMCContext.xml");
>>
>> Marshaller marshaller =
>> (Marshaller)applicationContext.getBean("WMCMarshaller");
>>
>>
>>
>> marshaller.setWriter(out);
>>
>> marshaller.marshal(viewContext);
>>
>>
>>
>> and my application context is:
>>
>>
>>
>> <bean id="resolver"
>> class="org.castor.spring.xml.CastorResolverFactoryBean">
>>
>> <property name="mappingLocations">
>>
>> <list>
>>
>> <value>mappingWMC.xml</value>
>>
>> </list>
>>
>> </property>
>>
>> </bean>
>>
>>
>>
>> <bean id="WMCMarshaller"
>>
>> class="org.castor.spring.xml.CastorMarshallerFactoryBean">
>>
>> <property name="resolver"><ref bean="resolver"/></property>
>>
>> </bean>
>>
>>
>>
>> I'm using Castor 1.1.2.1, Spring 2.0.6 and Spring XML Castor 1.1
> Snapshot
>>
>>
>> How to solve this? Is there somewhere an option to set?
>>
>>
>>
>> Thanks,
>>
>> Bernd
>>
>> This e-mail and any attachment is for authorised use by the intended
>> recipient(s) only. It may contain proprietary material, confidential
>> information and/or be subject to legal privilege. It should not be
> copied,
>> disclosed to, retained or used by, any other party. If you are not an
>> intended recipient then please promptly delete this e-mail and any
>> attachment and all copies and inform the sender. Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
>
> This e-mail and any attachment is for authorised use by the intended
> recipient(s) only. It may contain proprietary material, confidential
> information and/or be subject to legal privilege. It should not be copied,
> disclosed to, retained or used by, any other party. If you are not an
> intended recipient then please promptly delete this e-mail and any attachment
> and all copies and inform the sender. Thank you.
>
>
>
> ---------------------------------------------------------------------
> 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