It looks like it's trying to access the resource as HTML. To fix this, use <content-type>application/xml</content-type>, and use <force-content-type>true</force-content-type>.

This said, the initial resource should have the correct content-type header...

-Erik

Eric van der Vlist wrote:
Hi,

I am trying to access to an external XML document through HTTP and get
the following exception:

2005-02-04 20:37:21,711 ERROR org.orbeon.oxf.pipeline.InitUtils null - 
Exception at http://fr.wikipedia.org/wiki/Ruche, line -1, column -1
java.lang.NullPointerException
        at 
org.orbeon.oxf.processor.generator.URLGenerator$URLResourceHandler.readHTML(URLGenerator.java:738)
        at 
org.orbeon.oxf.processor.generator.URLGenerator$URLResourceHandler.readHTML(URLGenerator.java:698)
        at 
org.orbeon.oxf.processor.generator.URLGenerator$1.readImpl(URLGenerator.java:358)
        at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:945)
        at 
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1106)
        at 
org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:340)
        at 
org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:345)
...

TCP traces show that the XML document is returned with a text/html media
type (a common practise if you want that the document shows up in
Internet Explorer):

HTTP/1.0 200 OK
Date: Sun, 30 Jan 2005 15:54:15 GMT
Server: Apache
X-Powered-By: PHP/4.3.10
Content-Language: fr
Vary: Accept-Encoding,Cookie
Cache-Control: private, s-maxage=0, max-age=0, must-revalidate
Last-Modified: Tue, 7 Dec 2004 18:27:40 GMT
Content-Type: text/html; charset=utf-8
X-Cache: MISS from benet.wikimedia.org
Age: 445383
X-Cache: HIT from lopar.wikimedia.org
Connection: close

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="fr" lang="fr" dir="ltr">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="KEYWORDS" content="Ruche,Abeille,Apiculture,Cire,Miel,Rucher" />


Is that the reason of the exception (and of the fact that a readHTML method is called?

If yes, is there a way to override this behaviour and force the document
to be read as XML?

Note that when I execute a XSLT transformation (with Saxon) on the same
URL from the command line, I don't get this error.

Thanks,

Eric



------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ orbeon-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to