Hello,

Pokidov Dmitriy schrieb:
> Hi all.
> 
> I want use spring for create unmarshaller. My bean definitions:
> 
>  <bean id="springXmlContext"
> class="org.castor.spring.xml.InternalContextAdapter"/>
> 
>  <bean id="unmarshaller"
>   class="org.castor.spring.xml.CastorUnmarshallerFactoryBean">
>   <property name="springXmlContext">
>   <ref local="springXmlContext"/>
>   </property>
>  </bean>
> 
> All works ok, but I don't understand how I can add mappings to
> InternalContext using spring.
> 
> 
> -- 
> With best regards, Pokidov N. Dmitriy

have a look at the Castor documentation 
(http://www.castor.org/spring-xml-intro.html).
The documentation shows how to set up and inject a resolver 
(CastorResolverFactoryBean) including your mapping definitions:

Example, taken from the Castor website:

<bean id="unmarshaller"
      class="org.springframework.xml.castor.CastorUnmarshallerFactoryBean">
   <property name="resolver"><ref local="resolver"/></property>
</bean>

<bean id="resolver" 
class="org.springframework.xml.castor.CastorResolverFactoryBean">
   <property name="mappingLocations">
      <list>
         <value>mapping1.xml</value>
         <value>mapping2.xml</value>
      </list>
   </property>
</bean> 

For working examples, see testcases at the SVN repository 
(http://svn.codehaus.org/castor/spring-xml/trunk/).

Regards,
Lukas

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

    http://xircles.codehaus.org/manage_email


Reply via email to