4 Replies Latest reply on Sep 10, 2006 3:37 AM by 499743

    Dynamic Schema Validation

    499743
      Hi,

      I would like to be able to validate input message to a bpel process dynamically, based on a particular xml tag inside the input message. For example, if the tag field is "A" , validate against schema A, if "B", validate against schema B etc. Is that possible?

      Thank you
        • 1. Re: Dynamic Schema Validation
          499743
          Anyone? Sorry if my question is a bit ambiguous. All I am trying to do is, to have the input message to my 1 BPEL Process to be validated, but the input message can be of 4 xml structures, and therefore i need 4 schemas, and depending on which schema it conforms to, the flow of the bpel process down the bottom will differ. Just wonder if this is possible?

          Much appreciate any help.
          • 2. Re: Dynamic Schema Validation
            485567
            I am curios what is your goal. To validate your message against schema or have 4 different ways how to invoke your bpel process?
            I would say the second one.
            And this you can achieve by creating for different operations in WSDL with different input message types. And then place as first activity "pick" (check "create instance" checkbox) with 4 different onMessage handlers each corresponding to respective operation with specific message type.
            Will this solve your use case?
            • 3. Re: Dynamic Schema Validation
              499743
              I'll give it a try, I might also need to validate input XML Message against 4 different schemas, if the message conform to just one of the schema, then the bpel process will be continued, otherwise if no matching schema, throw an exception. Wonder if this is possible, at the moment i can only validate the input against one schema, don't know how to do it with multiple schemas.

              Thank you
              • 4. Re: Dynamic Schema Validation
                499743
                nevermind, i figured out using xsd:choice in a single schema file instead of using multiple xml schema files. Thanks Peter for your help.

                Regards