# Wrapping each and every RemObjects and DataAbstract Service Method Call

**URL:** https://talk.remobjects.com/t/wrapping-each-and-every-remobjects-and-dataabstract-service-method-call/14018
**Category:** Remoting SDK
**Tags:** delphi
**Created:** [August 23, 2017, 3:48pm UTC](https://talk.remobjects.com/t/wrapping-each-and-every-remobjects-and-dataabstract-service-method-call/14018 "2017-08-23T15:48:15Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [August 25, 2017, 8:12am UTC](https://talk.remobjects.com/t/wrapping-each-and-every-remobjects-and-dataabstract-service-method-call/14018/2 "2017-08-25T08:12:48Z")

</div>

you can use [HTTPServer.OnCustomResponseEvent](https://docs.dataabstract.com/API/Delphi/TROBaseHTTPServer_Class/#OnCustomResponseEvent) event as described at [Using OnCustomResponseEvent in a ROSDK Server](https://talk.remobjects.com/t/using-oncustomresponseevent-in-a-rosdk-server/6767)

Note: you may need to write your exception into stream manually like

```auto
MyException := Exception.Create(‘sdf’);
aResponseStream.Size := 0;
lMessage.InitializeExceptionMessage(aTransport, '', lMessage.InterfaceName, lMessage.MessageName);
lMessage.WriteException(aResponseStream, MyException);

```

---

_[View the full topic](https://talk.remobjects.com/t/wrapping-each-and-every-remobjects-and-dataabstract-service-method-call/14018)._
