连接到 bugzilla 服务器时无法解析 loose.dtd
Failure to parse loose.dtd when connected to a bugzilla server
我正在尝试使用 xmlrpc 连接到 bugzilla 服务器,但在尝试解析 http://www.w3.org/TR/html4/loose.dtd 时出现错误。我见过其他解决方案,但据我了解,这些都是服务器端解决方案。我不拥有服务器。有什么办法可以修复这个客户端吗?
[Fatal Error] loose.dtd:31:3: The declaration for the entity "HTML.Version" must end with '>'.
Exception in thread "main" org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse server's response: The declaration for the entity
"HTML.Version" must end with '>'.
...
Caused by: org.xml.sax.SAXParseExceptionpublicId: -//W3C//DTD HTML 4.01 Transitional//EN; systemId: http://www.w3.org/TR/html4/loose.dtd; li
neNumber: 31; columnNumber: 3; The declaration for the entity "HTML.Version" must end with '>'.
...
Caused by:
org.xml.sax.SAXParseExceptionpublicId: -//W3C//DTD HTML 4.01 Transitional//EN; systemId: http://www.w3.org/TR/html4/loose.dtd; lineNumber: 3
1; columnNumber: 3; The declaration for the entity "HTML.Version" must end with '>'.
...
以下是生成错误的相关编辑 Scala 代码。
import org.apache.xmlrpc.client.XmlRpcClient
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl
import java.net.URL
import scala.collection.JavaConverters._
object BugzillaHello {
val portal = new URL("http://company.domain.com/bugzilla/xmlrpc.cgi")
def main(args: Array[String]): Unit = {
val config = new XmlRpcClientConfigImpl()
config.setServerURL(portal)
config.setEnabledForExtensions(true)
val client = new XmlRpcClient()
client.setConfig(config)
val cred = Map("login" -> "my username", "password" -> "my password").asJava
val result = client.execute("User.login", Array[Object](cred))
println("Result = " + result)
}
}
它不应该为 HTML 文件提供服务,而是因为 xlmrpc 未启用。
我正在尝试使用 xmlrpc 连接到 bugzilla 服务器,但在尝试解析 http://www.w3.org/TR/html4/loose.dtd 时出现错误。我见过其他解决方案,但据我了解,这些都是服务器端解决方案。我不拥有服务器。有什么办法可以修复这个客户端吗?
[Fatal Error] loose.dtd:31:3: The declaration for the entity "HTML.Version" must end with '>'.
Exception in thread "main" org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse server's response: The declaration for the entity
"HTML.Version" must end with '>'.
...
Caused by: org.xml.sax.SAXParseExceptionpublicId: -//W3C//DTD HTML 4.01 Transitional//EN; systemId: http://www.w3.org/TR/html4/loose.dtd; li
neNumber: 31; columnNumber: 3; The declaration for the entity "HTML.Version" must end with '>'.
...
Caused by:
org.xml.sax.SAXParseExceptionpublicId: -//W3C//DTD HTML 4.01 Transitional//EN; systemId: http://www.w3.org/TR/html4/loose.dtd; lineNumber: 3
1; columnNumber: 3; The declaration for the entity "HTML.Version" must end with '>'.
...
以下是生成错误的相关编辑 Scala 代码。
import org.apache.xmlrpc.client.XmlRpcClient
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl
import java.net.URL
import scala.collection.JavaConverters._
object BugzillaHello {
val portal = new URL("http://company.domain.com/bugzilla/xmlrpc.cgi")
def main(args: Array[String]): Unit = {
val config = new XmlRpcClientConfigImpl()
config.setServerURL(portal)
config.setEnabledForExtensions(true)
val client = new XmlRpcClient()
client.setConfig(config)
val cred = Map("login" -> "my username", "password" -> "my password").asJava
val result = client.execute("User.login", Array[Object](cred))
println("Result = " + result)
}
}
它不应该为 HTML 文件提供服务,而是因为 xlmrpc 未启用。