|
From: Patrick Y. <kc...@ce...> - 2003-11-08 01:38:28
|
Ronald, We wanted to reuse as many error values defined in the spec as possible. And of course the drawback is what you are suggesting: too general and the users cannot figure out clearly what went wrong. If the eb:Description can help, we suggest to keep the error value as ValueNotRecognized, and reporting a more information description in the eb:Description element, as you suggested. For the checking of value before sending out, this is a good suggestion. Currently a message even without correct schema could be sent out if the wrong part is not necessary for sending. I guess we have to have a module to validate the message before send. Thanks for your suggestion. We have filed this in our TODO list. :-) Regards, -Patrick ----- Original Message ----- From: "Ronald van Kuijk" <rv...@ab...> To: <ebx...@li...> Sent: Sunday, November 02, 2003 3:36 AM Subject: [ebxmlms-general] time-to-live wrong format error > Hi, > > I'm playing a little with time-to-live from the monitor application. > When I send a message with a time-to-live of 1d (one day) which is of > course in the wrong format. I get a nice error message back with a > "ValueNotRecognized" error: > > <eb:ErrorList > xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2 _0.xsd" > soap-env:mustUnderstand="1" eb:version="2.0" eb:highestSeverity="Error"> > <eb:Error eb:errorCode="ValueNotRecognized" eb:severity="Error"> > <eb:Description xml:lang="en-US"> > Value cannot be parsed / recognized > </eb:Description> > </eb:Error> > </eb:ErrorList> > > IMHO there are two things wrong with this error. The long description of > "ValueNotRecognized" according to the specs is: > > Although the document is well formed and valid, the element/ attribute > contains a value that could not be recognized and therefore could not be > used by the ebXML Message Service. > > According to the ebxml-ms schema type of TimeToLive is dateTime: > > <element name="TimeToLive" type="dateTime"/> > > But... all the long descriptions in the ebxml specs mention "well formed > and valid". Probably because they expect a schema-check to have taken > place before the document will be parsed by an MSH. So I do not know > what is the correct error to return in a situation like this. So making > the error more specific and/or including the location in the form of an > xpath statement. > > But shouldn't we also do a validation check before sending out the > message? Since the error comes back from the MSH, the creation of the > message in the Monitor probably does not include a validation of the > message. I think we should include at least one of these (use the > location in the error, or validate the message on creation) . The code > that generates the message is in MessageServiceHandler.java: > > if (ttlString != null) { > final Date timestamp = Utility.fromUTCString(ttlString); > EbxmlMessage errorMessage = null; > > if (timestamp == null) { > String err = ErrorMessages.getMessage( > ErrorMessages.ERR_HERMES_DATA_ERROR, > "cannot recognize TTL value in message"); > logger.warn(err); > errorMessage = generateErrorMessage > (ebxmlMessage, ErrorList.CODE_VALUE_NOT_RECOGNIZED, > ErrorList.SEVERITY_ERROR, > "Value cannot be parsed / recognized"); > } > > I think we should use the errorstring (err, or at least the > "cannot.....message" part) be used instead of the "Value cannot be > parsed / recognized" or the other signature of generateErrorMessage > which includes the location? > > Ronald > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > ebxmlms-general mailing list > ebx...@li... > https://lists.sourceforge.net/lists/listinfo/ebxmlms-general > |