简体   繁体   English

Java Web应用程序是否可以与使用HyperLedger Composer构建的区块链进行交互?

[英]Is it possible for a java web app to interact with a blockchain built with HyperLedger Composer?

Or do you have to build the web application using a certain language to use composer? 还是必须使用某种语言来构建Web应用程序才能使用作曲家? I've been looking this up but I'm confused how a web app would use the blockchain. 我一直在寻找,但是我很困惑Web应用程序将如何使用区块链。

Yes, this is the purpose of the composer-rest-server which has a Swagger (OpenAPI) documented RESTful interface that allows one to interact with a Composer business network. 是的,这是composer-rest-server的目的,该服务器具有Swagger(OpenAPI)记录的RESTful接口,该接口允许与Composer商业网络进行交互。

This is documented in the "Generate REST API" section of the Developer Guide . 开发人员指南的“生成REST API”部分对此进行了说明。

After you create and composer deploy your .bna (business network archive) you would use the composer-rest-server command-line tool to generate and start a rest server that can interact with your business network. 在创建和composer deploy .bna(企业网络档案)之后,您将使用composer-rest-server命令行工具生成并启动可以与您的企业网络进行交互的rest服务器。

Using this REST API, you can access the swagger definition source via http://localhost:3000/explorer/swagger.json . 使用此REST API,您可以通过http:// localhost:3000 / explorer / swagger.json访问swagger定义源。 From that, you can generate a Java client using a tool such as Swagger Codegen . 由此,您可以使用诸如Swagger Codegen之类的工具生成Java客户端。

Yes, you can do that exposing the business network as a REST API & invoking that from any web application. 是的,您可以这样做,将业务网络公开为REST API并从任何Web应用程序中调用。

See this: https://hyperledger.github.io/composer/integrating/getting-started-rest-api.html 看到这个: https : //hyperledger.github.io/composer/integrating/getting-started-rest-api.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Oracle自治区块链服务上使用Hyperledger Composer - Using Hyperledger Composer on Oracle Autonomous Blockchain Service 用于基于区块链的学术证书的 Hyperledger Composer - Hyperledger Composer for blockchain based academic certificates IBM Blockchain Platform上的Hyperledger作曲家游乐场错误 - Hyperledger composer playground error on IBM Blockchain Platform 卸载Hyperledger-composer后npm install错误-Blockchain - npm install error after uninstalling Hyperledger-composer - Blockchain 是否有必要将Hyperledger Composer区块链业务网络部署到Hyperledger Fabric(多个组织) - Is it necessary of Deploying a Hyperledger Composer blockchain business network to Hyperledger Fabric (multiple organizations) 我正在尝试将Hyperledger Composer区块链业务网络部署到单个组织的Hyperledger Fabric - I am Trying to Deploy a Hyperledger Composer blockchain business network to Hyperledger Fabric for a single organization Hyperledger Fabric:是否可以在不使区块链饱和的情况下保存数百万个位置寄存器? - Hyperledger Fabric: Is it possible to save milions of registers of locations without saturate the blockchain? 是否可以在Hyperledger Composer设置中部署链码? - Is it possible to deploy chaincode in Hyperledger Composer Set Up? 部署API REST IBM Hyperledger Composer区块链(替换命令中的错误标志:“ U”错误) - Deploy API REST IBM Hyperledger Composer Blockchain (bad flag in substitute command: 'U' ERROR) 可以在Hyperledger作曲家和Android应用之间进行连接吗? - Can connect between hyperledger composer and Android app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM