I got castor to working [unmarshalling] with an "unnested" xml file, but when I
nest the elements, it gives me an :error:
of: "Ignoring XXYY no descriptor was found" for anything under the main element
"Build".
Here's the "simple" xml:
[code]
<MCM>
<Build>1
<Add>2
<MNode>1
<Name>SiteA</Name>
<Agent id="agent007">
<Hostname>CentOSHost</Hostname>
</Agent>
</MNode>
</Add>
</Build>
</MCM>
[/code]
it seems to find everything, but has a problem with "descriptors"... here's the
TRACE output:
[code]
TRACE - #startElement: MCM
TRACE - #characters:
TRACE - #startElement: Build
TRACE - #characters: 1
TRACE - #startElement: Add
TRACE - #characters: 2
TRACE - #startElement: MNode
TRACE - #characters: 1
TRACE - #startElement: Name
TRACE - #characters: SiteA
TRACE - #endElement: Name
INFO - Ignoring Name no descriptor was found
TRACE - #characters:
TRACE - #startElement: Agent
TRACE - #characters:
TRACE - #startElement: Hostname
TRACE - #characters: CentOSHost
TRACE - #endElement: Hostname
INFO - Ignoring Hostname no descriptor was found
TRACE - #characters:
TRACE - #endElement: Agent
INFO - Ignoring Agent no descriptor was found
TRACE - #characters:
TRACE - #endElement: MNode
INFO - Ignoring MNode no descriptor was found
TRACE - #characters:
TRACE - #endElement: Add
INFO - Ignoring Add no descriptor was found
TRACE - #characters:
TRACE - #endElement: Build
TRACE - #characters:
TRACE - #endElement: MCM
[/code]
I've tried an amazing amount of variations on "location," including leaving it
out and still, it doesn't map:
[code]
<mapping>
<description>XML mapping of MANDI message will update for collection of
nodes.</description>
<!-- Class Mappings -->
<class name="org.mitre.mandi.MandiConfigMessage">
<map-to xml="MCM" />
<field name="messageType" type="java.lang.String">
<bind-xml name="Build" node="element" />
</field>
<field name="actionToTake" type="java.lang.String">
<bind-xml name="Add" location="MCM/Build" node="text" />
</field>
<field name="nodeToWorkOn" type="org.mitre.mandi.MandiSite">
<bind-xml name="MNode" location="MCM/Build/Add" node="element" />
</field>
</class>
<class name="org.mitre.mandi.MandiSite">
<field name="siteName" type="java.lang.String">
<bind-xml name="Name" node="element" />
</field>
<field name="agentID" type="java.lang.String">
<bind-xml name="id" location="agent" node="attribute" />
</field>
<field name="hostName" type="java.lang.String">
<bind-xml name="Hostname" location="agent" node="element" />
</field>
</class>
</mapping>
[/code]
Any help would be greatly appreciated.
Kurt