I read these two:

http://old.nabble.com/Exception-loading-XML-with-DTD-td25213294.html
http://stackoverflow.com/questions/1096285/is-scala-java-not-respecting-w3-excess-dtd-traffic-specs

Not sure what the answer is, some ugly work arounds are presented...

Presumably Lift's XML output *should* work with XML.Load?

- Alex

On Nov 9, 10:01 pm, Naftoli Gugenheim <naftoli...@gmail.com> wrote:
> Don't know but it's been asked so you should be able to search for it; I'm 
> not sure whether on this list or scala-user or both.
>
> -------------------------------------
>
> Alex Black<a...@alexblack.ca> wrote:
>
> Exception:
>
> java.io.IOException: Server returned HTTP response code: 503 for 
> URL:http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
>         at sun.net.www.protocol.http.HttpURLConnection.getInputStream
> (HttpURLConnection.java:1313)
>         at
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity
> (XMLEntityManager.java:677)
>         at
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity
> (XMLEntityManager.java:1315)
>         at
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity
> (XMLEntityManager.java:1282)
>         at
> com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource
> (XMLDTDScannerImpl.java:283)
>         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
> $DTDDriver.dispatch(XMLDocumentScannerImpl.java:1193)
>         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
> $DTDDriver.next(XMLDocumentScannerImpl.java:1090)
>         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
> $PrologDriver.next(XMLDocumentScannerImpl.java:1003)
>         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next
> (XMLDocumentScannerImpl.java:648)
>         at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument
> (XMLDocumentFragmentScannerImpl.java:510)
>         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
> (XML11Configuration.java:807)
>         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
> (XML11Configuration.java:737)
>         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse
> (XMLParser.java:107)
>         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse
> (AbstractSAXParser.java:1205)
>         at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl
> $JAXPSAXParser.parse(SAXParserImpl.java:522)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
>         at scala.xml.parsing.FactoryAdapter.loadXML(FactoryAdapter.scala:292)
>         at scala.xml.parsing.NoBindingFactoryAdapter.loadXML
> (NoBindingFactoryAdapter.scala:60)
>         at scala.xml.XML$.load(XML.scala:72)
>         at com.snapsort.dataServer.api.ServerTest$$anonfun$testBasic$1.apply
> (ServerTest.scala:16)
>         at com.snapsort.dataServer.api.ServerTest$$anonfun$testBasic$1.apply
> (ServerTest.scala:14)
>         at com.snapsort.common.Using$.apply(Using.scala:12)
>         at com.snapsort.dataServer.api.ServerTest.testBasic(ServerTest.scala:
> 14)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at junit.framework.TestCase.runTest(TestCase.java:168)
>         at junit.framework.TestCase.runBare(TestCase.java:134)
>         at junit.framework.TestResult$1.protect(TestResult.java:110)
>         at junit.framework.TestResult.runProtected(TestResult.java:128)
>         at junit.framework.TestResult.run(TestResult.java:113)
>         at junit.framework.TestCase.run(TestCase.java:124)
>         at junit.framework.TestSuite.runTest(TestSuite.java:232)
>         at junit.framework.TestSuite.run(TestSuite.java:227)
>         at org.junit.internal.runners.JUnit38ClassRunner.run
> (JUnit38ClassRunner.java:83)
>         at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run
> (JUnit4TestReference.java:46)
>         at org.eclipse.jdt.internal.junit.runner.TestExecution.run
> (TestExecution.java:38)
>         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
> (RemoteTestRunner.java:467)
>         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
> (RemoteTestRunner.java:683)
>         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
> (RemoteTestRunner.java:390)
>         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
> (RemoteTestRunner.java:197)
>
> On Nov 9, 9:43 pm, Alex Black <a...@alexblack.ca> wrote:
>
> > Hi, I'm attempting to write a basic unit test for a webservice I'm
> > implementing in Lift, by test looks like this:
>
> >       val foo = XML.load("http://localhost:8080";)
>
> > I'm getting an exception I assume because the XML parser is trying to
> > download the DTD and is getting denied.  Whats the best way to work
> > around this?
>
> > - Alex
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to