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>

using print $wsdl->explain we get the following example for this parameter
# is a xs:dateTime # Pattern: .+T.+Z dateTimeStamp => "2006-10-06T00:23:02Z"
Any tips? Thank you.

In reply to xml dateTime format pattern violation when using DateTime::Format::XSD by dlinetsk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.