160 likes | 291 Views
Exchanging Simple Data. Overview. When you complete this lesson you should be able to:. Describe the difference between simple data and complex data Describe how XML Schema data maps to or from 4GL data types Invoke a Web service operation using simple data types
E N D
Overview When you complete this lesson you should be able to: • Describe the difference between simple data and complex data • Describe how XML Schema data maps to or from 4GL data types • Invoke a Web service operation using simple data types • Invoke a Web service operation where the Web service types do not match 4GL types • Invoke a Web service operation which returns an array • Invoke a Web service operation that exchanges binary data
Simple data 4GL application DEFINE VARIABLE iData as INTEGER NO-UNDO. RUN SendIt IN hPortType (INPUT iData) NO-ERROR. Web service operation SendIt_Request(iData type = “xsd:int”) http request
Sending binary data DEFINE VARIABLE pSalesSS as MEMPTR NO-UNDO. COPY-LOB from FILE “FebSales.xls” TO pSalesSS. RUN SendSalesSS IN hPortType (INPUT pSalesSS) NO-ERROR. FebSales.xls http request <SOAP-ENV:Body> <ns1:SendSalesSS_Request . . . <pSalesSS xsi:type=“xsd:base64Binary”> 8%Asd08#4ga9384281tafs+lasdf… </pSalesSS> </ns1:SendSalesSS_Request> </SOAP-ENV:body>
Integrity of data 4GL Application Web service Value1 = 256.69484. RUN SendValue in hPortType (INPUT Value1). . . . RUN GetValue in hPortType (OUTPUT Value2). Value = 256.69 xsd:decimal with restriction of 2 decimal places Is 256.69 acceptable?
Summary You should now be able to: • Describe the difference between simple data and complex data • Describe how XML Schema data maps to or from 4GL data types • Invoke a Web service operation using simple data types • Invoke a Web service operation where the Web service types do not match 4GL types • Invoke a Web service operation which returns an array • Invoke a Web service operation that exchanges binary data