快速入门中的“立即尝试"不再返回 [英] 'Try it now' in the Quick Start never returns

查看:18
本文介绍了快速入门中的“立即尝试"不再返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 Win 7 64 中安装了 API Mgr 1.7.0.我已经阅读了快速入门指南,一切似乎都如描述的那样工作.然而,当我开始尝试订阅的 cdyne api 时,移动的点"图形永远留在那里.除了浏览器刷新之外,我找不到阻止它的方法.我在 API Mgr 系统日志中看不到任何条目.

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.

我已经删除了应该返回 401 的参数和身份验证信息,但它没有并且移动的点继续.我使用的是带有 AdBlock+ 和 Noscript 的 Firefox 31.据我所知,没有被阻止的脚本.

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] 我在第一个样本 (YouTube) 上遇到了同样的问题.请问这个问题是不是端口值引起的?由于安装了 ESB,我将 API Mgr 的所有端口增加了 1.也许我错过了一个,或者还有一个没有记录.[/edit 1]

[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] 我重新安装了 API Mgr.我停止了 ESB 并将 APIM 端口保留为默认值.我重新创建了电话验证服务,但立即尝试"仍然存在同样的问题.我把全局日志级别设置为DEBUG,但是细节太多没用.我不知道为这个问题设置什么包名.

[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:

发生系统错误尝试调用服务方法 getApplicationNames

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

提供以下错误详细信息.请参阅日志以获取更多详细信息.org.apache.axis2.AxisFault:尝试调用服务方法 getApplicationNames 时发生异常在 org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)在 org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)在 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:445)在 org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)在 org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)在 org.wso2.carbon.logging.view.stub.LogViewerStub.getApplicationNames(LogViewerStub.java:3700)在 org.wso2.carbon.logging.view.ui.LogViewerClient.getApplicationNames(LogViewerClient.java:165)[/编辑 2]

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]

问候,约翰

推荐答案

您可能没有配置 CORS.CORS 是跨源资源共享 [1],它被商店中的 try-it 功能使用.

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.

CORS 配置存储在 [API Manager Home]/reposotiry/conf/api-manager.xml 中.标头必须包含 CORS 请求使用的主机名.try-it 服务使用的主机名在 API-Console/try-it 屏幕的左下角显示为灰色.它应该显示为基本网址".例如:[ base url: http://10.212.0.846.:8281 , api version: 1.0 ]

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 ]

您也可能在使用默认 API 时遇到问题 - 请确保 [API Manager Home]/repository/deployment/server/synapse-configs/default/api/中的 API 已更新为您的端口偏移量.这可能会阻止基本身份验证.它记录在此处 [2]

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]

希望有所帮助.-科林

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

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

这篇关于快速入门中的“立即尝试"不再返回的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆