论坛首页 Java企业应用论坛

如何用Guvnor REST API 获取规则文件的内容

浏览 2453 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2012-01-30  

WebClient client = WebClient.create("http://127.0.0.1:8080/");
String content = client.path("guvnor/rest/packages/com.samples/assets/Store.drl/source").accept("text/plain").get(String.class);
System.out.println("content:"+content);

现在直接输出报错误如下:
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
client:org.apache.cxf.jaxrs.client.WebClient@1e97f9f
Status : 500
Headers :
Content-Length : 2555
Connection : close
Date : Mon, 30 Jan 2012 08:56:59 GMT
Server : Apache-Coyote/1.1
Content-Type : text/html;charset=utf-8
Error message :
<html><head><title>Apache Tomcat/6.0.29 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException: Servlet.init() for servlet CXFServlet threw exception
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
 org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
 org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)

如何转换上面获得的content,顺利输出结果。

从网上只找到了转换 “决策表” 的方法,如下:
GuidedDecisionTable52 dt = GuidedDTXMLPersistence.getInstance().unmarshal(content);

如能帮助感激不尽
如有规则引擎,Guvnor REST API 等相关资料给我发一份,谢谢啊!
qq:215761641

论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics