I would encourage you to drop the validation aspects within the integration layer altogether–especially in the publishable document. Detecting format errors within the integration layer is rife with issues that may or may not be easy to address there.
Here are the ways I deal with date-time fields, in order of preference:
-
Defined as string type, conforming to the W3C format (the format Mark described in his post). The first thing done for all interfaces when a doc comes in to IS is to normalize all date-time fields to this format. Validating for this is optional, and I usually prefer to turn it off.
-
Defined as Date type. All interfaces convert fields to a Date object. The interaction between IS and Broker automatically handles this type.
-
Defined as a string type, with no assumptions/work done to normalize date-time fields. The integration layer does nothing whatsoever to the data–just passes it through.
The key concept is to define a single internal format that is passed around IS and possibly to internal applications. When needed, convert to and from that format and the format needed by the specific interface (be it EDI, Siebel, SAP, Oracle, etc.) at the last possible moment in the integration.
If you really insist on doing validation at the field level with a custom date layout, try …/…/… I’m not sure you need the enclosing /( and )/ that you have in your example.
Side topic: What’s the rationale behind publishing an order?
#Integration-Server-and-ESB#edi#webMethods