[ 
https://issues.apache.org/jira/browse/CAMEL-12141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Arnab Santra updated CAMEL-12141:
---------------------------------
    Description: 
I am using camel rest DSL and enabled the rest binding feature to convert my 
xml to POJO internally after I receive the xml as input.So I am using 
*RestBindingMode.xml*.
Now In my XSD I have one long field let say my zipcode. In XML I am providing 
some string in the zipcode field like "AAA". Now when the internal restbinding 
happen it is not throwing any NumberFormatException for this instead it is 
populating "0" in the zipcode field.
I am using JAXB plugin in POM file that is generating the POJO class from my 
XSD automatically and using JAXB jar file in my classpath.

Example:
input xml
<?xml version="1.0" encoding="utf-8"?>
<address>
  <city>str1234</city>
  <line1>str1234</line1>
  <line2>str1234</line2>
  <state>str1234</state>
  <zipcode>vvv</zipcode>
</address>

output xml 
<address>
   <city>str1234</city>
   <line1>str1234</line1>
   <line2>str1234</line2>
   <state>str1234</state>
   <zipcode>0</zipcode>
</address>


  was:
I am using camel rest DSL and enabled the rest binding feature to convert my 
xml to POJO internally after I receive the xml as input.So I am using 
*RestBindingMode.xml*.
Now In my XSD I have one long field let say my zipcode. In XML I am providing 
some string in the zipcode field like "AAA". Now when the internal restbinding 
happen it is not throwing any NumberFormatException for this instead it is 
populating "0" in the zipcode field.
I am using JAXB plugin in POM file that is generating the POJO class from my 
XSD automatically and using JAXB jar file in my classpath.

Example:
input xml
<zipcode>AAA</zipcode>

output xml 
<zipcode>0</zipcode>



> Jaxb unmarshall populating wrong value instead of exception when value type 
> given wrong in Camel rest binding mode in rest DSL
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-12141
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12141
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jaxb, camel-jetty
>    Affects Versions: 2.18.3, 2.20.1, 2.21.0
>            Reporter: Arnab Santra
>            Priority: Major
>
> I am using camel rest DSL and enabled the rest binding feature to convert my 
> xml to POJO internally after I receive the xml as input.So I am using 
> *RestBindingMode.xml*.
> Now In my XSD I have one long field let say my zipcode. In XML I am providing 
> some string in the zipcode field like "AAA". Now when the internal 
> restbinding happen it is not throwing any NumberFormatException for this 
> instead it is populating "0" in the zipcode field.
> I am using JAXB plugin in POM file that is generating the POJO class from my 
> XSD automatically and using JAXB jar file in my classpath.
> Example:
> input xml
> <?xml version="1.0" encoding="utf-8"?>
> <address>
>   <city>str1234</city>
>   <line1>str1234</line1>
>   <line2>str1234</line2>
>   <state>str1234</state>
>   <zipcode>vvv</zipcode>
> </address>
> output xml 
> <address>
>    <city>str1234</city>
>    <line1>str1234</line1>
>    <line2>str1234</line2>
>    <state>str1234</state>
>    <zipcode>0</zipcode>
> </address>



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to