In the end I have found a solution/workaround. I have changed in the xsd the
element into an attribute. This is the mapping
<mapping class="org.fao.figis.flattener.domain.service.core.SpeciesID"
type-name="SpeciesID" abstract="true">
<value style="attribute" name="speciesID" field="speciesID" />
</mapping>
<mapping class="org.fao.figis.flattener.domain.service.Get3AlphaCodeRequest"
name="Get3AlphaCodeRequest">
<structure map-as="SpeciesID" />
</mapping>
-----Original Message-----
From: VanIngen, Erik (FIES)
Sent: 04 November 2009 11:26
To: jibx-users@lists.sourceforge.net
Subject: [jibx-users] What is the binding definition for a top level element
containing the value?
Hi mailinglist!
What is the binding definition for a top level element containing the
value?
This is the xml which I would like to marshall/unmarshall:
<?xml version="1.0" encoding="UTF-8"?>
<fact:Get3AlphaCodeRequest
xmlns:fact="http://www.fao.org/fi/domain/flattener">fakeValue</fact:Get3Alpha
CodeRequest>
This is my failing attempt for a binding definition:
<?xml version="1.0" encoding="UTF-8"?>
<binding>
<namespace uri="http://www.fao.org/fi/domain/flattener"
prefix="fact" default="elements" />
<mapping
class="org.fao.figis.flattener.domain.service.Get3AlphaCodeRequest"
style="element"
name="Get3AlphaCodeRequest" field="speciesID">
</mapping>
</binding>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users