cancel
Showing results for 
Search instead for 
Did you mean: 

XML Validation Error PI

Former Member
0 Kudos

Hi Experts,

In my Source Structure I have used a field TransactionDate of type XSD:date. I am passing a value 12062009(ddMMyyyy). I have set the XML Validation at the Integration Engine level. But I am getting the following error.

cvc-datatype-valid.1.2.1: '12062009' is not a valid value for 'dateTime'. at line 6, column 62

But I am not using the type XSD:dateTime.

Regards,

SS

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

Try passing yyyy-MM-DD which is XSD:Date format.

Regards,

Prateek

Former Member
0 Kudos

Thanks Prateek. I can see the difference when did the change as suggested.But the input date coming from the source side is ddMMyyyy. Can you please suggest?

Regards,

SS

Former Member
0 Kudos

Hi Sahu,

Please ask the source system guys to change the format they send becasue it is not matching with the schema. Else remove the xml validation or else change the date format in the xsd using alotva xml spy.

Regards,

---Satish

prateek
Active Contributor
0 Kudos

As suggested, you may either have to change the xsd entry to String from Date or else ask your sender party to change the format.

Regards,

Prateek

Answers (2)

Answers (2)

Former Member
0 Kudos

Having more or less the same problem with xsd:date, is there any help on what to use in the Details/pattern option of the Data Type definition ??

Former Member
0 Kudos

Hi,

The issue got resolved. We need to declare the variable(For Date or Time field) as XSD:String, and add regular expression for the pattern(Under Details Column for the data type).

The regular expression for the date format ddMMyyyy is

(0?[1-9]|[12][0-9]|3[01])(0?[1-9]|1[012])(19|20)?\d\d

Similarly, for Time format HH:mm, the regular expresion is

((([0-1]\d|2[0-3]):([0-5]\d))|([0-9]:([0-5]\d)))

Regards,

Subhendu

Edited by: Subhendu Sahu on Mar 31, 2010 10:10 AM

Former Member
0 Kudos

Hi Subhendu,

You can change the field of data type from XSD:date to XSD:string. And then transform the field type to xsd:date in the Mapping.

Regards.