|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Validation in MQInput Node |
« View previous topic :: View next topic » |
Author |
Message
|
bshankar |
Posted: Wed Jul 30, 2008 4:23 am Post subject: Validation in MQInput Node |
|
|
Novice
Joined: 14 Jul 2008 Posts: 16
|
Hi All,
I am using wmb6.1 and i'm developping a message flow project. I am using messageset (xmlnsc domain) for validating the xml. and validation will happen in Mqinput node itself.
my problem is
I will get an xml of 4MB size and the strutcture will be like below
<wwprttxn type="price" id="99999999" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="price.xsd">
<price type="I" xsi:type="referencePriceElementType">
<offering>1234</offering>
<startdate>2000-01-02</startdate>
<currency>USD</currency>
<cabletype>ANN</cabletype>
<cableid>123456789012</cableid>
<releasets>2007-01-01T13:57:12.456</releasets>
<pricevalue>12345678901.12</pricevalue>
<pricepointtype>MOD</pricepointtype>
<pricepointvalue>123</pricepointvalue>
<country>US</country>
<pricetype>PUR</pricetype>
<onshore xsi:nil="true"></onshore>
<enddate>2007-12-31</enddate>
<pricevalueusd>123.456</pricevalueusd>
<factor>1.0</factor>
</price>
<price>............</price>
<price>............</price>
<price>............</price>
<price>............</price>
<price>............</price>
<price>............</price>
<price>............</price>
<price>............</price>
...........................................
.........................................
<wwprttxn>
like this there will be 200 to 300 price tags.
as part of validation what input node doing is if it fails in any of the price validations ( there will be 200 price tags and each price tag will be having approx. 20 different tags).For example one price tag failed in the validation out of 200 price tags then it is sending the entire message to fail node.
but i dont want to send the entire message to fail node. I want to do some business logics on the successful price tags in compute node ( which is connected to out terminal of the input node) and I want to skip the failure price tags.
can any one help on this issue.
Thanks
bhargav |
|
Back to top |
|
 |
sridhsri |
Posted: Wed Jul 30, 2008 4:55 am Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
Here is a thought to handle that: Model another message just for the price tag. When you receive the message, split it into n "price" tags. Validate just that part (RCD followed by a Validate node). |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 30, 2008 5:05 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
sridhsri is correct.
- Your description of the problem is very clear, and I can see exactly what you want to do, and why.
- WMB does offer a validation option which does something like this. If you set Failure Action to 'Exception List' then you will get a list of *all* the validation failures in the input XML. However, there are two problems with it. First, it stops at the first *structural* problem ( so a missing tag or an extra tag would stop the parse ). Second, the message still goes to the failure terminal, not the output terminal.
So I think you should do as sridhsri suggests. You do not need to model another message for this. Just make sure that your schema contains a global element for the 'price' tag. If the price element is local, it should be simple to make it global. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|