http://blog.itpub.net/24475491/viewspace-2154590/
SAP Leonardo Machine Learning - Functional Services
可以看到该SDK是一个基于Gradle的Java项目。您需要下载Maven和Gradle并完成环境变量的配置,这些配置非常基础,在网上有大量资料,这里不再重复。
完成配置后,使用Eclipse的import功能,将SDK导入到Eclipse里。
导入完成后如图。红色区域是SDK自带的代码,蓝色区域是Jerry自己手动创建的代码,用于调用API并打印结果。
双击根目录下的pom.xml, 将如下依赖关系维护进去:
错误分析
我们再回到API控制台,API响应结构里request字段的类型声明为string。
然而通过测试发现,request字段的内容实际是一个Json对象:
https://github.com/i042416/ProductImageMLService
<p font-size:16px;white-space:normal;background-color:#ffffff;word-break:break-word="" !important;"="" style="margin-top: 0px; margin-bottom: 25px; padding: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-family: -apple-system, 'SF UI Text', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif; line-height: 28px; color: rgb(47, 47, 47); text-align: justify; white-space: normal; box-sizing: border-box; background-color: rgb(255, 255, 255);">更多Leonardo精彩,尽在 https://api.sap.com !
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29829936/viewspace-2199846/ ,如需转载,请注明出处,否则将追究法律责任。