【问题标题】:WSO2 AM HTTP EndpointWSO2 AM HTTP 端点
【发布时间】:2016-08-04 18:15:25
【问题描述】:

我在 WSO2 AM 中使用 HTTP 端点时遇到问题,

<ams:fault xmlns:ams="http://wso2.org/apimanager/security">
<ams:code>900906</ams:code>
<ams:message>No matching resource found in the API for the given request</ams:message>
<ams:description>Access failure for API: /rest/v1, version: v1. Check the API documentation and add a proper REST resource path to the invocation URL</ams:description>

但是,如果使用地址端点,它就可以工作,

更改为不起作用的 HTTP 端点,

【问题讨论】:

  • 错误日志显示没有找到匹配的资源。请确保附加您在发布者中为 GET 请求定义的资源路径。

标签: wso2 wso2-am


【解决方案1】:

请注意,“未找到匹配的资源”错误与将您的 API 请求分派到正确的 API 和资源有关。因此,它与您的端点类型没有任何关系。

根据随附的屏幕截图,您的 API 上下文和版本是 MrlDatabaseAPI/v1。但是您尝试的是rest/v1。如果您没有上下文为“rest”且版本为“v1”的 API,那么您将收到此类错误。如果您想调用 MrlDatabaseAPI/v1 API,那么还要确保将正确的资源路径附加到该 API(/pesticides、/report、/reportNotes、/crops、/cuntries)。

【讨论】:

    【解决方案2】:

    请更具体一些,以便其他人可以帮助您,例如什么版本的 AM,哪些端点可以工作,什么不能,什么是“地址端点”?

    根据您的快照,它看起来将指向 /rest,而不是 /rest/v1。

    【讨论】:

      【解决方案3】:

      您可以启用 WIRE 日志并进一步分析。地址端点和 HTTP 端点都以类似的方式工作。关注this 在 API Manager 中启用 WIRE 日志。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2021-01-20
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多