2016-11-07 61 views
0

我正在尝试开发一种alexa技能,这与我自己的webservice(tomcat)进行通信。为了建立我跟随亚马逊指南(https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/deploying-a-sample-skill-as-a-web-service)的项目。无法调用远程端点alexa

现在我仍然无法连接到web服务,只能得到消息“无法调用远程端点,或者它返回的响应无效”。

该服务托管在https://ec2-54-159-167-123.compute-1.amazonaws.com/PiaServer上,并可通过https访问。我使用了自签名证书。我按照文档中所述完成了所有操作,但仍无法连接。根本没有tomcat日志。

我的终端是来自amazon java-skill-kit的speechletServlet。

当我通过邮差(铬附加组件),我得到一个完美的JSON-响应请求(见下文):

{ "version": "1.0", "response": { "outputSpeech": {"type":"PlainText", "text": "text" }, "card": { "type": "Simple", "title":`enter code here`"Tank", "content": "text" }, "shouldEndSession": true } } 

你有任何想法如何解决这个问题?

编辑:我在亚马逊EC2上托管服务。

回答

3

今天我有同样的问题,但有效的让我们的加密证书:

远程端点无法调用,或者返回的响应无效。

Alexa Service Simulator with "The remote endpoint could not be called, or the response it returned was invalid" as the service response

在我的情况的原因“远程端点不能被称为”错误是SSL证书配置。

由于我有效的让我们为我的端点加密证书,我假设我必须选择My development endpoint has a certificate from a trusted certificate authority选项。

但是没有工作。该请求甚至没有到达网络服务器。

Alexa SSL Certificate configuration that leads to an "remote endpoint could not be called" error

当您选择My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority相反,它会奏效。

Working Alexa Skill SSL Configuration

我用Runscope作为透明代理调试我Alexa的端点。如果你更改了SSL配置为“我的发展终点是具有通配符证书域的子域”,你可以看到在交通检查的要求:

Alexa request in the Runscope traffic inspector

但是我有没有解释为什么第一个选项不起作用,第二个选项不起作用。

起初我怀疑是和SNI有关,但事实并非如此。我检查了两个选项发送的数据包,并且在两种情况下,Amazon都会在SSL Client Hello中发送server_name

0

我也遇到了同样的问题。我能够通过修改插槽值来解决。 例如请求中的插槽部分如下给出,

"slots": {"<intent-slot-name>": { 
     "name": "<intent-slot-name>", 
     "value": "<value>" 
    }}