Topic
5 replies Latest Post - ‏2013-11-03T22:36:25Z by HermannSW
DPUser77
DPUser77
70 Posts
ACCEPTED ANSWER

Pinned topic Different behaviour of Schema validation in Error Rule

‏2013-10-24T21:22:26Z |

Hi,

Requirement is to the send the response back to the client in the same format in case of both error/success. So after transformations i have kept schema validation checks in the response and error rule for testing so that i can check at DP itself as a unit testing like if am generating a proper message or not.

In response rule its working fine, but when i tried validating same format in error rule ~ the schema validation gives "unrecognized element {http://schemas.xmlsoap.org/soap/envelope/}Envelope" error.I also tried with store schema xsds. It is also giving same.

Not able to figure out the exact issue as message is same.

Please share your thoughts.

 

  • HermannSW
    HermannSW
    4133 Posts
    ACCEPTED ANSWER

    Re: Different behaviour of Schema validation in Error Rule

    ‏2013-10-25T07:26:17Z  in response to DPUser77

    Error rule gets called with response retrieved from backend, including SOAP Envelope.

    In response rule that gets removed before validation. 
    [funny, it is not possible to post my original word for "removed" here ;-)]

    In error rule validate action you can specify "what" to validate, these are the options:

    •     Body or Details
    •     Body
    •     Envelope
    •     Ignore Faults

     

    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

    Updated on 2013-10-25T07:33:29Z at 2013-10-25T07:33:29Z by HermannSW
    • DPUser77
      DPUser77
      70 Posts
      ACCEPTED ANSWER

      Re: Different behaviour of Schema validation in Error Rule

      ‏2013-10-26T14:08:09Z  in response to HermannSW

      Hi Hermann,

      I tried the below scenario.

      Tried to validate the SOAP message against the W3 soap-envelope schema with option Envelope specified in validate action.Result was validation successfull.

      Tried to validate the SOAP message against my xsd with Body specified in validate action.Result was validation successfull.

      Tried to validate the SOAP message against my xsd with Envelope specified in validate action.Result was validation unsuccessfull with error unrecognized element {http://schemas.xmlsoap.org/soap/envelope/}Envelope".

      Can you suggest  what might be the possible reason and how to rectify it.

      Regards,

      Der11.

      • HermannSW
        HermannSW
        4133 Posts
        ACCEPTED ANSWER

        Re: Different behaviour of Schema validation in Error Rule

        ‏2013-10-27T08:30:35Z  in response to DPUser77

        > Can you suggest  what might be the possible reason and how to rectify it.
        >

        Obviously your Schema is written for validation of the Body of the SOAP messages (as most are).

        The two positive validations you described are exactly what a WSP does.

        Since the validation for Envelope is donw by SOAP request type automatically, you have to validate against Body only in your MPGW service.


        Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

        • DPUser77
          DPUser77
          70 Posts
          ACCEPTED ANSWER

          Re: Different behaviour of Schema validation in Error Rule

          ‏2013-11-01T17:59:27Z  in response to HermannSW

          Hi Hermann,

          Sorry for the delay in response as I am on leave and my counterpart is looking into it and he only replied  after my initial post.

          The main issue is body  schema validation is working perfectly fine in response rule but when we do the same validation in error rule its failing. And i did this check as front end (C program) is having issues parsing the SOAP message. But when we are sending the same message through response rule its working fine.

          We are using MPGW and in order to facilitate the front end , DP will send the same message format in both error and proper response.

          In response rule its working perfectly fine. Issue is with error rule only.

          Please share your thoughts