簡體   English   中英

無法在WSO2 API Manager中的自定義中介流中通過Call Mediator

[英]Can't get past Call Mediator in custom mediation flow in WSO2 API Manager

在WSO2 AM 1.10中創建自定義中介流以實現API鏈接。 作為第一步,我創建了這個流,作為測試,它調用REST服務以生成令牌並將響應返回給客戶端。

<?xml version="1.0" encoding="UTF-8"?>
<sequence name="ppayload" trace="enable" xmlns="http://ws.apache.org/ns/synapse">
  <property action="remove" name="REST_URL_POSTFIX" scope="axis2"/>
  <property name="uri.var.x" scope="default" type="STRING" value="5"/>
  <property name="uri.var.y" scope="default" type="STRING" value="5"/>
  <log level="custom" separator=",">
    <property expression="get-property('uri.var.y')" name="y"/>
    <property expression="get-property('uri.var.x')" name="x"/>
  </log>
  <call>
    <endpoint>
      <http method="get" trace="enable" uri-template="https://192.88.65.18:9443/am/sample/calculator/v1/api/add?x={uri.var.x}&amp;y={uri.var.y}"/>
    </endpoint>
  </call>
  <respond/>
</sequence>

但是,在超時后,客戶端會收到“服務器無響應”。 但是在日志中,我看到API網關收到了正確的響應,它只是沒有將它轉發給客戶端。

另外,我嘗試在調用介體之后添加log mediator來記錄響應,但是在執行序列中的調用介體之后沒有任何內容。

[2016-07-20 12:13:42,195] DEBUG - wire >> "GET /c/1.0.0 HTTP/1.1[\r][\n]"
[2016-07-20 12:13:42,195] DEBUG - wire >> "Authorization: Bearer c5836f1cb43350b803cb39c706c1c7ce[\r][\n]"
[2016-07-20 12:13:42,195] DEBUG - wire >> "Accept: application/json[\r][\n]"
[2016-07-20 12:13:42,195] DEBUG - wire >> "Referer: https://192.88.65.18:9443/store/apis/info?name=C&version=1.0.0&provider=admin[\r][\n]"
[2016-07-20 12:13:42,195] DEBUG - wire >> "Accept-Language: fr-FR[\r][\n]"
[2016-07-20 12:13:42,195] DEBUG - wire >> "Accept-Encoding: gzip, deflate[\r][\n]"
[2016-07-20 12:13:42,195] DEBUG - wire >> "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko[\r][\n]"
[2016-07-20 12:13:42,195] DEBUG - wire >> "Host: 192.88.65.18:8243[\r][\n]"
[2016-07-20 12:13:42,195] DEBUG - wire >> "Connection: Keep-Alive[\r][\n]"
[2016-07-20 12:13:42,195] DEBUG - wire >> "Cookie: JSESSIONID=4308DDC996DAAE6B65F183E65931DE14; requestedURI="../../carbon/mediation-tracer/index.jsp?region=region4&item=mediation_tracer_menu"; region1_configure_menu=none; region5_tools_menu=none; i18next=fr-FR; selectedTab=view; current-breadcrumb=monitor_menu%2Cmediation_tracer_menu%23; MSG14682483937790.7211503494363702=true; MSG14683265253540.54003207439675=true; MSG14683266178700.10747833380176508=true; MSG14688271624980.9002550537769108=true; MSG14688272096380.869345530960711=true; MSG14688276939770.25641217913473224=true; MSG14688285230820.7837411368495956=true; MSG14688303649840.057579581328428775=true; MSG14688354130800.8363238567475415=true; MSG14688444175760.4841881764888184=true; region4_monitor_menu=visible; region3_registry_menu=visible; csrftoken=rg0quh61dsudlg02rvus1qs491; menuPanel=visible; menuPanelType=monitor[\r][\n]"
[2016-07-20 12:13:42,195] DEBUG - wire >> "[\r][\n]"
[2016-07-20 12:13:42,200]  INFO - LogMediator y = 5,x = 5
[2016-07-20 12:13:42,204] DEBUG - wire << "GET /am/sample/calculator/v1/api/add?x=5&y=5 HTTP/1.1[\r][\n]"
[2016-07-20 12:13:42,204] DEBUG - wire << "Cookie: JSESSIONID=4308DDC996DAAE6B65F183E65931DE14; requestedURI="../../carbon/mediation-tracer/index.jsp?region=region4&item=mediation_tracer_menu"; region1_configure_menu=none; region5_tools_menu=none; i18next=fr-FR; selectedTab=view; current-breadcrumb=monitor_menu%2Cmediation_tracer_menu%23; MSG14682483937790.7211503494363702=true; MSG14683265253540.54003207439675=true; MSG14683266178700.10747833380176508=true; MSG14688271624980.9002550537769108=true; MSG14688272096380.869345530960711=true; MSG14688276939770.25641217913473224=true; MSG14688285230820.7837411368495956=true; MSG14688303649840.057579581328428775=true; MSG14688354130800.8363238567475415=true; MSG14688444175760.4841881764888184=true; region4_monitor_menu=visible; region3_registry_menu=visible; csrftoken=rg0quh61dsudlg02rvus1qs491; menuPanel=visible; menuPanelType=monitor[\r][\n]"
[2016-07-20 12:13:42,204] DEBUG - wire << "Accept: application/json[\r][\n]"
[2016-07-20 12:13:42,204] DEBUG - wire << "Referer: https://192.88.65.18:9443/store/apis/info?name=C&version=1.0.0&provider=admin[\r][\n]"
[2016-07-20 12:13:42,204] DEBUG - wire << "Accept-Encoding: gzip, deflate[\r][\n]"
[2016-07-20 12:13:42,204] DEBUG - wire << "Accept-Language: fr-FR[\r][\n]"
[2016-07-20 12:13:42,204] DEBUG - wire << "Host: 192.88.65.18:9443[\r][\n]"
[2016-07-20 12:13:42,204] DEBUG - wire << "Connection: Keep-Alive[\r][\n]"
[2016-07-20 12:13:42,204] DEBUG - wire << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"
[2016-07-20 12:13:42,204] DEBUG - wire << "[\r][\n]"
[2016-07-20 12:13:42,205] DEBUG - wire >> "HTTP/1.1 200 OK[\r][\n]"
[2016-07-20 12:13:42,206] DEBUG - wire >> "Date: Wed, 20 Jul 2016 10:13:42 GMT[\r][\n]"
[2016-07-20 12:13:42,206] DEBUG - wire >> "Content-Type: application/json[\r][\n]"
[2016-07-20 12:13:42,206] DEBUG - wire >> "Content-Length: 18[\r][\n]"
[2016-07-20 12:13:42,206] DEBUG - wire >> "Server: WSO2 Carbon Server[\r][\n]"
[2016-07-20 12:13:42,206] DEBUG - wire >> "[\r][\n]"
[2016-07-20 12:13:42,206] DEBUG - wire >> "{"answer": "10.0"}"
[2016-07-20 12:13:42,208] ERROR - ContinuationStackManager Resource : null not found
[2016-07-20 12:13:42,214] ERROR - SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
Resource : null not found
[2016-07-20 12:13:54,738]  INFO - CarbonAuthenticationUtil 'admin@carbon.super [-1234]' logged in at [2016-07-20 12:13:54,738+0200]
[2016-07-20 12:14:24,850]  WARN - SourceHandler Connection time out after request is read: http-incoming-43
[2016-07-20 12:14:42,259]  WARN - SourceHandler Connection time out after request is read: http-incoming-44

任何人都可以說明我的配置有什么問題。 謝謝。

使用提交看起來像已修復的錯誤(請參閱此處 )。 也許你可以手動修補它,因為它是一個小修復,直到你得到下一個版本。 1.10版本的來源就在這里

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM