You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Don Stewart <Do...@corizon.com> on 2005/05/25 12:52:35 UTC

RE: ClassCastException

Can you post the whole schema as I cannot see from the schema supplied
the whole problem.
 
Thanks
 
Don

________________________________

From: moraru_etc@spymac.com [mailto:moraru_etc@spymac.com] 
Sent: 25 May 2005 10:37
To: user@xmlbeans.apache.org
Subject: Re: ClassCastException 


I made a small test: i used xmlbeans to generate a sample xml file then
i tried to parse it. I received ClassCastException again!!! Please help
me!!



On Wed May 25 2:38 , <mo...@spymac.com> sent:



	Hi!

	I'm receiving a ClassCastException when i'm trying to parse a
VALID xml file.I'm sure the xmlbeans.jar is the right one and the schema
and xml file are OK. PLease give me a clue. I pasted here a piece form
xml file and xml schema

	Code:

	fr.xxx.yyy.zzz.RETURNDATADocument rd =
fr.xxx.yyy.zzz.RETURNDATADocument.Factory
	     .parse(new File("xxxx.xml"));

	Schema:

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

	<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

	<xsd:annotation>

	<xsd:documentation xml:lang="en">

	Results of Hotel Details request, for a given Hotel Code. 

	Any error messages in "MESSAGE" element with

	text "Error" followed by the error description

	</xsd:documentation>

	</xsd:annotation>

	<xsd:element name="RETURNDATA">

	<xsd:complexType>

	 

	-----------XML:

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

	<RETURNDATA type='HDR'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='http://xx.yy.zz/aaa/HotelDetailRequestV4R
cv.xsd'>

	<MESSAGE>Details of the requested Hotel</MESSAGE>

	<DATA HOTEL_CODE='AUS' COUNTRY_CODE='AUS' CITY_CODE='SZG'
PRINCIPAL_CODE='TRAVCO' BOARD_BASIS_CODE='BB' CATEGORY_CODE='HOT'>

	<HOTEL_NAME>Austrotel</HOTEL_NAME>

	<COUNTRY_NAME>AUS</COUNTRY_NAME>

	............

	</DATA>

	</RETURNDATA>


	
--------------------------------------------------------------------- To
unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org For additional
commands, e-mail: user-help@xmlbeans.apache.org 


--------------------------------------------------------------------- To
unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org For additional
commands, e-mail: user-help@xmlbeans.apache.org