zoukankan      html  css  js  c++  java
  • 提供接口的参数及返回值

    提供一个接口能够下订单

    接口传入相应订单信息,如果下单成功返回订单编码,失败返回失败原因

    可以把参数设置为datatable,也可以设置为xml内容字符串

    xml文件格式

     1 <?xml version="1.0" encoding="utf-8"?>
     2 <root>
     3     <entity>
     4         <actions>
     5             <action>
     6                 <command>CREATE_ORDER</command>
     7                 <parameter name="userID"></parameter>
     8                 <parameter name="departId"></parameter>
     9             </action>
    10         </actions>
    11     </entity>
    12     <fields>
    13     <field id="supplyName" direction="in"></field>
    14     <field id="supplyTel" direction="in"></field>
    15     <field id="productName" direction="in"></field>
    16     <field id="forperson" direction="in"></field>
    17     <field id="productId" direction="in"></field>
    18     <field id="purity" direction="in"></field>
    19     <field id="shengchanId" direction="in"></field>
    20     <field id="shippDate" direction="in"></field>
    21     <field id="unitPrice" direction="in"></field>
    22     <field id="quantity" direction="in"></field>
    23     <field id="sumPrice" direction="in"></field>
    24     <field id="unit" direction="in"></field>
    25     <field id="vender" direction="in"></field>
    26     <field id="productType" direction="in"></field>
    27     <field id="cas" direction="in"></field>
    28     <field id="orderId" direction="out"></field>
    29     </fields>
    30 </root>

    返回值的xml设置

    下单成功:

    <?xml version="1.0" encoding="utf-8" ?>
    <root>
        <field id="orderid" direction="in"></field>
        <errors/>
    </root>

    下单失败

    <?xml version="1.0" encoding="utf-8" ?>
    <root>
        <errors>
            <description>
            </description>
        </errors>
    </root>

  • 相关阅读:
    c# 操作数据库
    dataview findrows
    C++:gethostname,gethostbyname获取IP地址和计算机名
    MQTT
    STM32操作外部SRAM
    JAVA中最常用的快捷键总结
    Zstack中End Device设备失去父节点时的重新入网处理方法(转)
    VC++ 重叠窗口
    (转载)PLC内部电路常见的几种形式
    VS2005 DoModal函数
  • 原文地址:https://www.cnblogs.com/hfliyi/p/2811499.html
Copyright © 2011-2022 走看看