08.03.02.tiptop webserver接口篇(增加接口案例测试 多表数据)

本页目录:

  • 1、制作xml
  • 2、配置
  • 2、测试

  • 注册服务接口案例:/u1/topprod/tiptop/aws/4gl/aws_ttsrv2_service.4gl

CreateQuotationData接口案例代码:/u1/topprod/tiptop/aws/4gl/aws_create_quotation_data.4gl

制作xml

  • 注意:vscode可以下载插件:XML 对代码进行格式化
  • 再添加转译符 或者 <替换< >替换>
<![CDATA[
<Request>
    <Access>
        <Authentication user="tiptop" password="xxxx" />
        <Connection application="tiptop" source="xxx.xxx.xxx.xxx" />
        <Organization name="BLPROD" />
        <Locale language="zh_tw" />
    </Access>
    <RequestContent>
        <Parameter />
        <Document>
            <RecordSet id="1">
                <Master name="oqt_file">> <Record>
                        <Field name="oqt01" value="DNS02-25031101" />
                        <Field name="oqt02" value="2025/03/11" />
                        <Field name="oqt04" value="CC-W041" />
                        <Field name="oqtplant" value="BLPROD" />
                        <Field name="oqtlegal" value="BLPROD" />
                    </Record>
                </Master>
                <Detail name="oqu_file">
                    <Record>
                        <Field name="oqu02" value="1" />
                        <Field name="oqu03" value="AF-LT800101N1-01" />
                    </Record>
                    <Record>
                        <Field name="oqu02" value="2" />
                        <Field name="oqu03" value="AF-LT800101N2-01" />
                    </Record>
                </Detail>
            </RecordSet>
        </Document>
    </RequestContent>
</Request>
]]>

08.03.02.tiptop webserver接口篇(增加接口案例测试 多表数据)_第1张图片

配置

  • SOAPUI
  • url:http://xxx.xxx.xxx.xxx/web/ws/r/aws_ttsrv2?WSDL
  • 请求xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tip="http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay">
   <soapenv:Header/>
   <soapenv:Body>
      <tip:CreateQuotationDataRequest>
         <tip:request><![CDATA[
<Request>
    <Access>
        <Authentication user="tiptop" password="xxxxx" />
        <Connection application="tiptop" source="xxx.xxx.xxx.xxx" />
        <Organization name="BLPROD" />
        <Locale language="zh_tw" />
    </Access>
    <RequestContent>
        <Parameter />
        <Document>
            <RecordSet id="1">
                <Master name="oqt_file">> <Record>
                        <Field name="oqt01" value="DNS02-25031101" />
                        <Field name="oqt02" value="2025/03/11" />
                        <Field name="oqt04" value="CC-W041" />
                        <Field name="oqtplant" value="BLPROD" />
                        <Field name="oqtlegal" value="BLPROD" />
                    </Record>
                </Master>
                <Detail name="oqu_file">
                    <Record>
                        <Field name="oqu02" value="1" />
                        <Field name="oqu03" value="AF-LT800101N1-01" />
                    </Record>
                    <Record>
                        <Field name="oqu02" value="2" />
                        <Field name="oqu03" value="AF-LT800101N2-01" />
                    </Record>
                </Detail>
            </RecordSet>
        </Document>
    </RequestContent>
</Request>
]]></tip:request>
      </tip:CreateQuotationDataRequest>
   </soapenv:Body>
</soapenv:Envelope>

测试

  • 查询数据多两笔数据
SELECT oqt01,oqt02,oqtplant,oqtlegal,oqu02,oqu03
FROM BLPROD.oqt_file
INNER JOIN BLPROD.oqu_file ON oqu01=oqt01
WHERE oqt01='DNS02-25031101'

你可能感兴趣的:(鼎捷tiptop,5.3,开发语言)