RAD Studio VCL Reference
|
TSOAPAttachment represents an attachment that is included with SOAP messages that represent method calls in a Web Service application.
TSOAPAttachment = class(TRemotable);
class TSOAPAttachment : public TRemotable;
Use TSOAPAttachment to receive or send an attachment as a parameter or return value of a method on an invokable interface. When a SOAP method call requires an attachment, it is marshaled as a MIME multipart form, where any attachments are included as additional parts.
When receiving an attachment, the attachment is automatically stored in a temporary file, whose name is given by the CacheFile property. You can copy the contents of this temporary file using the SaveToFile or SaveToStream method. To determine the format of the data, read the ContentType property. You can read any of the other headers for the part of the multipart form that contained the attachment using the Headers property. By default, when the TSOAPAttachment object is freed, it deletes the temporary file that contains the attachment data that was received. You can use the CacheFilePersist property to prevent this file from being deleted.
The caller of an invokable interface (client) is responsible for creating any TSOAPAttachment instances that it passes as input parameters, and for freeing any TSOAPAttachment instances it creates or that are returned as output parameters or method results.
In Web Service applications (servers), any TSOAPAttachment instances that represent parameters or return values are added to the data context, which frees them as necessary.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|