I need to 'de-batch' an XML file which contains a batch of request messages
and then process each request separately. I also need to validate each
instance within the batch against a schema and write any messages which
fail
schema validation to a seprate folder. i.e. if a batch contains 10 valid
instances of the message and one bad one, the bad one should be wriiten to
one folder and the other 10 to a different folder.
I also need to be able to submit single instances of the requst message
through the same receive location and validate the message against the
schema.
Currently I do this using two receive ****ts and receive locations plus an
envelope schema for the batch and a separate schema for an item in the
batch.
The first receive location has a simple XML receive pipeline and simply
debatches any batch requests into single messages and writes them to a
folder. The second receive location reads from the folder containing these
debatched messages and uses a validating pipeline to validate the
messages.
I tried doing this with a single custom pipeline which has both the
envelope
definition and the schema validation defined. This works OK for a batch
but
cannot handle a single instance of the message (it says the message does
not
conform to any of the defined schemas) - is using two receive locations
the
only way or is there a better way using just one pipeline and one receive
location.
Thanks