RPC客户端调用corda中的流

RPC客户端调用corda中的流,corda,Corda,我试图通过RPC客户端调用hellow world示例流。根据文档,我必须调用startFlowDynamic来调用流。但是我无法编写startflowdynamic方法调用的代码 Integer iouValue=99; Party otherParty= nameornull("O=PartyB,L=New York,C=US"); proxy.startFlowDynamic(com.template.IOUFlow,iouValue,otherParty); logger.info("{

我试图通过RPC客户端调用hellow world示例流。根据文档,我必须调用startFlowDynamic来调用流。但是我无法编写startflowdynamic方法调用的代码

Integer iouValue=99;
Party otherParty= nameornull("O=PartyB,L=New York,C=US");
proxy.startFlowDynamic(com.template.IOUFlow,iouValue,otherParty);
logger.info("{}", nodes);
SignedTransaction result = proxy.startTrackedFlowDynamic(IOUIssueFlow.InitiatorFlow.class, state).getReturnValue().get();
错误日志

SignedTransaction result = proxy.startTrackedFlowDynamic(IOUIssueFlow.InitiatorFlow.class, state).getReturnValue().get();
错误:错误:(48,14)接口net.corda.core.messaging.CordaRPCOps中的java:method startFlowDynamic无法应用于给定类型;必需:java.lang.Class>,java.lang.Object[]找到:com.template.flows.IOUFlow,java.lang.Integer,net.corda.core.identity.Party原因:无法推断类型变量T(参数不匹配;com.template.flows.IOUFlow无法转换为java.lang.Class>

SignedTransaction result = proxy.startTrackedFlowDynamic(IOUIssueFlow.InitiatorFlow.class, state).getReturnValue().get();

请帮助方法的
startFlowDynamic
的第一个参数应该是要运行的流的类对象。例如:

SignedTransaction result = proxy.startTrackedFlowDynamic(IOUIssueFlow.InitiatorFlow.class, state).getReturnValue().get();

您正试图运行的这个IOU CorDapp有一个完全实现的spring服务器:

请添加错误日志或解释您的问题Integer IOUvValue=99;CordaX500Name x500Name=CordaX500Name.parse(“O=PartyB,L=New York,C=US”);Party otherParty=proxy.wellKnownPartyFromX500Name(x500Name);final IOUFlow I=new IOUFlow(iouValue,otherParty);proxy.startFlowDynamic(I,iouValue,otherParty);Error:Error:(48,14)java:interface net.corda.core.messaging.cordarpcps中的方法startFlowDynamic不能应用于给定的类型;必需:java.lang.ClassWhere IOUFlow是@StartableByRPC注释的流类的名称
SignedTransaction result = proxy.startTrackedFlowDynamic(IOUIssueFlow.InitiatorFlow.class, state).getReturnValue().get();