About the XMLNSC Validation sample

The XMLNSC Validation sample demonstrates how WebSphere Message Broker's XMLNSC parser can validate XML messages against a schema.

Message flow

The processing in the sample consists of one message flow called XMLNSCVALIDATIONMF1. The following figure shows the XMLNSCVALIDATIONMF1 message flow:

XMLNSCVALIDATIONMF1 message flow

The XMLNSCVALIDATIONMF1 message flow is in the Message Broker project called XMLNSCVALIDATIONMF. The message flow performs the following tasks:

  1. Takes an XML message in through an MQInput node from the WebSphere MQ queue XMLNSCVALIDATIONMF1.IN.
  2. The MQInput node has the following properties defined on the:

    Input Message Parsing tab:

    Parser Options tab:

    Validation tab:

  3. The Out terminal of the MQInput node is wired to a Compute node called ProcessValidMessage. The Compute node is associated with ESQL that copies InputRoot to OutputRoot.
  4. The Out terminal of the Compute node is wired to an MQOutput node called OutputOK. The MQOutput node puts messages to queue XMLNSCVALIDATIONMF1.OUT.
  5. The Catch and Failure terminals of the MQInput node are wired to a second Compute node called ProcessExceptionList. This Compute node copies the relevant part of the ExceptionList to OutputRoot.
  6. The Out terminal of this Compute node is wired to an MQOutput node called OutputFailure. This MQOutput node puts messages to queue XMLNSCVALIDATIONMF1.FAIL.

Message set

Message set XMLNSCVALIDATIONMS specifies runtime domain XMLNSC and contains an XML schema called SampleMessageValidation.xsd. A message definition file has been created from this schema. The message set contains the following:

Broker archive file

The Message Broker project XMLNSCVALIDATIONMF contains the broker archive file for the sample, called XMLNSCVALIATION.BAR. The Message Broker project also contains the test messages used in the sample.

Test messages

The following test messages are used in this sample:

For more details of the messages, and the expected results from the sample, see Running the XMLNSC Validation sample.

Back to sample home