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


Reply via email to