Я использовал HANA XS на SAP Cloud Platform Neo, чтобы создать базу данных HANA и представить ее через OData - не удалось POST с помощью Postman. Я получаю 400 - Плохой запрос - «Синтаксическая ошибка в позиции 0.»
Вот содержимое файла .xsodata:
service{
"com.******.jereclass::JeReclassHistory";
}
Вот содержимое файла .xsaccess:
{
"exposed": true,
"authentication": [{
"method": "Form"
}],
"mime_mapping": [{
"extension": "jpg",
"mimetype": "image/jpeg"
}],
"force_ssl": false,
"enable_etags": true,
"prevent_xsrf": false,
"anonymous_connection": null,
"cors": [{
"enabled": true,
"allowMethods":["GET","POST"]
}],
"cache_control": "no-cache, no-store",
"default_file": "index.html"
}
Вот содержимое файла .hdbschema:
schema_name = "JE_Reclass";
Вот содержимое файла .hdbtable:
table.schemaName = "JE_Reclass";
table.tableType = COLUMNSTORE;
table.columns = [
{ name = "Department"; sqlType = VARCHAR; nullable = false; length = 20; },
{ name = "MapName"; sqlType = VARCHAR; nullable = false; length = 30; },
{ name = "FiscalYear"; sqlType = VARCHAR; nullable = false; length = 4; },
{ name = "Period"; sqlType = VARCHAR; nullable = false; length = 3; },
{ name = "RunID"; sqlType = VARCHAR; nullable = false; length = 30; },
{ name = "PostingDate"; sqlType = DATE; nullable = false; },
{ name = "FromDate"; sqlType = DATE; nullable = false; },
{ name = "FromTime"; sqlType = TIME; nullable = false; },
{ name = "ToDate"; sqlType = DATE; nullable = false; },
{ name = "ToTime"; sqlType = TIME; nullable = false; },
{ name = "CreateBy"; sqlType = VARCHAR; nullable = false; length = 12; },
{ name = "CreateDate"; sqlType = DATE; nullable = false; },
{ name = "CreateTime"; sqlType = TIME; nullable = false; }
];
table.primaryKey.pkcolumns = ["Department", "MapName", "FiscalYear", "Period", "RunID"];
**** Почтальон: ****
POST /com/*******/jereclass/JeReclassHistorySvc.xsodata/JeReclassHistory HTTP/1.1
Host: jereclass******.us3.hana.ondemand.com
Content-Type: application/json
Authorization: Basic **************
User-Agent: PostmanRuntime/7.18.0
Accept: */*
Cache-Control: no-cache
Postman-Token: ***********************
Host: jereclass******.us3.hana.ondemand.com
Accept-Encoding: gzip, deflate
Content-Length: 456
Cookie: *****************************
Connection: keep-alive
cache-control: no-cache
{
"Department": "Payroll",
"MapName": "TEST JE RECLASS",
"FiscalYear": "2013",
"Period": "01",
"RunID": "20130112134231-SCURRY",
"PostingDate": "2013-01-12T00:00:00.0000000",
"FromDate": "2013-01-01T00:00:00.0000000",
"FromTime": "PT1H10M54S",
"ToDate": "2013-01-12T00:00:00.0000000",
"ToTime": "PT13H42M30S",
"CreateBy": "SCURRY",
"CreateDate": "2013-01-12T00:00:00.0000000",
"CreateTime": "PT14H5M7S"
}