This section provides basic information for handling ProDataSet parameters in Java.

Note: This section does not continue the sample application in the rest of this appendix.

The following table describes the specifications for a sample Web service and interface used in this section.

Table 1. Java sample Web service specifications
Property or component Value or name Object type
Web service CustOrdersService
URL http://servicehost:80/wsa/wsa1
Session model Session-Free
TargetNamespace urn:CustOrders
WSDL objects CustOrdersObj AppObject
dsCustOrd ProDataSet dsCustOrd

In general, the other information presented in the previous example for creating a client interface and developing a client application applies here as well. Except where the differences in the session model affect things, you would complete the same tasks to build this sample.

The code samples in this section rely on classes generated by Apache Axis from a Doc/Lit WSDL for the following ABL code snippet:

/* getCustOrders.p */
DEFINE TEMP-TABLE ttCust NO-UNDO
    FIELD CustNum AS INTEGER 
    FIELD Name AS CHARACTER 
    INDEX CustNumIdx IS UNIQUE PRIMARY CustNum.

DEFINE TEMP-TABLE ttOrder NO-UNDO
    FIELD OrderNum AS INTEGER 
    FIELD CustNum AS INTEGER 
    INDEX OrderNumIdx IS UNIQUE PRIMARY OrderNum
    INDEX CustOrdIdx IS UNIQUE CustNum OrderNum.
      
DEFINE TEMP-TABLE ttOrderLine NO-UNDO
    FIELD OrderNum AS INTEGER 
    FIELD LineNum AS INTEGER 
    INDEX OrderLineIdx IS UNIQUE PRIMARY OrderNum LineNum.
      
DEFINE DATASET dsCustOrd FOR ttCust, ttOrder, ttOrderLine
    DATA-RELATION CustOrdRel FOR ttCust, ttOrder
        RELATION-FIELDS (CustNum, CustNum)
    DATA-RELATION OrdLinesRel FOR ttOrder, ttOrderLine
        RELATION-FIELDS (OrderNum, OrderNum) NESTED.

DEFINE INPUT PARAMETER iCustNum AS INTEGER.
DEFINE OUTPUT PARAMETER DATASET FOR dsCustOrd.

/* fill dataset and return to caller */
...