繁体   English   中英

WSO2 API Manager 3.1.0 无法从中介序列调用 GET HTTP 方法

[英]WSO2 API Manager 3.1.0 Unable to call GET HTTP Method from Mediation sequence

无法通过 API Manager 3.1.0 中的中介序列调用 GET API。 GET API 调用表现为无正文的 POST。 我的代码如下。

            <property name="HTTP_METHOD" value="GET" scope="axis2" type="STRING"/>
            <property name="REST_URL_POSTFIX" scope="axis2" action="remove"/>
            <property name="messageType" value="application/json" scope="axis2" type="STRING"/>
            <property name="ContentType" value="application/json" scope="axis2" type="STRING"/>
            <property name="Authorization" expression="get-property('Credentials')" scope="transport" type="STRING"/>
            <property name="uri.var.tenantDomain" expression="get-property('tenantDomain')" scope="default" type="STRING"/>
            <property name="NO_ENTITY_BODY" action="remove" scope="axis2"/>
            <call blocking="true">
                <endpoint>
                    <http method="GET" uri-template="https://localhost:9443/t/{uri.var.tenantDomain}/api/users/v1/me/challenges"/>
                </endpoint>
            </call>

这是针对挑战问题,只要 POST 和其他方法的 URI 相同,只有 POST 工作正常,而不是 PUT、GET 和 DELETE。 SCIM2 API 也出现了同样的问题,但我从 SCIM2 更改为 SOAP 管理服务以解决该问题。 其他用于恢复的 GET API 工作正常。 仅当 GET/PUT/DELETE 和 POST 的 URI 相同时,才会从中介序列观察到此行为

电线日志:

TID: [-1234] [] [2020-09-24 16:29:07,543] DEBUG {httpclient.wire.header} - >> "GET /t/jio.eva.hdfc.com/api/users/v1/me/challenges HTTP/1.1[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,543] DEBUG {httpclient.wire.header} - >> "GET /t/jio.eva.hdfc.com/api/users/v1/me/challenges HTTP/1.1[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,544] DEBUG {httpclient.wire.header} - >> "Content-Type: application/json; charset=UTF-8[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,544] DEBUG {httpclient.wire.header} - >> "Content-Type: application/json; charset=UTF-8[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,544] DEBUG {httpclient.wire.header} - >> "Accept: application/json[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,544] DEBUG {httpclient.wire.header} - >> "Accept: application/json[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,545] DEBUG {httpclient.wire.header} - >> "Authorization: Basic XXXXXXX[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,545] DEBUG {httpclient.wire.header} - >> "Authorization: Basic XXXXXXX[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,545] DEBUG {httpclient.wire.header} - >> "User-Agent: Axis2[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,545] DEBUG {httpclient.wire.header} - >> "User-Agent: Axis2[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,545] DEBUG {httpclient.wire.header} - >> "Host: 10.201.8.13:5004[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,545] DEBUG {httpclient.wire.header} - >> "Host: 10.201.8.13:5004[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,546] DEBUG {httpclient.wire.header} - >> "[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,546] DEBUG {httpclient.wire.header} - >> "[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,563] DEBUG {httpclient.wire.header} - << "HTTP/1.1 500 [\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,563] DEBUG {httpclient.wire.header} - << "HTTP/1.1 500 [\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,564] DEBUG {httpclient.wire.header} - << "HTTP/1.1 500 [\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,564] DEBUG {httpclient.wire.header} - << "HTTP/1.1 500 [\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,564] DEBUG {httpclient.wire.header} - << "Date: Thu, 24 Sep 2020 10:59:07 GMT[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,564] DEBUG {httpclient.wire.header} - << "Date: Thu, 24 Sep 2020 10:59:07 GMT[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,564] DEBUG {httpclient.wire.header} - << "Content-Type: application/json[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,564] DEBUG {httpclient.wire.header} - << "Content-Type: application/json[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,565] DEBUG {httpclient.wire.header} - << "Transfer-Encoding: chunked[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,565] DEBUG {httpclient.wire.header} - << "Transfer-Encoding: chunked[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,565] DEBUG {httpclient.wire.header} - << "Connection: close[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,565] DEBUG {httpclient.wire.header} - << "Connection: close[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,565] DEBUG {httpclient.wire.header} - << "Server: WSO2 Carbon Server[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,565] DEBUG {httpclient.wire.header} - << "Server: WSO2 Carbon Server[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,566] DEBUG {httpclient.wire.header} - << "[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,566] DEBUG {httpclient.wire.header} - << "[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,566] DEBUG {httpclient.wire.content} - << "b"
TID: [-1234] [] [2020-09-24 16:29:07,566] DEBUG {httpclient.wire.content} - << "b"
TID: [-1234] [] [2020-09-24 16:29:07,566] DEBUG {httpclient.wire.content} - << "4"
TID: [-1234] [] [2020-09-24 16:29:07,566] DEBUG {httpclient.wire.content} - << "4"
TID: [-1234] [] [2020-09-24 16:29:07,567] DEBUG {httpclient.wire.content} - << "[\r]"
TID: [-1234] [] [2020-09-24 16:29:07,567] DEBUG {httpclient.wire.content} - << "[\r]"
TID: [-1234] [] [2020-09-24 16:29:07,567] DEBUG {httpclient.wire.content} - << "[\n]"
TID: [-1234] [] [2020-09-24 16:29:07,567] DEBUG {httpclient.wire.content} - << "[\n]"
TID: [-1234] [] [2020-09-24 16:29:07,567] DEBUG {httpclient.wire.content} - << "{"code":"SE-50000","message":"Unexpected Processing Error.","description":"Server encountered an error while serving the request.","traceId":"46947467-c363-4cb4-87d7-d2e37c039b3a"}"
TID: [-1234] [] [2020-09-24 16:29:07,567] DEBUG {httpclient.wire.content} - << "{"code":"SE-50000","message":"Unexpected Processing Error.","description":"Server encountered an error while serving the request.","traceId":"46947467-c363-4cb4-87d7-d2e37c039b3a"}"
TID: [-1234] [] [2020-09-24 16:29:07,568] DEBUG {httpclient.wire.content} - << "[\r]"
TID: [-1234] [] [2020-09-24 16:29:07,568] DEBUG {httpclient.wire.content} - << "[\r]"
TID: [-1234] [] [2020-09-24 16:29:07,568] DEBUG {httpclient.wire.content} - << "[\n]"
TID: [-1234] [] [2020-09-24 16:29:07,568] DEBUG {httpclient.wire.content} - << "[\n]"
TID: [-1234] [] [2020-09-24 16:29:07,568] DEBUG {httpclient.wire.content} - << "0"
TID: [-1234] [] [2020-09-24 16:29:07,568] DEBUG {httpclient.wire.content} - << "0"
TID: [-1234] [] [2020-09-24 16:29:07,569] DEBUG {httpclient.wire.content} - << "[\r]"
TID: [-1234] [] [2020-09-24 16:29:07,569] DEBUG {httpclient.wire.content} - << "[\r]"
TID: [-1234] [] [2020-09-24 16:29:07,569] DEBUG {httpclient.wire.content} - << "[\n]"
TID: [-1234] [] [2020-09-24 16:29:07,569] DEBUG {httpclient.wire.content} - << "[\n]"
TID: [-1234] [] [2020-09-24 16:29:07,569] DEBUG {httpclient.wire.content} - << "[\r]"
TID: [-1234] [] [2020-09-24 16:29:07,569] DEBUG {httpclient.wire.content} - << "[\r]"
TID: [-1234] [] [2020-09-24 16:29:07,569] DEBUG {httpclient.wire.content} - << "[\n]"
TID: [-1234] [] [2020-09-24 16:29:07,569] DEBUG {httpclient.wire.content} - << "[\n]"
TID: [-1234] [] [2020-09-24 16:29:07,570] DEBUG {httpclient.wire.header} - << "[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,570] DEBUG {httpclient.wire.header} - << "[\r][\n]"
TID: [-1234] [] [2020-09-24 16:29:07,571]  INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: https://10.201.8.13:5004/t/jio.eva.hdfc.com/api/users/v1/me/challenges, MessageID: urn:uuid:a0a2832b-29cf-41dd-bc70-4d9da1721f3e, Direction: request, HTTP_SC = 500, Payload: {"code":"SE-50000","message":"Unexpected Processing Error.","description":"Server encountered an error while serving the request.","traceId":"46947467-c363-4cb4-87d7-d2e37c039b3a"}

相同的代码适用于 EI 6.6.0

这类似于以下内容[1],问题是由于基于 IS-KM 证书的身份验证器造成的。

[1] 无法从 WSO2 API Manager 3.1.0 中介序列调用 WSO2 IS-KM 5.10.0 SCIM2

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM