当前位置: 代码迷 >> Web前端 >> 怎么用Guvnor REST API 获取规则文件的内容
  详细解决方案

怎么用Guvnor REST API 获取规则文件的内容

热度:582   发布时间:2013-09-11 17:59:58.0
如何用Guvnor REST API 获取规则文件的内容

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:215761642


我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html