'Try it now' in the Quick Start never returns

孤人 提交于 2019-12-12 02:58:16

问题


I have installed the API Mgr 1.7.0 in Win 7 64. I have been through the Quick Start guide and all appeared to work as described. However, when I get to the point of trying the subscribed-to cdyne api, the 'moving dots' graphic stays there forever. I can't find a way to stop it, other than a browser refresh. I can't see an entry in the API Mgr system logs.

I have removed the parameters and the auth info, which is supposed to return a 401, but it doesn't and the moving dots continue. I'm using Firefox 31, with AdBlock+ and Noscript. There are no blocked scripts as far as I can see.

[edit 1] I get the same problem with the first sample (YouTube). I wonder if the problem is caused by port values? As I have the ESB installed, I increased all the ports for API Mgr by 1. Maybe I missed one, or there is one that hasn't been documented.[/edit 1]

[edit 2] I have reinstalled the API Mgr. I stopped the ESB and left the APIM ports as default. I have recreated the Phone Verify service and I still have same problem with 'Try it now'. I set the global log level to DEBUG, but there is too much detail to be of use. I don't know what package names to set for this problem.

There was an entry in the Application Logs as follows, which might be relevant. The first few lines are shown:

System Error Occurred Exception occurred while trying to invoke service method getApplicationNames

The following error details are available. Please refer logs for more details. org.apache.axis2.AxisFault: Exception occurred while trying to invoke service method getApplicationNames at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:445) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) at org.wso2.carbon.logging.view.stub.LogViewerStub.getApplicationNames(LogViewerStub.java:3700) at org.wso2.carbon.logging.view.ui.LogViewerClient.getApplicationNames(LogViewerClient.java:165) [/edit 2]

Regards, John


回答1:


You may not have configured CORS. CORS is cross-origin resource sharing [1] and it is used by the try-it feature in the store.

The CORS configuration is stored in [API Manager Home]/reposotiry/conf/api-manager.xml . The header must include the Host name used by the CORS request. The host name being used by the try-it service is shown in gray at the bottom-left hand corner of the API-Console / try-it screen. It should show up as 'base url'. For example: [ base url: http://10.212.0.846.:8281 , api version: 1.0 ]

You may also be having trouble with the default APIs - please make sure that the APIs in [API Manager Home]/repository/deployment/server/synapse-configs/default/api/ are updated with your port offset. This may be preventing basic authentication. It is documented here [2]

Hope that helps. -Colin

[1] http://en.wikipedia.org/wiki/Cross-origin_resource_sharing

[2] https://docs.wso2.com/display/AM170/Changing+the+Default+Ports+with+Offset



来源:https://stackoverflow.com/questions/25483556/try-it-now-in-the-quick-start-never-returns

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!