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:pattabiraman.meenakshisunda...@aig.com] > Sent: Monday, November 16, 2009 10:55 AM > To: user@xmlbeans.apache.org > 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: user-unsubscr...@xmlbeans.apache.org > For additional commands, e-mail: user-h...@xmlbeans.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org For additional commands, e-mail: user-h...@xmlbeans.apache.org