dlinetsk has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
we are using XML::Compile::WSDL11 to compile our schema, and trying to send a message to a webservice. The Message Header has a dateTime parameter (xs:dateTime) that has a pattern .+T.+Z.
We tried setting this parameter to "2006-10-06T00:23:02Z" but got error error: string `2006-10-06T00:23:02Z' does not match pattern `.+T.+Z'
our XSD for this parameter is:<xs:simpleType name='DateTimeWithTimezoneInfo'> <xs:annotation> <xs:documentation>Designates a date/time stamp in UTC format. Th +e following formats are accepted: YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DDT +hh:mm:ss.xxxZ Where : - YYYY indicates the year - MM indicates the month - DD indicates the day - T is a fixed character, indicating the time section - hh indicates the hour, zero pre-pended - mm indicates the minute, zero pre-pended - ss indicates the second, zero pre-pended - xxx indicates the millisecond, zero pre-pended - Z is a fixed character, indicating UTC time zone</x +s:documentation> </xs:annotation> <xs:restriction base='xs:dateTime'> <xs:pattern value='.+T.+Z'/> </xs:restriction> </xs:simpleType>
Any tips? Thank you.# is a xs:dateTime # Pattern: .+T.+Z dateTimeStamp => "2006-10-06T00:23:02Z"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: xml dateTime format pattern violation when using DateTime::Format::XSD
by Corion (Patriarch) on May 27, 2015 at 17:13 UTC |