Tag: ibm cloud

从本地连接到Cloudant DB时出现连接错误

我是cloudant的新手。 我编写了连接cloudant DB的代码,它是bluemix中的DBaas。 我已在本地编写代码来连接cloudant DB。 以下是代码 try { user=”4728f43d-fcd2-41f0-be63-8945a78a9dab-bluemix”; password=”xxxxxxxxxxxxxxxx”; url=”https://4728f43d-fcd2-41f0-be63-8945a78a9dab-bluemix:xxxxxxxxxxxxxxxx@4728f43d-fcd2-41f0-be63-8945a78a9dab-bluemix.cloudant.com”; System.setProperty(“http.proxyHost”, “9.184.9.13”); System.setProperty(“http.proxyPort”, “80”); //user=”8452e722-8945-47d9-b372-ede45e55a7a7-bluemix”; //password=”xxxxxxxxxxxxxxxx”; //url=”https://8452e722-8945-47d9-b372-ede45e55a7a7-bluemix:xxxxxxxxxxxxxxxx@8452e722-8945-47d9-b372-ede45e55a7a7-bluemix.cloudant.com”; CloudantClient client = ClientBuilder.account(user) .username(user) .password(password) .build(); return client; } catch (CouchDbException e) { throw new RuntimeException(“Unable to connect to repository”, e); } 我在Web sphere应用程序Liberty配置文件上本地部署了应用程序。 在访问数据库连接时,我遇到了exception。 请告诉我连接cloudant DB需要做些什么。 我正在使用cloudant-client-2.2.0.jar来访问云端数据库 [ERROR ] Failed to read cookie response header […]

Bluemix Spark与Java

我有一个Bluemix试用版,我想将它与我使用swift存储使用Spark框架开发的Java应用程序一起使用。 此应用程序使用Maven进行构建过程。我知道BlueMix中有一个Spark服务。 我有几个问题: 我应该使用Jave liberty然后将Spark和Object存储绑定到它吗? 宣布火花import的正确方法是什么? 在我的Java程序中授权对象存储的正确方法是什么,因为Softlayer不支持keystone? 我可以看一下将这样的应用程序部署到Bluemix中的示例吗?

在Hyperledher Fabric V1.0的本地开发环境中使用Rest API支持

我已经设置了一个HyperLedger Fabric V1.0网络,其中有4个组织, 每个 组织 都有1个对等体 ,遵循构建您的第一个网络的步骤。 我现在有 org1.example.com – 与peer : peer0.org1.example.com和msp : Org1MSP org2.example.com – 与peer : peer0.org2.example.com和msp : Org2MSP org3.example.com – 与peer : peer0.org3.example.com和msp : Org3MSP org4.example.com – 与peer : peer0.org4.example.com和msp : Org4MSP 现在我可以将链代码安装到对等端并在通道上实例化链代码。 我也可以通过使用这里提到的命令来调用和查询链代码 调用 : peer chaincode invoke -o orderer.example.com:7050 –tls $ CORE_PEER_TLS_ENABLED –cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example .com / msp / tlscacerts […]

Watson STT Java – Websockets Java和HTTP POST之间的结果不同

我正在尝试构建一个采用流式音频输入的应用程序(例如:麦克风中的一行),并使用IBM Bluemix(Watson)进行语音到文本。 我简要地修改了这里找到的示例Java代码。 这个例子发送了一个WAV,但我发送了一个FLAC ……这应该是无关紧要的。 结果很糟糕,非常糟糕。 这是我在使用Java Websockets代码时得到的: { “result_index”: 0, “results”: [ { “final”: true, “alternatives”: [ { “transcript”: “it was six weeks ago today the terror “, “confidence”: 0.92 } ] } ] } 现在,将上述结果与下面的结果进行比较。 这些是发送相同内容但使用cURL(HTTP POST)时的结果: { “results”: [ { “alternatives”: [ { “confidence”: 0.945, “transcript”: “it was six weeks ago today […]

如何在用户输入输入时使Watson Conversation Api调用Web应用程序URL?

我有一个spring mvc应用程序,我想让我的用户调用一个bot,而基于用户输入的bot应该访问一个url并根据响应提供一个答案。我怎样才能在Java中实现这一点?