【问题标题】:Marklogic v1/transactions create by REST API : errorMarklogic v1/由 REST API 创建的事务:错误
【发布时间】:2015-05-15 13:12:51
【问题描述】:

在 SOAPUI 工具中调用以下 Rest 服务时出现以下错误:

http://localhost:7060/v1/transactions 

Error : 
HTTP/1.1 401 Unauthorized
Server: MarkLogic
WWW-Authenticate: Basic realm=public
Content-Type: application/json; charset=utf-8
Content-Length: 104
Connection: Keep-Alive
Keep-Alive: timeout=5

{"errorResponse":   {"statusCode":401,
   "status":"Unauthorized",
   "message":"401 Unauthorized"
  }
}

通过以下链接后,我认为它与 Content-Type 有关,我尝试使用 text/plain 但它仍然无法正常工作,有什么帮助吗?

MarkLogic v1/transactions create by REST API

【问题讨论】:

  • 用户名或密码好像不正确。你在使用 POST 吗?您是否尝试过其他 REST 客户端,例如 curl?
  • @ehennum 所有其他 REST 操作都工作正常..当我尝试使用 Post man 执行相同的请求时,它工作正常,但 postman 收到的响应是状态代码 200 而不是 303,如文档和响应正文为 7341689848759709324

标签: marklogic


【解决方案1】:

尝试在管理控制台中将 MarkLogic REST API 服务器中的身份验证设置更改为“digestbasic”,并在您的 REST 客户端中使用 HTTP Basic Auth (“Basic {TOKEN}”) 以确保您在 Authorization 标头中的登录凭据是正确的。

【讨论】:

    猜你喜欢
    • 2014-09-24
    • 2014-05-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多