0
我無法在wso2 ei和wso2 esb中調用第三方休息API(https://api.github.com/users/hackeryou)。 下面是示例代碼:Wso2 EI 6.1.1 +第三方休息api集成
<api xmlns="http://ws.apache.org/ns/synapse" name="VerifyCustID" context="/mambu">
<resource methods="GET" uri-template="/verify">
<inSequence>
<log>
<property name="CustID API" value="*********Inside CustID API********** "/>
</log>
<send>
<endpoint>
<http method="GET" uri-template="https://api.github.com/users/hackeryou"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<send/>
</outSequence>
</resource>
</api>
下面是在服務器日誌中的錯誤:
ID API = *********Inside CustID API**********
[2017-07-14 15:01:48,756] [] WARN - ConnectCallback Connection refused or failed for : api.github.com/192.30.253.116:443
[2017-07-14 15:01:48,759] [] WARN - EndpointContext Endpoint : AnonymousEndpoint with address https://api.github.com/users/hackeryou will be marked S
USPENDED as it failed
[2017-07-14 15:01:48,760] [] WARN - EndpointContext Suspending endpoint : AnonymousEndpoint with address https://api.github.com/users/hackeryou - cur
rent suspend duration is : 30000ms - Next retry after : Fri Jul 14 15:02:18 IST 2017
[2017-07-14 15:01:48,772] [] INFO - LogMediator To: https://api.github.com/users/hackeryou, MessageID: urn:uuid:7b834e0e-e348-4b60-adeb-f60a70f00483,
Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 101503, ERROR_MESSAGE = Error connecting to the back end, Envelope: <?
xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body/></soapenv:Envelope>
非常感謝你維傑。 –
@RajuK最後是什麼問題? –
防火牆問題,我的防火牆不允許打任何第三方API,這個問題是由網絡團隊解決。 –