Hi Kurt,

have you already had a look at: http://www.castor.org/how-to-use-references-in-xml.html

Regards
Ralf


KURT PETERS schrieb:
Well, I think I found my problem.  I have a class that points to another class, which then points back to the original class like this:
      top level
          /\
      link  site
       /
   device
     /
  link

What would be the recommended way to have the "link" class mapped differently if it came from a "device" vs coming from the "top level" class?  for instance, maybe I just want the "ID" from the link if it's from a "device"
Kurt


From: [email protected]
To: [email protected]
Date: Wed, 23 Jun 2010 16:06:24 -0600
Subject: [castor-user] overusing introspection

I'm trying to use castor with Spring and a mapping file.  It seems like it's using a mapping file correctly, but it seems like it's trying to cast via introspection null classes - add infinitum.
I get the DEBUG message:
Get descriptor for: org.exolab.castor.mapping.MapItem found: org.exolab.castor.xml.introspectedxmlclassdescrip...@1af328; descriptor for class: org.exolab.castor.mapping.MapItem; xml name: null

It seems like it's trying to map a getter that is not in the mapping file.  Is there a way to force castor to ONLY map those items specifically in the mapping file.  Below is the application context I'm using.  Any help would be GREATLY appreciated.
Kurt

applicationcontext:
  <?xml version="1.0" encoding="UTF-8" ?>
- <bean id="mcmreadwriteparse" class="org.mitre.mandi.common.MCMReadParse">
  <property name="marshaller" ref="castorMarshaller" />
  <property name="unmarshaller" ref="castorUnMarshaller" />
  <property name="mandiFile" value="testxmlfiles/input/testmcmin.xml" />
  <property name="netconfFile" value="testxmlfiles/output/mcm_Output.xml" />
  </bean>
- <bean id="castorUnMarshaller" class="org.springframework.oxm.castor.CastorMarshaller">
  <property name="ignoreExtraElements" value="true" />
  <property name="ignoreExtraAttributes" value="true" />
  </bean>
- <bean id="castorMarshaller" class="org.springframework.oxm.castor.CastorMarshaller">
  <property name="mappingLocation" value="classpath:org/mitre/mandi/planner/resources/netconf-mapping.xml" />
  <property name="ignoreExtraElements" value="false" />
  <property name="ignoreExtraAttributes" value="false" />
  </bean>
  </beans>

-- 

Syscon Ingenieurbüro für Meß- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstraße 11
72127 Kusterdingen
Germany

Tel.   +49 7071 3690 52
Mobil: +49 173 9630135
Fax    +49 7071 3690 98

Internet: www.syscon.eu
E-Mail: [email protected]

Sitz der Gesellschaft: D-72127 Kusterdingen
Registereintrag: Amtsgericht Stuttgart, HRB 382295
Geschäftsleitung: Jens Joachim, Ralf Joachim
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to