Axis 7000 Интеграция приложений - Страница 5
Просмотреть онлайн или скачать pdf Интеграция приложений для Сервер Axis 7000. Axis 7000 11 страниц. Network document server
Также для Axis 7000: Руководство по установке (1 страниц), Информация об установке (1 страниц)
Axis Communications AXIS 7000 Application Integration using HTTP or FTP
Create a CInternetSession object:
1.
CInternetSession aSession("ScanSDK");
The parameter is a string identifying the application. An application needs only one
instance of this class.
Using this object the applications can now retrieve an HTTP connection:
2.
CHttpConnection* anHttpConnection =
Using this connection, the application can now open a request. By default, redirected
3.
responses are handled automatically:
CHttpFile* anHttpFile =
The first parameter defines that a POST request shall be opened, the second is the
request target.
Create a query string containing the parameters:
4.
CString aQueryString =
"\n\npage=scan&profileName=Color+low&scanNow=";
Add an HTTP header which informs the HTTP server that the request contains encoded
5.
data:
anHttpFile->AddRequestHeaders("Content-type:
application/x-www-form-urlencoded");
6.
Send the request:
anHttpFile->SendRequest(NULL, 0, (void*)(const
char*)aQueryString, aQueryString.GetLength());
The method will not return until a response is received from the server or after a time
out.
If the request is successful, image data will be returned. If not, an HTML page containing
7.
error information will be returned. One way of testing what was returned is to look at the
Content-type. Its value can be retrieved by the following call:
CString aContType;
anHttpFile->QueryInfo(HTTP_QUERY_CONTENT_TYPE,
aContType);
aSession.GetHttpConnection("171.16.4.140",
anHttpConnection->OpenRequest(0,
"/user/scan/scan.shtml");
5/11
Copyright © 2000 Axis Communications
(INTERNET_PORT) 80,
NULL, NULL);
00-05-31