我必须在saiku服务器中创建一个新的数据源。我已经成功地在我的本地运行的angular saiku应用程序中创建了数据源,该应用程序在tomcat中运行。但是我已经尝试过使用JAVA代码创建数据源。我面对下面的问题,我粘贴了我的代码。代码是,
p s v m(){
String connectionname="saran";
String connectiontype="MONDRIAN";
String jdbcurl="jdbc:mysql://localhost:3306/drink";
String schema="/datasources/drink.xml";
String driver="com.mysql.jdbc.Driver";
String username="root";
String password="211218";
Response connection = Jsoup
.connect(
"http://localhost:8080/saiku/rest/saiku/admin/datasources/")
.header("Content-Type", "application/json)
.data(connectionname,connectiontype,jdbcurl,schema,driver,username,password)
.ignoreContentType(true)
.referrer("http://localhost:8080/")
.cookie("JSESSIONID", res.cookie("JSESSIONID"))
.userAgent(
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36")
.method(Method.POST).timeout(10000).execute();
}输出Errororg.jsoup.HttpStatusException: HTTP error fetching URL. Status=415, URL=http://localhost:8080/saiku/rest/saiku/admin/datasources/
我面临的另一个问题是,我没有看到任何Java源代码,saiku数据源方法的输入参数和参数是什么,以及它们是如何在JAVA代码中声明的。有没有可能看到JAVA Saiku服务器端的代码,我看到了git OSLB/Saiku我克隆了它,但我没有得到他们在本地浏览器中运行的saiku的angular应用程序中提到的urls。
https://stackoverflow.com/questions/38220852
复制相似问题