Kbase P66186: How to access and pass complex data to a Web Service
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  08/06/2006 |
|
Status: Unverified
GOAL:
How to access and pass complex data to a Web Service
FACT(s) (Environment):
OpenEdge 10.0A
OpenEdge 10.0B
FIX:
Wherever you encounter complex data, for a Web service, you must access and manage that data as serialized XML. Complex data that you might need to access includes:
? Complex type parameters (defined by the XML Schema <complexType> element), including complex arrays.
? SOAP header entries.
? SOAP fault detail.
For an OUTPUT parameter, you can work with serialized XML in a CHARACTER or LONGCHAR parameter directly, using 4GL string-manipulation statements and functions, or work with it in its parsed form using the 4GL SAX reader or DOM parser. In any case, OpenEdge provides the entire <complexType> element for the value, exactly as it appears in the SOAP response message.
For an INPUT parameter, you can build the serialized XML in a CHARACTER or LONGCHAR parameter directly, using 4GL string-manipulation statements and functions, or you can build or maintain the required <complexType> element using the 4GL DOM parser, and save the result as a LONGCHAR value when you are ready to pass it as an INPUT parameter to the Web service. (The DOM parser is your only choice, as there is no 4GL SAX writer to serialize the XML.)