I get "SAXException: Parsing Error : Element type "commonConfirmation" must be declared." when using Castor
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   david_palmer
Posted On:   Friday, July 9, 2004 02:40 AM

Why do I get "SAXException: Parsing Error : Element type "commonConfirmation" must be declared." when using Castor to unmarshall an XML message : : Mapping map = new Mapping(); map.loadMapping("e:/otp/deploy/translation/otp/NdfTradeDataMapping.xml"); File file = new File("h:/Trade_2119487.xml"); Reader reader = new FileReader(file); Unmarshaller unmarshaller = new Unmarshaller(map); unmarshaller.setValidation(false); CommonConfirmation confoInfo = (CommonConfirmation)unmarshaller.unmarshal(reader); : : The XML contains: <?xml version="1.0" encoding="UTF-8&quo   More>>

Why do I get "SAXException: Parsing Error : Element type "commonConfirmation" must be declared." when using Castor to unmarshall an XML message


			
:
:
Mapping map = new Mapping();
map.loadMapping("e:/otp/deploy/translation/otp/NdfTradeDataMapping.xml");
File file = new File("h:/Trade_2119487.xml");
Reader reader = new FileReader(file);
Unmarshaller unmarshaller = new Unmarshaller(map);
unmarshaller.setValidation(false);
CommonConfirmation confoInfo = (CommonConfirmation)unmarshaller.unmarshal(reader);
:
:


The XML contains:

<?xml version="1.0" encoding="UTF-8"?>

xsi:schemaLocation="http://ops.dapro.com/ns/otp file://e:/otp/deploy/schema/otp/CommonConfirmation.xsd"
xmlns="http://ops.dapro.com/ns/otp"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

.....the rest of the message

   <<Less

Re: I get "SAXException: Parsing Error : Element type "commonConfirmation" must be declared." when using Castor

Posted By:   Christopher_Koenigsberg  
Posted On:   Friday, July 9, 2004 06:28 AM

Look at the "xsi:schemaLocation" value. Needs fixing, probably.
About | Sitemap | Contact