Author |
Message
|
Mangesh1187 |
Posted: Thu Apr 18, 2013 2:24 am Post subject: Validate Message without using Message Set. |
|
|
Centurion
Joined: 23 Mar 2013 Posts: 116
|
can anyone tell me, how to validate a message without using message set ? |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Apr 18, 2013 2:36 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Yes, write a whole lot of ESQL/Java
Creating a message set/schema and properly enumerating it is IMHO well worth the trouble. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Last edited by smdavies99 on Thu Apr 18, 2013 3:43 am; edited 1 time in total |
|
Back to top |
|
 |
kimbert |
Posted: Thu Apr 18, 2013 3:24 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You have missed out a very important piece of information.
Why do you want to do this? |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Apr 18, 2013 3:31 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If you use v8, there are no message sets.
Plenty of message definitions, but that's not what you asked about... |
|
Back to top |
|
 |
mqsiuser |
Posted: Sun Apr 21, 2013 9:06 am Post subject: |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
smdavies99 wrote: |
Yes, write a whole lot of ESQL |
I found transforming (with ESQL) and validating meanwhile (with ESQL) gives you the best flexibility and performance.
Either the interface will successfully process the message or roll back (validation failed).
You can also drag in a "XSD Validation Node" and use an XSD (which is not a message set) ?! _________________ Just use REFERENCEs |
|
Back to top |
|
 |
kimbert |
Posted: Sun Apr 21, 2013 11:45 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
mqsiuser said:
Quote: |
I found transforming (with ESQL) and validating meanwhile (with ESQL) gives you the best flexibility and performance. |
I cannot work out exactly what you mean by 'validating...(with ESQL)'. Are you talking about calling the XMLNSC parser from ESQL, or something else? |
|
Back to top |
|
 |
goffinf |
Posted: Sun Apr 21, 2013 12:46 pm Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
kimbert wrote: |
mqsiuser said:
Quote: |
I found transforming (with ESQL) and validating meanwhile (with ESQL) gives you the best flexibility and performance. |
I cannot work out exactly what you mean by 'validating...(with ESQL)'. Are you talking about calling the XMLNSC parser from ESQL, or something else? |
Not sure if mqsiuser means in the same way, but we also often combine transformation logic with the purpose of selective validation. This simply means that if we get to the end of the transformation processing then all of the data that we care about insofar as the business process can be considered to be both complete and valid. If we don't, it means we have found something that makes the data unsuitable for this particular process (aka: invalid) at which point we can execute processing to return a validation error to the caller and anything else that we typically perform in our error processing.
We find this provides a more flexible approach than relying on XSDs because it allows for validation processing that is not supported by XSD as well as concepts such as 'must ignore unknown' (hence the name 'selective validation').
Fraser. |
|
Back to top |
|
 |
mqsiuser |
Posted: Sun Apr 21, 2013 1:52 pm Post subject: |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
goffinf wrote: |
selective validation. This simply means that if we get to the end of the transformation processing then all of the data that we care about insofar as the business process can be considered to be both complete and valid. If we don't, it means we have found something that makes the data unsuitable for this particular process (aka: invalid) at which point we can execute processing to return a validation error to the caller and anything else that we typically perform in our error processing.
We find this provides a more flexible approach than relying on XSDs because it allows for validation processing that is not supported by XSD as well as concepts such as 'must ignore unknown' (hence the name 'selective validation'). |
Thank you. Excellent explanations, also here.
Also note that when you throw an exception (in ESQL) on a "validation" error (during transformation), that you are then rolling back your transaction, which basically "restores" the in-message. So before going to 1. the (negative / validation error) customer response and 2. your own error-reporting you are left with the validation error/exception (in the ExceptionTree/List) and the (original) in-msg (and not a (partly) transformed msg), which is exactly what you want (in that (the validation error) case). _________________ Just use REFERENCEs |
|
Back to top |
|
 |
shanson |
Posted: Mon Apr 22, 2013 8:24 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
Quote: |
If you use v8, there are no message sets. |
Yes there are. Message sets are still fully supported in v8, they are needed if you are using the MRM domain. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Apr 23, 2013 5:29 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
shanson wrote: |
Quote: |
If you use v8, there are no message sets. |
Yes there are. Message sets are still fully supported in v8, they are needed if you are using the MRM domain. |
I was wondering who would feel the need to be pedantic about that...
I agree completely. I suspect that the original poster does not have the necessary level of understanding of the product to be aware of the distinctions being made here.
To provide a bit of education.
A message SET is a container of a particular type, that is represented by a folder under a specific type of Eclipse project, for message definitions that are used by the MRM parser or by the XMLNSC parser. V8 allows for several new types of containers that can hold both message flow resources and message definitions - applications, libraries, and services. These containers can hold message definitions that are used by the XMLNSC parser and by the DFDL parser as part of the same Eclipse project.
V8 does also continue to support v7 and earlier eclipse project types, and these can be linked into v8 application, library, and service containers.
The original question does not require any of the above information, nor does the validation of messages necessarily require any use of a MESSAGE SET container. It does always require the use of a message definition that is used by some parser. If the parser in question is the MRM parser, then it does require that the message definitions are contained within a Message Set.
But if it's an XML message, then an XSD can be just deployed directly to the EG without really needing to be in any sort of container. |
|
Back to top |
|
 |
|