簡體   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