Keith, Thanx for getting back. I have done what you said and I still can't marshall it. I think it is actually binary data. My application is basically encapsulating http requests and responses. I am having difficulty with a oracle forms applet payload. The binary payload is ¼áÎê³êqhç. The base64 encoded form is %BC%E1%CE%EA%B3%EAq%1Fh%E7
So it looks like I need to handle binary data of some sort. Can castor automatically detect this? I get the following error. The character '?' is an invalid XML character java.io.IOException: The character '?' is an invalid XML character Steve ----- Original Message ----- From: "Keith Visco" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 15, 2003 5:17 PM Subject: Re: [castor-dev] marshalling object > > Stephen, > > Try setting the encoding to ISO-8859-1. An example is here: > > http://castor.exolab.org/xml-faq.html#How-do-I-set-the-encoding? > > --Keith > > > > Stephen Ince wrote: > > > >  > > I am having difficulty marshalling a java object. I am getting the > > following error. It looks like it is failing on some type of Unicode > > character. > > I am using castor .9.5. I tried using a java.io.PrintWriter but that > > didn't help. Does anyone have a clue how I should marshal the object? > > > > -------------------------------------------------------------------------- ---------------------------------------------------------------- > > public void marshallObject( Object obj, java.io.Writer os ) > > throws java.io.IOException, MappingException , MarshalException, > > ValidationException { > > Marshaller marshaller = new Marshaller(os); > > marshaller.setMapping( getMapping() ); > > marshaller.marshal(obj); > > } > > -------------------------------------------------------------------------- ---------------------------------------------------------------- > > > > > > Error > > com.opendemand.struts.webapp.recorder.ProfileExportAction: > > java.io.IOException: > > The character 'â-¼' is an invalid XML character > > java.io.IOException: The character 'â-¼' is an invalid XML character > > at > > org.apache.xml.serialize.BaseMarkupSerializer.characters(Unknown Sour > > ce) > > at > > org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1340) > > at > > org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1424) > > at > > org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1419) > > at > > org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1419) > > at > > org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:774) > > at com.opendemand.webmgrs.WebManager.marshallObject(Unknown > > Source) > > at > > com.opendemand.struts.webapp.recorder.ProfileExportAction.execute(Unk > > nown Source) > > at > > org.apache.struts.action.RequestProcessor.processActionPerform(Reques > > tProcessor.java:465) > > at > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja > > va:274) > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev > > > ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev