Log In    |    Knowledge Base    |    4D Home
Tech Note: Returning Pictures Through SOAP
PRODUCT: 4D | VERSION: 2003.3 | PLATFORM: Mac & Win
Published On: April 15, 2004

4th Dimension 2003 and later support publishing methods as Web Services. Internally, Web Services requests and responses are SOAP (Simple Object Access Protocol) messages which follow the rules for XML data encoding. 4th Dimension automatically supports the inclusion of virtually every native 4th Dimension data type in a SOAP response, except for pictures. Fortunately, BLOBs may be included with
SOAP responses, so it is possible to include pictures by first converting them with the PICTURE TO BLOB command.

Returning pictures over SOAP is useful in a variety of situations. This technical note explains the mechanics of converting and packaging images within SOAP responses. The example database includes working code for a simple SOAP-based image serving system. Throughout the technical note, descriptions of the example database include suggestions for developing more sophisticated functionality.

Download Complete Tech Note & Example: Windows | Mac