Comments (19)
请问Request是什么呢?Request是从哪里来的呢?
from bot-sdk-java.
TaxBot bot;
try {
bot = new TaxBot(request); 我把服务放在本地,然后调试的时候,百度会来调我的接口,这个request是百度发给我的
from bot-sdk-java.
这是Request的代码:
certificate = new Certificate(request);
String message = certificate.getMessage();
message的内容是:
{
"version": "v2.0",
"session": {
"new": true,
"sessionId": "fe618ac6-6d41-4f5d-a895-f8f95808ebf8"
},
"context": {
"System": {
"user": {
"userId": "42239595",
"userInfo": {
"account": {}
}
},
"application": {
"applicationId": "18986658-bd6e-c789-43c0-4f0f302f8a78"
},
"device": {
"deviceId": "0a4e42cd1ccada5fc88a700a82212616",
"supportedInterfaces": {
"VoiceInput": {},
"VoiceOutput": {},
"AudioPlayer": {},
"Display": {}
},
"TVControl": {
"controlType": "DCSControl",
"controlStatus": 0
}
},
"apiAccessToken": "qUVvFFgowvWYwC8mGvcaE9Osam4zewG65MX9lI4IgO2EVkQOiPtXv+30X/d9GNEubWtJ9aOIRLteFy5bGFBGtAPWigKaLf9UgDyJPP7vHSy9cAgsBtPdxEA7nhcCAA75xPIG32Q4JRYZUTbhBrKuYtNmIj8OA1XZyXJ16Stow4dOiWOAMxA9FyK6vvbRXkbITTyGm0KUQtmksqrLM5fjtNzDTH9DI/hDVAkWUXD7woJMjZ+2V/4fTsK9bcfHU0y+Cr7h7z1dCnzEao7SrBzUNQKUpFeu8gd93VGZV2baKWHmDcmc+gwJIG6iX3RjTJHbFP2LKCr0037ejJivlmsN44WF+6dlDIAn0yUChVqV2znxj/Q8ByNxsmRPqS1VU29/ABjvibfLEU4TsgjCtTlkVA==",
"apiEndPoint": "https://xiaodu.baidu.com",
"avaliableApplicationIds": ["doudi_server", "phone", "aries_general", "ai.dueros.bot.alarm", "duer_weather", "sac", "restaurant_bot", "o2o_satisfy", "rent_car", "travel_server", "recharge", "online_shopping", "hotel", "baojie", "nba_search", "sysprofile_service", "audio_music", "ai.dueros.bot.timer", "audio_unicast", "audio_live", "ai.dueros.bot.vocal_joke", "ai.dueros.bot.smarthome", "speaker_hardware", "audio_news"]
}
},
"request": {
"type": "LaunchRequest",
"requestId": "e5da674ab0564f0e9968f1d0a7816790_0#1_0",
"timestamp": "1544750131",
"dialogRequestId": "4e31bb81-1855-4ea2-a692-ef7b125bd70f"
}
}
from bot-sdk-java.
from bot-sdk-java.
18986658-bd6e-c789-43c0-4f0f302f8a78 这个技能的服务地址好像有问题
from bot-sdk-java.
from bot-sdk-java.
服务地址会有啥问题呢?我配置的不对?但是已经可以调用了,java的版本是1.8。内网穿透用的是花生壳这个工具。web服务器用得是wildfly 8 配置如下:
from bot-sdk-java.
这是我的配置:
from bot-sdk-java.
sdk的版本v2.0,我昨天刚下载的版本,您是觉得我的系统部署有问题吗
from bot-sdk-java.
我是觉得如果配置有问题的话,完全不会进入我的服务器,进入我的服务器首先说明,我们之间的路径是通的,只是反序列化的时候出现了问题。
from bot-sdk-java.
这是我的版本:
{
"version": "v2.0",
"session": {
"new": true,
"sessionId": "ef6eeb7a-82d3-4c21-bad5-6d899565b137"
},
"context": {
"System": {
"user": {
"userId": "42239595",
"userInfo": {
"account": {}
}
},
"application": {
"applicationId": "18986658-bd6e-c789-43c0-4f0f302f8a78"
},
"device": {
"deviceId": "0a4e42cd1ccada5fc88a700a82212616",
"supportedInterfaces": {
"VoiceInput": {},
"VoiceOutput": {},
"AudioPlayer": {}
},
"TVControl": {
"controlType": "DCSControl",
"controlStatus": 0
}
},
"apiAccessToken": "qUVvFFgowvWYwC8mGvcaE9Osam4zewG65MX9lI4IgO2EVkQOiPtXv+30X/d9GNEubWtJ9aOIRLteFy5bGFBGtAPWigKaLf9UgDyJPP7vHSy9cAgsBtPdxEA7nhcCAA75xPIG32Q4JRYZUTbhBrKuYtNmIj8OA1XZyXJ16Stow4fWAzXtpdNMmQci3glzN1KnTTyGm0KUQtmksqrLM5fjtNzDTH9DI/hDVAkWUXD7woJMjZ+2V/4fTsK9bcfHU0y+Cr7h7z1dCnzEao7SrBzUNQKUpFeu8gd93VGZV2baKWHmDcmc+gwJIG6iX3RjTJHbFP2LKCr0037ejJivlmsN44WF+6dlDIAn0yUChVqV2znxj/Q8ByNxsmRPqS1VU29/ABjvibfLEU4TsgjCtTlkVA==",
"apiEndPoint": "https://xiaodu.baidu.com",
"avaliableApplicationIds": ["18986658-bd6e-c789-43c0-4f0f302f8a78"]
}
},
"request": {
"type": "LaunchRequest",
"requestId": "b5fc14c3c46c42bbb9aa665bd63b2be3_0#1_0",
"timestamp": "1544768126",
"dialogRequestId": "ba962e3b-4178-4c5d-8de3-4ff867baca1b"
}
}
from bot-sdk-java.
我把你的SDK里面的例子部署后,在我的本地,发这个Request是没有问题的
from bot-sdk-java.
您觉得可能是网络的问题吗?我试了公司的网和自己的手机wifi,都是这个情况
from bot-sdk-java.
postman中raw您的内容是什么呢?可以发我一下吗?我来试一下
from bot-sdk-java.
您可以发一下您的request给我吗?我用自己的message试的时候是有问题的
from bot-sdk-java.
from bot-sdk-java.
我又把github上面的代码下载下来,操作是将pom的jar包改为war包,然后用wildfly8启动,我新建了一个system的接口,用postman访问是没有问题的;然后我用自己的request去访问我的tax接口,结果还是遇到了这个错:
com.fasterxml.jackson.databind.JsonMappingException: Could not find creator property with name 'requestId' (in class com.baidu.dueros.data.request.RequestBody)
at [Source: java.io.StringReader@2273ee; line: 1, column: 1]
from bot-sdk-java.
from bot-sdk-java.
from bot-sdk-java.
Related Issues (20)
- progressReportDelayInMilliseconds 、progressReportIntervalInMilliseconds变量类型有误,应该设置为Integer。
- Java版的SDK 缺少 RenderVideoList HOT 1
- 有屏音箱无法播放音频 , 无屏音箱上可以正常播放 HOT 1
- session 获取和设置的不匹配 HOT 4
- 获取 baiduUid 空指针异常 HOT 2
- sdk中引用的bot-monitor有bug,导致数据统计功能根本就没有执行过。
- 请问下有技能通知的功能吗 HOT 3
- 请问下什么时候支持在技能里调用设备的设置闹钟和timer功能? HOT 1
- 如何实现定时自动唤醒自己开发的某个技能
- bot-sdk-java代码中的setSlot函数还不能给槽位直接进行赋值 HOT 1
- java.lang.NoSuchFieldError: ESCAPE_JSON HOT 1
- com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input HOT 1
- Tag没有无参构造
- SDK更新 HOT 1
- DuerOS请求不到我的WebService
- 百度DuerOS为何没有发送IntentRequest请求(onInent对话事件)?
- 槽位空时报com.fasterxml.jackson.databind.exc.MismatchedInputException异常 HOT 1
- Certificate的构造类里面有bug HOT 1
- 使用HttpServletRequest构造BaseBot时抛出NullPointException HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bot-sdk-java.