Specifying SOAP header callback procedures at run time
- Last Updated: January 16, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
For an AppServer, all information about remote requests is either passed with parameters or
obtained using the attributes and methods of various handles related to the request. For a Web
service, most information about Web service requests is passed with parameters, but some
information is also contained within other elements of the SOAP message, such as the SOAP
header. The SET-CALLBACK-PROCEDURE( ) method allows you to specify internal
procedures that can access the content of the SOAP header element in a SOAP message as part of
the invocation of a Web service operation that generates the message.
The SET-CALLBACK-PROCEDURE( ) method registers an internal procedure with a
specified ABL callback, a designation that causes the internal procedure
(callback procedure) to execute in response to some ABL core action, such as in
this case, sending and receiving SOAP messages. For Web services, this method supports two
types of ABL callbacks:
-
"REQUEST-HEADER"— Identifies a SOAP request header callback procedure. This procedure executes just after you invoke a Web service operation and just before OpenEdge sends the SOAP request message to the Web service. It allows you to create or pass an existing SOAP header for use as the SOAP header of an out-going SOAP request message. -
"RESPONSE-HEADER"— Identifies a SOAP response header callback procedure. This procedure executes just after OpenEdge receives the message sent by the Web service in response to processing the Web service operation that you invoked, and just before it makes any output or return parameters available to the ABL calling context. It allows you to examine the SOAP header of an in-coming SOAP message.
A single Web service procedure object can support only one request header callback and one
response header callback at one time. This means that for a single procedure object, you must
use the same callbacks for all operations invoked on that procedure object. However, if you
want greater flexibility to use different callbacks for the same set of operations, you can
use the RUNportTypeName statement
to create an additional Web service procedure object for the same port type. You can then
invoke the SET-CALLBACK-PROCEDURE( ) method on the new procedure object to
assign a different set of callback procedures for use by that same port type. By creating
additional Web service procedure objects this way, you can then assign as many callback
procedures for a single port type as you want.