API Gateway: Schema validation fails with org.xml.sax.SAXParseException
search cancel

API Gateway: Schema validation fails with org.xml.sax.SAXParseException

book

Article ID: 189961

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

The below error is observed in the Gateway logs when performing XML schema validation.


 org.xml.sax.SAXParseException; cvc-datatype-valid.1.2.1: 'test.txt' is not a valid value for 'base64Binary'., org.xml.sax.SAXParseException; cvc-type.3.1.3: The value 'test.txt' of element '<TAGNAME>' is not valid.

Environment

All supported versions of the CA API Gateway

Resolution

This issue occurs because the element specified in the error message(in this case <TAGNAME>) is defined in the schema as 

<xsd:element name="TAGNAME" nillable="true" type="xsd:base64Binary"/>

It is expecting a base64binary encoded value. If you change the request to an encoded value it will succeed.

i.e:
<TAGNAME>bGF5ZXI3</TAGNAME>