Layer7 API Management

  • 1.  Error using Validate XML schema assertion

    Posted Oct 30, 2018 06:54 AM

    Hi Team,

     

    While using Validate XML schema assertion I am getting an error. However, the same regex for same value is working fine externally. But in policy manager it shows the below error.

    Kindly have a look and suggest what can be the possible cause-

     

    schema.failure = {Object[]} size = 23
    [0] = {String} "org.xml.sax.SAXParseException; cvc-pattern-valid: Value '200004003' is not facet-valid with respect to pattern '[A-Za-z0-9_\-]+$' for type 'valBillNumber'."
    [1] = {String} "org.xml.sax.SAXParseException; cvc-attribute.3: The value '200004003' of attribute 'BillNumber' on element 'Sanction' is not valid with respect to its type, 'valBillNumber'."
    [2] = {String} "org.xml.sax.SAXParseException; cvc-pattern-valid: Value 'EIS/201804003' is not facet-valid with respect to pattern '^[A-Za-z0-9()_+/|{}.+,-]+$' for type 'valSanctionNo'."
    [3] = {String} "org.xml.sax.SAXParseException; cvc-attribute.3: The value 'EIS/201804003' of attribute 'IFDNumber' on element 'Sanction' is not valid with respect to its type, 'valSanctionNo'."
    [4] = {String} "org.xml.sax.SAXParseException; cvc-complex-type.3.2.2: Attribute 'LandingAtCDDO' is not allowed to appear in element 'Sanction'."
    [5] = {String} "org.xml.sax.SAXParseException; cvc-pattern-valid: Value 'EIS' is not facet-valid with respect to pattern '[a-zA-Z0-9]+$' for type 'valRequestSource'."
    [6] = {String} "org.xml.sax.SAXParseException; cvc-attribute.3: The value 'EIS' of attribute 'RequestSource' on element 'Sanction' is not valid with respect to its type, 'valRequestSource'."
    [7] = {String} "org.xml.sax.SAXParseException; cvc-pattern-valid: Value '5106' is not facet-valid with respect to pattern '([0-9]{1,18})\.{0,1}([0]{0,2})$' for type 'valValidAmount'."
    [8] = {String} "org.xml.sax.SAXParseException; cvc-attribute.3: The value '5106' of attribute 'SanctionAmount' on element 'Sanction' is not valid with respect to its type, 'valValidAmount'."
    [9] = {String} "org.xml.sax.SAXParseException; cvc-pattern-valid: Value 'EIS-20180400300453' is not facet-valid with respect to pattern '^[A-Za-z0-9()_+/|{}.+,-]+$' for type 'valSanctionNo'."

     

    Thanks in advance, any suggestion would be really helpful.

     

    Regards,

    Himanshu



  • 2.  Re: Error using Validate XML schema assertion

    Broadcom Employee
    Posted Oct 30, 2018 11:51 AM

    Hi Himanshu,

     

    I do not have a out of the box answer , it may be better to raise a support case and provide the details 

    like Gateway version and a example of how you are using the assertion . 

     

    Regard Dirk 



  • 3.  Re: Error using Validate XML schema assertion

    Posted Oct 30, 2018 06:31 PM

    It appears that the schema wasn't followed, given the "schema failure" error text, but at the same time that error doesn't look like one that would be logged by the Gateway, so it's unclear if that's a custom error message or something else.

     

    Can you please clarify your use-case for us so we have some context to this error? Can you also explain where this error is seen specifically and what the full error is? Also, can you please clarify what you meant by "the same regex for same value is working fine externally" when compared to a failure with an error you see in Policy Manager, because I'm a bit confused by that statement. Finally, can you confirm if the error you see is actually inside of Policy Manager or is it from within the View Logs area of Policy Manager and thus is really seen in the Gateway logs?



  • 4.  Re: Error using Validate XML schema assertion
    Best Answer

    Broadcom Employee
    Posted Oct 30, 2018 06:53 PM

    Hi,

    ^, or $ is not needed in xsd

     

    Regards,

    Mark



  • 5.  Re: Error using Validate XML schema assertion

    Posted Oct 31, 2018 01:36 AM

    Hi All,

     

    Thanks for your valuable response. The issue is resolved.

     

     

    Regards,

    Himanshu