From RAD Studio API Documentation
Jump to: navigation, search







Type Visibility Source Unit Parent
class public


THTTPRIO uses HTTP messages to call remote interfaced objects using SOAP.

Use THTTPRIO to generate statically-linked calls to invokable interfaces on a remote Web Service application. When an application casts THTTPRIO to a registered invokable interface, it dynamically generates an in-memory method table, providing an implementation to that invokable interface. THTTPRIO executes the methods in this method table by encoding the method call as a SOAP request and sending an HTTP request message to the Web Service application. It unpacks the resulting HTTP response message to obtain the return value and any output parameters, or to raise an exception if the request generated an exception on the server.

Use the published properties of THTTPRIO to indicate how to connect to the Web Service application. There are two ways to identify where the server application is located:

  • You can use the URL property to specify the URL where the server application is located.
  • If you want to look up connection information dynamically at run time from a WSDL document, you can set the WSDLLocation property. After setting WSDLLocation, select values for the Service and Port properties from drop-down lists in the object inspector to fully specify the binding you want to use.

If you need to use a proxy server, or if the server requires authentication, use the properties of the THTTPReqResp object, that is the value of the HTTPWebNode property to provide the necessary information.

Before THTTPRIO can generate a method table for an invokable interface, the interface must be registered with the invocation registry. To register an invokable interface, use the global InvRegistry function to access the registry, and use its RegisterInterface method.

When a THTTPRIO object is created as a child of a form or DataModule, it must be released before the destruction of the form or DataModule. When it is created with a nil (Delphi) or NULL (C++) parameter, it will auto-destroy when the references count drops to zero.

See Also