Friday, January 9, 2009

Cannot find the declaration of element 'Request' : AirAsia version of org.xml.sax.SAXParseException


Error in GetGTAHotelInfo..org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'Request'


Yupp... thats the very 'special' error message when i try to browse for the best available flight + hotel arrangement at GuangZhou, China by AirAsia.

Maybe below snippet can somewhat 'help' you guys at AA..

You need to set namespace awareness to true on the DocumentBuilderFactory.
XML schema validation requires namespace support.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org


....or....


The attempt to import an XML file results in the error messages given above.

Solution: Your XML file contains an invalid schema or namespace declaration. Check the request element for typographical errors or missing attributes. The request must have the following form:

xsi:noNamespaceSchemaLocation="PortalConfig_1.2.xsd"
...>


That's is for the first try. My second try resulting another error that stated... "Error in GetGTAHotelInfo.Object reference not set to an instance of an object."

Anybody?

0 comments: