Hi All,

My earlier email may have been confusing. I do have a solution for
using JiBX for J2ME, which I am happy to offer to the community.

I would like to ask Dennis to integrate these changes to the Official
JiBX release, so I do not have to build a custom version.

If anybody interested, I can send over the source files.

Regards,

Adam


---------- Forwarded message ----------
From: Ádám Mautner <mautner.a...@gmail.com>
Date: Thu, Aug 13, 2009 at 9:48 PM
Subject: Fwd: JiBX for J2ME
To: jibx-users@lists.sourceforge.net


Hi All,

I am working on a project, which involves marshalling/unmarshalling
XML in J2ME.

I am using JiBX, which is great product. But I have realized it does
not have real support for J2ME.

After reading JiBX forums, I have compiled JiBX for J2ME. but it
turned out, I needed to do much more to get it working in J2ME.

Generally we should avoid using:

- sql.Date,
- Reflection
- ArrayList, Hashmap, List, Iterator, Collections, Comparator
- ClassLoader

I have fixed up the code using JEnable.

I can send in the source, if someone interested.

I could not fully compile JiBX, I got the following error:


    [java] Error during initialization; is jibx-run.jar in load classpath?
    [java] java.lang.IllegalArgumentException: Serializer
org.jibx.runtime.Utility.serializeSqlDate not

found
    [java]     at
org.jibx.binding.def.StringConversion.<init>(StringConversion.java:154)
    [java]     at
org.jibx.binding.def.ObjectStringConversion.<init>(ObjectStringConversion.java:116)
    [java]     at
org.jibx.binding.def.BindingDefinition.<clinit>(BindingDefinition.java:121)
    [java]     at org.jibx.binding.Compile.compile(Compile.java:205)
    [java]     at org.jibx.binding.Compile.main(Compile.java:374)

Few more things, I was using custom mapping generation for creating
XML Mapping from files.

Can you please add support for choice to custom mapping generation? Like:

 <class name="ClassA" requireds="a b c d">
       <choice id="1" fields="a b">
       <choice id="2" fields="c d">
 </class>

One other issue, Byte arrays will not be handled correctly, when using
custom generation.

The generated mapping is:

<collection get-method="getData" set-method="setData" name="data">
     <value name="byte" type="byte"/>
</collection>

The suitable mapping is:

<value style="element" name="data" get-method="getData" set-method="setData"/>

Please let me know, if you need more information.

Thank you,

Adam

------------------------------------------------------------------------------
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

Reply via email to