RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLBroker.RequestUpdate Method

Responds to an HTTP update request.

Pascal
function RequestUpdate(Sender: TObject; Request: TWebRequest; Response: TWebResponse): Boolean; virtual;
C++
virtual __fastcall Boolean RequestUpdate(TObject * Sender, TWebRequest Request, TWebResponse Response);

Call RequestUpdate when using a Web action item to respond to update requests from a Web browser. When using a Web action item to respond to update requests, instead of letting the XML broker receive the update requests directly, you should set the Enabled property of the WebDispatch to false. 

RequestUpdate generates an OnRequestUpdate event, to allow the event handler to apply the updates in the HTTP request message and generate a response. If the OnRequestUpdate event handler does not handle the message, RequestUpdate applies the updates using the ApplyXMLUpdates method. Finally, if there are no update errors, RequestUpdate generates an OnGetResponse event. If there were update errors, RequestResponse generates an OnGetErrorResponse event and (if the event handler does not generate a response) assigns the content of ReconcileProducer to the response message. If there are update errors and the response is not completed by an event handler or the ReconcileProducer, the XML broker raises an exception. 

Sender is the object that received the request message. 

Request describes an HTTP request message that contains the updates that need to be applied. 

Response is the emerging response object that should be completed by RequestUpdate so that the XML broker can send it back to the Web browser. 

RequestUpdate returns true if the response message is ready to send back to the Web browser, false if it still needs more processing. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!