简体   繁体   English

WSO2 DSS-如何在插入/更新查询(成功或失败)之后添加响应?

[英]WSO2 DSS - How to add response after insert/update query (success or fail)?

Im using WSO2 DSS and ESB to read database (MySQL) and make an API. 我使用WSO2 DSS和ESB读取数据库(MySQL)并创建API。 Everything is ok but i cant get a response when using insert or update query. 一切都很好,但是使用插入或更新查询时我无法得到响应。 How to know that my query is success or fail? 如何知道我的查询是成功还是失败?

If you are using the wizard you can enable 'Return request status' on operations screen. 如果使用向导,则可以在操作屏幕上启用“返回请求状态”。 In code it would look like this, where you add the returnRequestStatus parameter to your operation. 在代码中,它看起来像这样,在其中将returnRequestStatus参数添加到操作中。

  <operation name="insert_SAMPLEDATA_operation" returnRequestStatus="true">
        <call-query href="insert_SAMPLEDATA_query">
            <with-param name="SAMPLE" query-param="sample"/>
            <with-param name="DATA" query-param="data"/>
        </call-query>
    </operation>

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM