Hadn’t been doing SOAP in Delphi for a while, and needed to send some Delphi data structures over the write where both Client and Server were going to be Delphi.
These links helped me:
- Soap.InvokeRegistry.TRemotable – RAD Studio API Documentation.
- Soap.InvokeRegistry.ERemotableException – RAD Studio API Documentation.
- Any descendants of the above need to be registered on the client and server using Soap.InvokeRegistry.TRemotableTypeRegistry.RegisterXSClass – RAD Studio API Documentation; see also Registering Nonscalar Types – RAD Studio.
- Server side registration of the class goes through Soap.InvokeRegistry.TInvokableClassRegistry.RegisterInvokableClass – RAD Studio API Documentation.
- Client and server side of the interface goes through Soap.InvokeRegistry.TInvokableClassRegistry.RegisterInterface – RAD Studio API Documentation.
- More links are at Using Web Services Index – RAD Studio.
- When passing around arrays of complex types: Delphi SOAP arrays problem – Stack Overflow.
- When using Delphi 2007 or earlier, ERemotableException descendants are not handled on the client properly. See Dr.Bob Examines… #102: Win32 SOAP and Exceptions.
- When manually serialising/deserialising TRemotable descendants, read De-Serializing TRemotable problems – Google Groups.
If both client and server are Delphi, you can share the interface units and registration.
Note: since native Delphi SOAP support uses old-skool RTTI, so any property you want to go over the wire needs to be published, not public.
If you want to go beyond that, or use other protocols than SOAP, use libraries for Delphi like RemObjects SDK.
–jeroen
Filed under: Delphi, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development
