alexa / alexa-skills-kit-sdk-for-java

The Alexa Skills Kit SDK for Java helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
http://developer.amazon.com/ask
Apache License 2.0
816 stars 746 forks source link

Using alexa-skills-kit-sdk-for-java without lambda #94

Closed walter375 closed 6 years ago

walter375 commented 6 years ago

Hi, we are trying to make a skill without AWS and followed the intrusctions by Amazon given here: https://developer.amazon.com/docs/custom-skills/deploy-a-sample-skill-as-a-web-service.html? the Problem is under the headline Running the Sample from the Command Line in step 3 a class Launcher is required, that class is not porvided in the sdk. (master version).

Is there any other way of realizing the skill?

ghost commented 6 years ago

Hi there, is this issue similar to #95? If so, can we mark it as a duplicate? It seems like you already found Launcher class in previous version.

walter375 commented 6 years ago

Hi , no it's not the same problem. I found the Launcher class in a previous version, but I would be happy to use the current version of the SDK. The problem #95 only describes the errors from the previous version. I would like to work with the current version of SDK, but actually I don't know how to do this without the Launcher class. Thanks in advance.

ash-at-github commented 6 years ago

+1 Looking for the answer to this question.

Was able to create a sample skill using Lambda but can anyone provide any information about how do we go about using it in web service?

Here is what I have tried so far: Tried using SkillServlet class and building a Skill via Skills.build(), adding request handlers for it.

But it seems to give this error: "Request with id ReqID and timestamp timestamp failed timestamp validation with a delta of delta"

Not sure if the above approach is right. Could not find any usage documentation about it.

ash-at-github commented 6 years ago

Figured it out. Above issue was resolved via Sdk.TIMESTAMP_TOLERANCE_SYSTEM_PROPERTY Was able to create web service by using Skill servlet as described above^, in case anyone else is facing the same issue

RommelTJ commented 6 years ago

@ash-at-github How did you initialize your Servlet? Can you share your web.xml? Or even better, your completed Hello World example?

Seems like Amazon did not add an example for self-hosting your skills like they did in 1.x releases.

Edit: Actually, I figured it out as well. If @ash-at-github doesn't publish an example, I will probably build one later tonight with instructions on how to deploy to a Tomcat server.

timpos commented 6 years ago

@RommelTJ That would be very nice. I'm struggling with that, too. And please explain how you managed to add the certificate to tomcat.

RommelTJ commented 6 years ago

@Wuzzzel I submited a Pull Request for Amazon to review. We'll see what they say.

You can refer to my example here.

tianrenz commented 6 years ago

Hi all,

Closing this issue as the fix has been merged.

Please feel free to reopen if issue persists

Regards