1

我正在尝试将新的 Orbeon XForm 连接到现有的现有数据库。我的代码应该提交一个 xml 文档以存储在该数据库中。

<xf:submission id="save-to-file"
            method="get"
            action="http://server:8081/exist/rest//test/test/inventory_sample.xml" 
            replace="instance" instance="data-instance" includenamespaceprefixes="ai"/>

尝试提交我的 xml 文件时,我的日志显示身份验证错误:

Apr 6, 2010 2:06:08 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor
 selectAuthScheme
INFO: basic authentication scheme selected
Apr 6, 2010 2:06:08 PM org.apache.commons.httpclient.HttpMethodDirector processW
WWAuthChallenge
INFO: No credentials available for BASIC 'exist'@kruddler.mitre.org:8081

如何验证此连接?

4

1 回答 1

1

要实现 BASIC 身份验证,您需要执行以下操作之一:

在行动中包含凭据:

<xforms:submission method="get" action="http://john:password@example.org/list" separator="&amp;"/>

使用两个扩展属性,xxforms:username 和 xxforms:password:

 <xforms:submission  method="get" action="http://example.org/list" separator="&amp;" xxforms:username="john" xxforms:password="password"/>
于 2010-04-06T19:56:42.410 回答