With the new snapshot I used codegen on same schema and I got the same
binding.xml output as with 1.2.1
When I ran the jibx bind compiler (org.jibx.binding.Compile) against that
binding.xml I got the same error as before.

Thanks
Sachin



DSosnoski wrote:
> 
> The generated bindings had problems in a few cases where unnecessary 
> <structure> elements were being added, and I did simplify the cases I'd 
> found. I think your example fits one of them, but if you can give the 
> current code a try it'll let me know for sure.
> 
> Thanks,
> 
>   - Dennis
> 
> Dennis M. Sosnoski
> SOA and Web Services in Java
> Training and Consulting
> http://www.sosnoski.com - http://www.sosnoski.co.nz
> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
> 
> 
> 
> Sachin Mittal wrote:
>> This is how the schema is defined in our case:
>>  <xsd:element name="calendar_campaign_identifier">
>>     <xsd:complexType>
>>        <xsd:sequence>
>>           <xsd:element name="calendar_campaign_id" type="xsd:int"/>
>>        </xsd:sequence>
>>     </xsd:complexType>
>>  </xsd:element>
>>
>> Workaround suggested by Thomas before to simplify the binding fixed the
>> problem.
>> I would try the binding generated by codegen against latest jibx.
>>
>> I think codegen generates bindings too verbose. There should be a way to
>> generate binding simply as:
>>                 <structure test-method="ifCalendarCampaignIdentifier"
>> usage="optional" name="calendar_campaign_identifier">
>>                     <value style="element" name="calendar_campaign_id"
>> field="calendarCampaignId"/>
>>                 </structure>
>>
>> instead of (generated by codegen):
>>       <structure test-method="ifCalendarCampaignIdentifier"
>> usage="optional">
>>         <structure get-method="getCalendarCampaignId"
>> set-method="setCalendarCampaignId" name="calendar_campaign_identifier">
>>           <value style="element" name="calendar_campaign_id" type="int"/>
>>         </structure>
>>       </structure>
>>
>> My be we need more ways to configure codegen.
>>
>> Thanks
>> Sachin
>>
>>
>> DSosnoski wrote:
>>   
>>> Hi Sachin,
>>>
>>> There's no reason for you to add a <format> definition for int, since 
>>> JiBX gives you the handling for this automatically (see 
>>> http://jibx.sourceforge.net/binding/conversions.html for the full list 
>>> of default conversions).
>>>
>>> It looks like the binding is an error in the code generation from 
>>> schema, though. I'll send you (off-list) a link to a current build so 
>>> you can see if the problem has been corrected yet. How are 
>>> calendar_campaign_identifier and calendar_campaign_id defined in your 
>>> schema?
>>>
>>>   - Dennis 
>>>
>>> Dennis M. Sosnoski
>>> SOA and Web Services in Java
>>> Training and Consulting
>>> http://www.sosnoski.com - http://www.sosnoski.co.nz
>>> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
>>>
>>>
>>>
>>> Sachin Mittal wrote:
>>>     
>>>> Hi,
>>>> I am getting this above error.
>>>> My mapping is as followed:
>>>> <structure get-method="getCalendarCampaignId"
>>>> set-method="setCalendarCampaignId" name="calendar_campaign_identifier">
>>>>                     <value style="element" name="calendar_campaign_id"
>>>> type="int"/>
>>>> </structure>
>>>>
>>>> Also as per docs I have added a serializer and deserializer methods for
>>>> type
>>>> int:
>>>>     <format type="int" serializer="java.lang.String.valueOf"
>>>> deserializer="java.lang.Integer.parseInt"/>
>>>>
>>>> So even after all this its not working and I am getting this error when
>>>> binding is compiled:
>>>> Error: Need no-argument constructor or factory method for class int;
>>>>
>>>> Please help.
>>>>
>>>> Thanks
>>>> Sachin
>>>>
>>>>
>>>> -----
>>>> http://www.assembla.com/wiki/show/sachin_mittal about me: 
>>>>   
>>>>       
>>> ------------------------------------------------------------------------------
>>> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
>>> is a gathering of tech-side developers & brand creativity professionals.
>>> Meet
>>> the minds behind Google Creative Lab, Visual Complexity, Processing, & 
>>> iPhoneDevCamp asthey present alongside digital heavyweights like
>>> Barbarian
>>> Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
>>> _______________________________________________
>>> jibx-users mailing list
>>> jibx-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/jibx-users
>>>
>>>
>>>     
>>
>>
>> -----
>> http://www.assembla.com/wiki/show/sachin_mittal about me: 
>>   
> 
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals.
> Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, & 
> iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
> 
> 


-----
http://www.assembla.com/wiki/show/sachin_mittal about me: 
-- 
View this message in context: 
http://www.nabble.com/Need-no-argument-constructor-or-factory-method-for-class-int-tp23557952p23669081.html
Sent from the jibx-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to