Hi Keith,
Thanks for the response.
But I am doing an 'unmarshalling' rather than a marshalling.
The method invoked is Unmarshaller.unmarshal(InputSource source)
Wherein, the InputSource is retrieved from a web service.
How can i set an encoding on an Unmarshaller ?
And the encoding for the xml response from the remote webservice is not in
my control.
Is there a way ( other than modifying Configuration.java and
LocalConfiguration.java to return org.xml.sax.XMLReader instead of
org.xml.sax.Parser )
to customize castor to use SAX2 API's ( ie. XMLReader and ContentHandler ,
instead of Parser and DocumentHandler ) ?
Any help will be greately appreciated.
cheers
Rajeev
Keith Visco <[EMAIL PROTECTED]> on 09/24/2003 01:55:51 PM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:
Subject: Re: [castor-dev] HELP NEEDED!! - [castor-dev] Castor on
OS/390-USS => "An invalid XMLcharacter (Unicode: 0x14)was found..."
This may help, try setting the encoding to ISO-8859-1, as in the
following example:
http://castor.exolab.org/xml-faq.html#How-do-I-set-the-encoding?
--Keith
Rajeev Koolath wrote:
>
> Hi,
> I saw the discussion thread at the castor mailing archive.
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg08918.html
>
> I am facing the same problem with Websphere 4.0 on OS/390 with
> castor.
>
> Stack Trace:-
>
> org.xml.sax.SAXException: Parsing Error : An invalid XML character
> (Unicode: 0x14) was found in the prolog of the document.
> Line : 1
> Column : 2
> at
>
org.exolab.castor.xml.UnmarshalHandler.fatalError(UnmarshalHandler.java:1469)
>
> at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1264)
> at
>
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:590)
>
> at
>
org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.dispatch(XMLDocumentScanner.java:750)
>
> at
>
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:383)
>
> at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1120)
> at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
> at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:556)
> at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:487)
> at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:628)
>
> I hope somebody would have already solved this problem.
>
> I would appreciate greately if you can help me solve this issue.
>
> thanks.
> Rajeev
>
> ******************* PLEASE NOTE *******************
> This E-Mail/telefax message and any documents accompanying this
> transmission may contain privileged and/or confidential information and
is
> intended solely for the addressee(s) named above. If you are not the
> intended addressee/recipient, you are hereby notified that any use of,
> disclosure, copying, distribution, or reliance on the contents of this
> E-Mail/telefax information is strictly prohibited and may result in legal
> action against you. Please reply to the sender advising of the error in
> transmission and immediately delete/destroy the message and any
> accompanying documents. Thank you.
>
> -----------------------------------------------------------
> 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
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev