IServiceHttpInfo
Overview
The IServiceHttpInfo interface allows to get information about a Schema that is related with a data abstract service.
This interface is implemented by the DataAbstractService class to get information about the related service schema:
method DataAbstractService.GetContentStream(aPath: System.String; out aCloseStream: System.Boolean; out aContentType: System.String): System.IO.Stream;
begin
if not AllowSchemaAccess or not AllowHttpSchemaAccess then
raise new DAException('Schema access has been disabled (HTTP)');
result := new MemoryStream();
ServiceSchema.Serialization.SaveToStream(result);
result.Seek(0, SeekOrigin.Begin);
aCloseStream := true;
aContentType := 'text/xml';
end;
and is used in the all HTTP Server Channels, such as HttpSysServerChannel, IpHttpServerChannel, etc. to build the following response:
protected void HandleHttpRequest(object aSender, OnHttpRequestArgs ea)
{
...
IServiceHttpInfo lHttpInfo = lService as IServiceHttpInfo;
if (lHttpInfo != null)
{
bool lCloseStream;
string lContentType;
ea.Response.ContentStream = lHttpInfo.GetContentStream(lSubPath, out lCloseStream, out lContentType);
ea.Response.CloseStream = lCloseStream;
ea.Response.Header.ContentType = lContentType;
return;
}
...
}
The IServiceHttpInfo interface is used internally. You do not need to use this class directly.
Location
- Reference: RemObjects.SDK.Server.dll
- Namespace: RemObjects.SDK.Server
- Ancestry: IROService | IServiceHttpInfo
Required Methods
GetContentStream
Gets information about the Schema that is related with the data abstract service.
method GetContentStream(path: String; out closeStream: Boolean; out contentType: String): Stream
Stream GetContentStream(String path, out Boolean closeStream, out String contentType)
Function GetContentStream(path As String, <OutAttribute> ByRef closeStream As Boolean, <OutAttribute> ByRef contentType As String) As Stream
Parameters:
- path:
- closeStream:
- contentType:
- Schemas
- Server Channels
- DataAbstractService