Topic
23 replies Latest Post - ‏2012-11-26T14:37:16Z by SystemAdmin
SystemAdmin
SystemAdmin
6772 Posts
ACCEPTED ANSWER

Pinned topic Datapower: Schema Validation Error

‏2012-11-20T22:24:39Z |
Hello everyone;

In the process of tailor the XML Firewall, i got an error, showing something similar with Schema, the error is "Schema Validation Error" and we cannot proceed with the rest of the process.

We have configured the Multi-protocol Gateway and XML Firewall and changed the .xsd file and .dpa files without success.
Any ideas?

Regards from Colombia.
Cristian C.
Updated on 2012-11-26T14:37:16Z at 2012-11-26T14:37:16Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6772 Posts
    ACCEPTED ANSWER

    Re: Datapower: Schema Validation Error

    ‏2012-11-20T22:26:27Z  in response to SystemAdmin
    Sorry i forgot the attach file.

    My apologies.
    Cristian
    • kenhygh
      kenhygh
      1340 Posts
      ACCEPTED ANSWER

      Re: Datapower: Schema Validation Error

      ‏2012-11-21T00:20:30Z  in response to SystemAdmin
      Cristian,
      That error message is telling you exactly what it doesn't like.

      "unrecognized element {http://presentacion.ws.recaudos.v2/}consultarRecaudo"

      Somewhere in your XML you have such an element.

      Ken
      • SystemAdmin
        SystemAdmin
        6772 Posts
        ACCEPTED ANSWER

        Re: Datapower: Schema Validation Error

        ‏2012-11-21T13:51:53Z  in response to kenhygh
        Hello!

        Thanks for your answer, so, should i have to delete this line in my xml? I have to edit my xml file for this namespace?

        Regards from Colombia
        Cristian.
        • kenhygh
          kenhygh
          1340 Posts
          ACCEPTED ANSWER

          Re: Datapower: Schema Validation Error

          ‏2012-11-21T15:31:39Z  in response to SystemAdmin
          Well, you can try deleting that element, or spelling it correctly, or determine why it doesn't match your schema. Could your XML match a different version of your schema?

          Ken
  • SystemAdmin
    SystemAdmin
    6772 Posts
    ACCEPTED ANSWER

    Re: Datapower: Schema Validation Error

    ‏2012-11-21T15:52:59Z  in response to SystemAdmin
    Hello !

    We have a error with xsd schema and we rebuild this file and now it seems what it's ok now but in our tests we have a new error:

    Http://127.0.0.1/recaudos/R_0000105: cvc-complex-type 2.3: element { http://presentacion.ws.recaudos.v2/} return of type {presentacion.ws.recaudos.v2/}ConfirmarRecaudoOutputXML may not have text content

    This error is caused by a wrong configuration in xsd file? Or maybe something is missing in the xsd file?

    Thanks for your help and regards from Colombia

    Cristian.
  • SystemAdmin
    SystemAdmin
    6772 Posts
    ACCEPTED ANSWER

    Re: Datapower: Schema Validation Error

    ‏2012-11-21T16:49:28Z  in response to SystemAdmin
    Hello!

    Here are the attachment with the files of my project.

    Regards and thanks for the help.

    Cristian

    Attachments

    • HermannSW
      HermannSW
      4238 Posts
      ACCEPTED ANSWER

      Re: Datapower: Schema Validation Error

      ‏2012-11-21T19:27:57Z  in response to SystemAdmin
      You attached WSDL and XSDs in last attachment.
      And you attaached log message screenshots before.
      You did not attach a failing request file, that would be needed.

      > Http://127.0.0.1/recaudos/R_0000105: cvc-complex-type 2.3: element { http://presentacion.ws.recaudos.v2/} return of type
      > {presentacion.ws.recaudos.v2/}ConfirmarRecaudoOutputXML may not have text content
      >
      > This error is caused by a wrong configuration in xsd file? Or maybe something is missing in the xsd file?
      >
      Most likely it is caused by a request file which does not validate according your Schema.

       
      Hermann<myXsltBlog/> <myXsltTweets/>
      • SystemAdmin
        SystemAdmin
        6772 Posts
        ACCEPTED ANSWER

        Re: Datapower: Schema Validation Error

        ‏2012-11-21T19:45:11Z  in response to HermannSW
        Hello!

        what do you mean about request file? the dpa files? where i can find them?

        Regards from Colombia
        Cristian.
        • Daviiid
          Daviiid
          282 Posts
          ACCEPTED ANSWER

          Re: Datapower: Schema Validation Error

          ‏2012-11-22T07:14:27Z  in response to SystemAdmin
          Hello

          Hermann talked about the xml message sent by the client through the datapower. And the other sent by the provider to datapower.
      • SystemAdmin
        SystemAdmin
        6772 Posts
        ACCEPTED ANSWER

        Re: Datapower: Schema Validation Error

        ‏2012-11-22T13:43:39Z  in response to HermannSW
        Hello

        Here are the Response Files used in the project, it contains the string send by the MQ to DataPower and the XML files of request and response send by the client and for the client.

        Cristian.
        • HermannSW
          HermannSW
          4238 Posts
          ACCEPTED ANSWER

          Re: Datapower: Schema Validation Error

          ‏2012-11-22T14:02:32Z  in response to SystemAdmin
          Hi Cristian,

          it seems that "Trama.txt" is the backend response, is that correct?
          If so, which "response .dpa" is invoked to turn Trama.txt into XML?
          [stammw@oc3478527637 Files]$ ll *.dpa
          -rw-rw-r--. 1 stammw stammw 18627 Nov 14 12:03 ConsultaPago_request.dpa
          -rw-rw-r--. 1 stammw stammw 19071 Nov 14 12:03 ConsultaPago_response.dpa
          -rw-rw-r--. 1 stammw stammw 19715 Nov 14 12:03 RegistraPago_request.dpa
          -rw-rw-r--. 1 stammw stammw 17732 Nov 14 12:03 RegistraPago_response.dpa
          [stammw@oc3478527637 Files]$
          


          Is it correct that you do a validate action against "valida_entradas_y_salidas.xsd" on the output of the Binary Transform action?
          [stammw@oc3478527637 Files]$ grep ConfirmarRecaudoOutputXML *.xsd
          Recaudos.xsd:  <xsd:element name="return" type="tns:ConfirmarRecaudoOutputXML" nillable="true"  />  
          Recaudos.xsd:  <xsd:complexType name="ConfirmarRecaudoOutputXML">
          [stammw@oc3478527637 Files]$
          


           
          Hermann <myXsltBlog/> <myXsltTweets/>
          Updated on 2014-03-25T02:45:38Z at 2014-03-25T02:45:38Z by iron-man
          • SystemAdmin
            SystemAdmin
            6772 Posts
            ACCEPTED ANSWER

            Re: Datapower: Schema Validation Error

            ‏2012-11-22T14:26:01Z  in response to HermannSW
            Hi Hermann

            The "Trama.txt" file is the request send to the backend, the .dpa file which is invoked to turn this txt file into XML is "ConsultaPago_request.dpa", this occurs if the "Trama.txt" contains a "C" Character into the first line of the string like this: "99990000000105000C", if this string contains a "P" character like this: "99990000000105000P", then the .dpa file which is invoked is "RegistraPago_request.dpa"

            It's correct about the validate action, this .xsd file is invoked in a policy in the XML Firewall; and generates the binary transform action. the "valida_entradas_y_salidas.xsd" file invokes a file called "Recaudos.xsd".

            Cristian.
            • HermannSW
              HermannSW
              4238 Posts
              ACCEPTED ANSWER

              Re: Datapower: Schema Validation Error

              ‏2012-11-22T14:45:16Z  in response to SystemAdmin
              Hi Cristian,

              now I am confused.
              The log error messages (from your attached LogsDatapower.zip) are for the response rule processing.
              So the validate action seems to fail on the response rule.
              What is the flow on your response rule?
              And what is the response returned from backend to DataPower?

               
              Hermann<myXsltBlog/> <myXsltTweets/>
              • SystemAdmin
                SystemAdmin
                6772 Posts
                ACCEPTED ANSWER

                Re: Datapower: Schema Validation Error

                ‏2012-11-22T15:06:16Z  in response to HermannSW
                Hi Hermann

                Sending the screenshots of the Response Rule and the response returned from backend to datapower.

                Cristian.
                • HermannSW
                  HermannSW
                  4238 Posts
                  ACCEPTED ANSWER

                  Re: Datapower: Schema Validation Error

                  ‏2012-11-22T15:48:22Z  in response to SystemAdmin
                  Hi Cristian,

                  we are getting closer.
                  From screenshot XMLFirewallResponseRule5.png we see the content of context dpvar_20.
                  From a previous of your .zip attachments I took a similar file and converted it to match the shown context content.
                  Please find the file attached, it has a typo somewhere.

                  Validating that file against "valida_entradas_y_salidas.xsd" results in this different error for me currently:
                  cvc-wildcard 2: unrecognized element {http://presentacion.ws.recaudos.v2/}confirmarRecaudoResponse

                   
                  Hermann<myXsltBlog/> <myXsltTweets/>
                  • SystemAdmin
                    SystemAdmin
                    6772 Posts
                    ACCEPTED ANSWER

                    Re: Datapower: Schema Validation Error

                    ‏2012-11-22T16:15:57Z  in response to HermannSW
                    Hi Hermann;

                    Thanks for your answer, so; should i have to "rebuild" the validate rule? or is a problem with the soap_header_request.xsl? this is another error but its more easy to resolve?
                    With the file you semd in the attachment, i have to load this file in my system for testing?
                    i can see that is a problem with the match between string and xml file right?
                    The file that you send me contains an syntax error?

                    So; the solution is to create a validation that convert the string to xml and delete the soap headers in the response file?

                    Cristian.
                    • HermannSW
                      HermannSW
                      4238 Posts
                      ACCEPTED ANSWER

                      Re: Datapower: Schema Validation Error

                      ‏2012-11-23T08:49:21Z  in response to SystemAdmin
                      Hi Christian,

                      this gets by far too complicated, creating files from screenshots is error prone.
                      What we have learned sofar is that response validation fails.
                      The reponse returned from backend is "valida_entradas_y_salidas.txt".

                      Please attach an export of the service -- just the response rule is fine if you do not want to attach everything.
                      Then it should be really easy to see your validation error by returning "valida_entradas_y_salidas.txt" from a simulated backend.

                      (What I typically do to simulate backend responses easily is 1) set request-type to passthru 2) set backend to a passthru XML FW 3) "send" backend response to service)

                       
                      Hermann<myXsltBlog/> <myXsltTweets/>
                      • SystemAdmin
                        SystemAdmin
                        6772 Posts
                        ACCEPTED ANSWER

                        Re: Datapower: Schema Validation Error

                        ‏2012-11-23T17:14:50Z  in response to HermannSW
                        hello Hermann

                        thanks for your message, i will send the request rule for your verification while we realizenthentest in our datapower enviroment. in the end of the day i send this file.

                        Regards from Colombia
                        Cristian.
  • SystemAdmin
    SystemAdmin
    6772 Posts
    ACCEPTED ANSWER

    Re: Datapower: Schema Validation Error

    ‏2012-11-26T14:37:16Z  in response to SystemAdmin
    hello

    we advance in the solution of the incident, now we try to solve a couple of problems with our dpa files, it seems we have a trouble with our .xsl files and do not function correctly.

    Regards.
    Cristian.