XSD validation for Messages from MQ

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Aquilis
Participant
Posts: 204
Joined: Thu Apr 05, 2007 4:54 am
Location: Bangalore
Contact:

XSD validation for Messages from MQ

Post by Aquilis »

Hi All,

Have to do XSD validation for Messages subscribed from the MQ.
What are pre-requistes for this?
like -
1. Where to keep the XSD file for Validation to happen, since Messages doesn't exist on any physical Path?

Kind Regards-
Aquilis
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

The validation is done via the xmlInput Stage, or, if you are on 8.5.x or 8.7, with the xml stage.....in the former, the xsd is stored somewhere on the DataStage server and pointed to within the header of the incoming document (it's "possible" the it may find the xsd via url, but there were issues with this in early 8.x and I haved tried it in awhile)......in the latter, the stage is defined at design time with the xsd, which you import via the library manager.

Both methods are options for you if you are in 8.7 or 8.5 with the right patches.

Learn how validation works with the xml stage types before you include mq into the mix. Test with a sample xml in a flat file and read it with the folder atage or external source stage, depending on your job type.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Aquilis
Participant
Posts: 204
Joined: Thu Apr 05, 2007 4:54 am
Location: Bangalore
Contact:

Post by Aquilis »

XMLInput Stage works when XSD fname included in XML file header and same XSD is placed under XML Data file location(physically lying on ETL server) .
But for MQ, Messages will be in MQ server and how XML Input stage will detect the XSD? from which Location it will pull in even though it's mentioned in header.

Concern is, where to keep XSD file when Messages are subscribed from MQ.
Aquilis
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

The Stage only works when the name of the xsd is "in" the header....after you read the payload from MQ, run it thru a transformer and "zap" the correct xsd into it. If you are using xmlInput, that's the only way to do it. If the messages are not "too" big, it should be fine. If they get really large, you could run into column size issues --- check also some of the APT variables that are needed for large buffer sizes on links.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply