I would file a bug with the JiBX Jira error tracking system:
http://jira.codehaus.org/secure/BrowseProject.jspa?id=10410
--
Thomas Jones-Low Softstart Services Inc.
[email protected] JobScheduler for Oracle
Ph: 802-398-1012 http://www.softstart.com
Sachin Mittal wrote:
> well the new mapping suggested below worked.
> btw the earlier mapping was generated by jibx codegen tool when provided
> with the schema (xsd) file.
>
> Thanks
> Sachin
>
>
>
> Thomas Jones-Low wrote:
>> Sachin Mittal wrote:
>>> Hi,
>>> Here I am using primitive type int. I cannot do anything like you have
>>> mentioned with int.
>>> I can change that to java.lang.Integer but again this class does not have
>>> any no argument constructor or factory method that returns new instance
>>> of
>>> Integer.
>>> Infact I had tried replacing int with java.lang.Integer and this still
>>> did
>>> not work.
>>>
>>> So question is how can we use primitive types in jibx mappings.
>>>
>> JiBX does not handle primitives well, it assumes everything is a going
>> into a class.
>>
>> I'm guessing (based upon your mapping fragment) your XML is:
>>
>> <calendar_campaign_identifier>12345</calendar_campaign_identifier>
>>
>> I would write the mapping for this as:
>> <value style="element" get-method="getCalendarCampaignId"
>> set-method="setCalendarCampaignId" name="calendar_campaign_id">
>>
>> Get rid of the <structure ...> and <type ...> tags. The conversion from
>> string to integer is done in the get/setCalendarCampaignID() methods.
>>
>>
>
>
> -----
> http://www.assembla.com/wiki/show/sachin_mittal about me:
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users