0
xmlrpcを使用してbugzillaサーバに接続しようとしていますが、解析するときにエラーが発生します。http://www.w3.org/TR/html4/loose.dtd。私は他のソリューションを見てきましたが、私はそれらがサーバー側のソリューションであることを理解しています。私はサーバーを所有していません。私はこのクライアント側を修正する方法はありますか?bugzillaサーバに接続したときに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 '>'.
...
以下は、エラーを生成する関連する編集済みのスケーラコードです。
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)
}
}