RE: ClasscastException - XmlAnyTypeImpl cannot be cast to - Error

pattabi <[email protected]>
Newsgroups gmane.text.xml.xmlbeans.user
Message-ID <[email protected]>
Thank you. Yes the xml input is of different schematype. Mistake was
corrected by using the right schema.


Cezar Andrei-3 wrote:
> 
> I'm not familiar with Spring Marshaller, but it seems that the source is
> not parsed in the schema context you expect.
> 
> Also you can declare your response an XmlObject and use changeType method.
> 
> Cezar
> 
>> -----Original Message-----
>> From: pattabi [mailto:[email protected]]
>> Sent: Monday, November 16, 2009 10:55 AM
>> To: [email protected]
>> Subject: ClasscastException - XmlAnyTypeImpl cannot be cast to - Error
>> 
>> 
>> Hi,
>> I searched the forum and googled but could not get a solution. hence
>> posting
>> it.
>> 
>> I am using Spring Marshaller with xmlbeans 2.4. In the bean config file,
>> I
>> am just defined the XmlbeansMarshaller with no properties set.
>> 
>> I am accessing it this way:
>> ResDecisionServiceType  response = (ResDecisionServiceType)
>> unmarshaller.unmarshal(source);
>> 
>> and am getting the following error:
>> org.apache.xmlbeans.impl.values.XmlAnyTypeImpl cannot be cast to
>> decisionserviceapp.ResDecisionServiceType.
>> 
>> Please help.
>> Thanks
>> 
>> 
>> --
>> View this message in context: http://old.nabble.com/ClasscastException---
>> XmlAnyTypeImpl-cannot-be-cast-to---Error-tp26375379p26375379.html
>> Sent from the Xml Beans - User mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/ClasscastException---XmlAnyTypeImpl-cannot-be-cast-to---Error-tp26375379p26390786.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.