Complex data types in XML appear in many forms, but share a common feature of representing multiple simple and other complex data types as an aggregate (group). One of the most common complex data types in XML is the XML Schema complex type. An XML Schema complex type is an aggregate of one or more simple types or complex types defined by an enclosing complexType XML Schema element.
When the WSDL Analyzer encounters a Web service operation parameter defined with a complex data type, it attempts to identify an ABL data type to represent the parameter that both maps to the parameter exactly and provides the easiest access to the data in ABL. Thus, the WSDL Analyzer might suggest any of the following parameter data types to represent:
A static or dynamic temp-table (TABLE or TABLE-HANDLE) parameter, if the WSDL is for an OpenEdge Web service
A static or dynamic ProDataSet (DATASET or DATASET-HANDLE) parameter
A LONGCHAR or CHARACTER parameter, possibly in array form
Once in ABL, you can work with data from Web service complex data types using the features of the ABL data type used to represent it. For example, if the WSDL Analyzer determines that you can represent a Web service parameter as a temp-table or ProDataSet, you can access the data as a temp-table or ProDataSet with no need to manipulate the SOAP message XML. OpenEdge allows some flexibility in how the simple XML Schema data types of individual data elements map to the ABL fields in a temp-table. The casting rules for these mappings are similar to those for simple data type parameters (see the Simple data types). For more information, see the sections on mapping between XML Schema and temp-table field data types, in OpenEdge Development: Programming Interfaces. For more information on how the WSDL Analyzer analyzes and documents complex data that maps to temp-tables and ProDataSets, see Analyzing complex data.
If the WSDL Analyzer can only represent the parameter as a LONGCHAR or CHARACTER (the most likely scenario), you must do one of the following:
Directly manipulate the serialized XML, as specified by the WSDL Analyzer, in ABL CHARACTER or LONGCHAR variables.
Convert the serialized XML to a parsed representation using the ABL SAX or DOM read and write methods. For more information, see OpenEdge Development: Programming Interfaces.
Whatever technique you use to work directly with the XML for a complex data type parameter in ABL, if you need to pass the parameter back as input to the Web service, you must pass it back as serialized XML. So, if you maintain the data for complex types in an ABL DOM tree (de-serialized) or read it as a stream using SAX, you must serialize it again to a string before passing it back to a Web service as a complex data type parameter. You can do this from a DOM tree, by using a DOM method to convert the DOM tree to a character string, and you can do this in SAX by using SAX write methods to create the XML character string that you use for input.
For more information on how to manage complex data types as input and output parameters of Web service operations and work with the data in ABL, see Managing operation parameters.