Running an ABL non-persistent procedure
Methods that run a non-persistent procedure can:
Appear on any AppObject
Require an object ID in the SOAP request header for each method invocation unless the object is a session-free AppObject
This is the ABL prototype for the sample FindCustomerByNum( ) method:
ABL prototype for a non-persistent external procedure
/* FindCustomerByNum.p */
DEFINE INPUT PARAMETER CustomerNumber AS INTEGER.
DEFINE OUTPUT PARAMETER CustomerName AS CHARACTER.
|
This is a sample VB.NET declaration for the ABL non-persistent procedure method, FindCustomerByNum( ):
VB.NET prototype for a method that runs an ABL non-persistent procedure
Public Function FindCustomerByNum(
ByVal CustomerNumber As Integer,
ByRef CustomerName As String) As String
|
This is a sample call to this method:
VB.NET client code calling an external procedure method
Dim CustomerName As String
Dim retVal As String
retVal=webService.FindCustomerByNum(3, CustomerName)
|
This is a sample Doc/Lit SOAP request that might be generated from this FindCustomerByNum( ) method invocation:
SOAP request from calling the FindCustomerByNum procedure method
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope namespaces defined here...>
<soap:Header>
<OrderInfoID xmlns="urn:OrderSvc:OrderInfo">
<UUID>2e62cab6b81150d5:167f64e:f295e997b0:-8000;
<OrderInfo|PX-000001|AO>;M/IryPm3piDcF/W5DsH4GA==</UUID> </OrderInfoID>
<soap:Header>
<soap:Body>
<FindCustomerByNum xmlns="urn:OrderSvc:OrderInfo">
<CustomerNumber>3</CustomerNumber> </FindCustomerByNum>
</soap:Body>
</soap:Envelope>
|
Note the following elements in the preceding SOAP message:
AppObject ID (
OrderInfoID) sent using the
<UUID> element of the SOAP header
Data for the request highlighted in the example, including the request for a
CustomerNumber value of 3
This is a sample Doc/Lit SOAP response that is generated by the WSA from this invocation of the FindCustomerByNum( ) method:
SOAP response from calling the FindCustomerByNum method
<?xml version="1.0" encoding="UTF-8" ?>
<soap:Envelope namespaces defined here...>
<soap:Body>
<FindCustomerByNumResponse xmlns="urn:OrderSvc:OrderInfo">
<result xsi:nil="true" />
<CustomerName>Hoops</CustomerName> </FindCustomerByNumResponse>
</soap:Body>
</soap:Envelope>
|
Note: The CustomerName value, "Hoops", returned and highlighted in the example.