2016-08-23 60 views
1

它应该是一件简单的事情,它可能是,但我没有通过Orbeon文档中描述的REST API获取草稿表单的XML数据。试图通过REST API将表单数据作为XML获取

我做了以下更改属性 - 本地dev.xml文件:

<property 
    as="xs:string" 
    processor-name="oxf:page-flow" 
    name="page-public-methods" 
    value="GET HEAD POST"/> 

<property 
    as="xs:string" 
    processor-name="oxf:page-flow" 
    name="service-public-methods" 
    value="GET HEAD"/> 

<property 
    as="xs:anyURI" 
    name="oxf.fr.persistence.exist.exist-uri" 
    value="/exist/rest/db/orbeon/fr"/> 

<page public-methods="GET HEAD POST" view="view.xpl"/> 
<service public-methods="GET HEAD"  view="view.xpl"/> 

然后我尝试了不同的URL来调用数据:

http://localhost:9090/orbeon/exist/rest/db/orbeon/fr/gsmn/hello-world/draft/f025a471b2c8452dd65267cc5886063d995757f5/data.xml 
    http://localhost:9090/orbeon/crud/gsmn/hello-world/draft/f025a471b2c8452dd65267cc5886063d995757f5/data.xml 
    http://localhost:9090/orbeon/fr/service/persistence/crud/gsmn/hello-world/draft/f025a471b2c8452dd65267cc5886063d995757f5/data.xml 

形式亚军驻留在: http://localhost:9090/orbeon/fr/

有什么明显的我失踪了吗?

感谢 诺埃尔

回答

0

假设你的应用程序名称是gsmn和表单名称为hello-world,那么你提到的最后一个URL(复制下面的清晰度),应该工作。

http://localhost:9090/orbeon/fr/service/persistence/crud/gsmn/hello-world/draft/92aad35a44876b3bfac3b4d6f835130fbd1fe19e/data.xml

然而,最有可能的,问题是,你与eXist一起尝试这个,而且,截至记者发稿时,自动保存功能不是由上存在Orbeon形式的支持;它仅在关系数据库上受支持。有关更多信息,请参阅support matrix for different databasesRFE to add support for autosave on eXist

+0

嗨亚历克斯 好吧,这意味着通过此REST调用获取XML格式的数据只适用于有数据库连接,对吗? 因此,我会尝试使用orbeon服务器运行数据库,以便通过该REST调用获取xml数据。 谢谢 – Noel

+0

其他问题:有没有办法让eXist数据存储持久?所以eXist会将数据保存在服务器上的XML文件中?或者它始终保存在内存中? Regards – Noel

+0

您好Noel,*草案*在* autosave *的环境中仅支持关系数据库,并且eXist不支持。要明确一点,使用eXist,不仅仅是API不会返回草稿,而是没有自动保存发生,因此数据库中没有API可能返回的草稿。 -Alex – avernet

相关问题