Release 10.1A: OpenEdge Development:
Web Services

> ## Accessing SOAP header entries

> The SOAP header-entryref object handle provides two methods for accessing the element subtree of the SOAP header entry that it references, as shown in Figure 11–2.

> Figure 11–2: Accessing entry elements in the SOAP header object model

> The SOAP header-entryref object handle provides two methods to access the XML in the header entry that it references:

> - The `GET-NODE( )` method assigns an X-noderef object to reference the root node of the header entry in the DOM subtree of the header entry. You can then use this X-noderef object to examine the XML elements by walking and returning values for the nodes of the header entry DOM subtree.

> - The `GET-SERIALIZED( )` method assigns a `LONGCHAR` value that contains the entire header entry as a serialized XML string that you can parse yourself using either the 4GL SAX reader or DOM parser.

> The SOAP header-entryref object handle also provides two corresponding methods for replacing the entire content of the SOAP header entry that it references:

> - The `SET-NODE( )` method replaces the content of the header entry with the DOM subtree whose root node is currently referenced by a specified X-noderef object.

> - The `SET-SERIALIZED( )` method replaces the content of the header entry with a DOM subtree that it parses from a specified `LONGCHAR` value containing the serialized XML for the header entry that you can build and write using a DOM tree or the 4GL SAX writer.

> For more information on these objects and all the attributes and methods that they support, see the "Creating and managing SOAP message headers" section.

> In rare instances when the WSDL Analyzer identifies a temp-table or ProDataSet definition that maps to the header entry, you can use the `GET-SERIALIZED( )` and `SET-SERIALIZED( )` methods in conjunction with the `READ-XML( )` and `WRITE-XML( )` methods of the documented 4GL object (temp-table or ProDataSet) to access or build the header entry.

> | To access a SOAP response header entry as a temp-table or ProDataSet:

> 1. Set a `LONGCHAR` with the header entry XML using the `GET-SERIALIZED( )` method.

> 2. Load the temp-table or ProDataSet from the `LONGCHAR` using the `READ-XML( )` method.

> | To create a SOAP request header entry from a temp-table or ProDataSet:

> 1. Write the header entry from the temp-table or ProDataSet to a `LONGCHAR` using the `WRITE-XML( )` method.

> 2. Replace the header entry with the serialized XML in the `LONGCHAR` using the `GET-SERIALIZED( )` method.

> For more information on temp-table and ProDataSet XML methods, see OpenEdge Development: Programming Interfaces .

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095