Peter Wu wrote:
> ...
>
>   <mapping class="com.columboid.protocol.syncml.representation.VerDTD"
> name="VerDTD">
>     <value style="element" name="VerDTD" get-method="getVerDTD"
> set-method="setVerDTD"/>
>   </mapping>
>
>
> And actually, this mapping was generated by CodeGen with default settings
> from an XSD. 
>   

Ah, that would explain it then. :-)

The generated <mapping> is wrong, due to a bug in CodeGen which I 
actually fixed yesterday (http://jira.codehaus.org/browse/JIBX-309). The 
bug is actually much more serious than the initial statement suggested, 
applying to any global element definition using a simple type reference. 
It looks like the SyncML schema must use this type of definition.

So here's three possible solutions:

   1. Download the latest jibx-*-1.2.2SNAPSHOT jars from the Maven
      repository at http://www.jibx.org/maven/jibx/jars and use those.
   2. Wait another 2-3 days and I'll post a pre-release trial build for
      1.2.2, which I'm planning to do because there are so many changes
      from 1.2.1 (I'll email this list when I post it, and will have it
      up for about a week before the official 1.2.2 release)
   3. Use 1.2.1, but customize the code generation - what you'd want to
      do is use generate-all="false" and prefer-inline="true", then
      specify the specific top-level elements you want to generate with
      includes="SyncHdr name2 name3 ..." (see
      http://jibx.sourceforge.net/fromschema/codegen-customs.html for
      some discussion of customizations, or
      http://www.ibm.com/developerworks/java/tutorials/j-jibx2/)

3 is more effort, but is probably what you're going to want to do in the 
long run because it's going to be painful to work with a separate class 
for every single value in the XML document structure.

  - Dennis

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to