Last modified by Nico Lemaire on 2025/05/06 15:49
From version 20.2
edited by Robert Jan Daams
on 2024/09/04 10:50
on 2024/09/04 10:50
Change comment:
There is no comment for this version
To version 22.2
edited by Robin Huisman
on 2024/09/06 11:26
on 2024/09/06 11:26
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.R jDaams1 +XWiki.RobinHuisman - Content
-
... ... @@ -1265,6 +1265,15 @@ 1265 1265 (% element-id="650" %) 1266 1266 TerraIndex will request per license/customer which results are ready. These are queried if the latest changes are newer than the last check. This way we never download too much unnecessarily and it can always be requested again. 1267 1267 1268 + 1269 +(% class="box infomessage" element-id="650" %) 1270 +((( 1271 +**Order status** we support as minimal: 1272 +3 = Reportnumber is known, no results yet, but it's the official report certificate number. This is optional to send. 1273 +4 = Conceptual, temporary results avaiable, but not final yet. This is optional to send. 1274 +5 = Final results are available. This is required to send. 1275 +))) 1276 + 1268 1268 (% class="table-hover" element-id="647" %) 1269 1269 (% element-id="645" %)|(% element-id="644" %)Action|(% element-id="643" %)TerraIndex|(% element-id="642" %) |(% element-id="640" %)Laboratorium|(% element-id="639" %)Parameters/Message|(% element-id="638" %)Remarks|(% element-id="637" %)ResultCodes 1270 1270 (% element-id="636" %)|(% element-id="635" %)1|(% element-id="634" %)Sends a request to the function: GetCustomers().|=(% element-id="633" %)>|(% element-id="632" %) |(% element-id="630" %)WebserviceUsername (string), ... ... @@ -1387,6 +1387,118 @@ 1387 1387 10 = PDFNotAvailable 1388 1388 (% element-id="370" %)|(% element-id="369" %)12|(% element-id="368" %)Receives the PDF and stores it for reporting and downloading.|(% element-id="367" %) |(% element-id="365" %) |(% element-id="363" %) |(% element-id="361" %) |(% element-id="359" %) 1389 1389 1399 +(% class="wikigeneratedid" element-id="357" %) 1400 +== Request example Order Status == 1401 + 1402 +public GetOrderStatusesCall.Response OrderStatuses(string WebserviceUsername, string WebservicePassword, string CustomerUsername, string customerid, DateTime? timestampSince) 1403 + { 1404 + GetOrderStatusesCall.Response set = new GetOrderStatusesCall.Response(); 1405 + string responseMessage = null; 1406 + 1407 + if (timestampSince == null) timestampSince = DateTime.Now.AddHours(-3); ~/~/Now, minus 3 hours 1408 + var formattedTimestamp = System.Xml.XmlConvert.ToString((DateTime)timestampSince, System.Xml.XmlDateTimeSerializationMode.RoundtripKind); 1409 + 1410 + try 1411 + { 1412 + var content = new FormUrlEncodedContent(new[] 1413 + { 1414 + new KeyValuePair<string, string>("userName", WebserviceUsername), 1415 + new KeyValuePair<string, string>("password", WebservicePassword), 1416 + new KeyValuePair<string, string>("customerUsername", CustomerUsername), 1417 + new KeyValuePair<string, string>("clientId", customerid), 1418 + new KeyValuePair<string, string>("lastModified", formattedTimestamp), 1419 + }); 1420 + 1421 + HttpResponseMessage response = _HttpClient.PostAsync(_HttpClient.BaseAddress + "/GetOrderStatuses", content).GetAwaiter().GetResult(); 1422 + responseMessage = response.Content.ReadAsStringAsync().GetAwaiter().GetResult(); 1423 + response.EnsureSuccessStatusCode(); 1424 + 1425 + if (string.IsNullOrEmpty(responseMessage)) 1426 + { 1427 + throw new Exception("Empty response from: [" + _HttpClient.BaseAddress + " /GetOrderStatuses" + "]"); 1428 + } 1429 + using (var ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(responseMessage~)~)~) 1430 + { 1431 + XmlSerializer serializer = new XmlSerializer(typeof(GetOrderStatusesCall.Response)); 1432 + set = (GetOrderStatusesCall.Response)serializer.Deserialize(ms); 1433 + } 1434 + 1435 + } 1436 + catch (Exception ex) 1437 + { 1438 + #region handle exception 1439 + 1440 + set.Status = new BusinessEntities.LabRestService.GetOrderStatusesCall.ResponseStatus(); 1441 + set.Status.StatusCode = ((int)ResultCodes.GeneralError).ToString(); 1442 + set.Status.ErrorMessage = "Exception occurred in GetOrderStatuses (username: " + WebserviceUsername + ", password: " + WebservicePassword + ") with message: " + ex.ToString(); 1443 + 1444 + ex.Data.Add("Response", responseMessage); 1445 + ex.Data.Add("WebserviceUsername", WebserviceUsername); 1446 + ex.Data.Add("WebservicePassword", WebservicePassword); 1447 + ex.Data.Add("CustomerUsername", CustomerUsername); 1448 + ex.Data.Add("customerid", customerid); 1449 + ex.Data.Add("lastModified", formattedTimestamp); 1450 + ex.Data.Add("Result", set); 1451 + 1452 + throw; 1453 + #endregion 1454 + } 1455 + 1456 + return set; 1457 + } 1458 + 1459 +== Response XML Example == 1460 + 1461 +<?xml version="1.0" encoding="UTF-8" standalone="no"?> 1462 + <Response> 1463 + <Orders> 1464 + <Order> 1465 + <OrderStatus>Reported</OrderStatus> 1466 + <SIKBOrderId></SIKBOrderId> 1467 + <SIKBOrderStatus>5</SIKBOrderStatus> 1468 + <OrderId>4855422</OrderId> 1469 + <RapportNummer>12193838</RapportNummer> 1470 + <IsDelayed>False</IsDelayed> 1471 + <ExpectedOn>09/10/2015 17:15:00</ExpectedOn> 1472 + </Order> 1473 + <Order> 1474 + <OrderStatus>New</OrderStatus> 1475 + <SIKBOrderId></SIKBOrderId> 1476 + <SIKBOrderStatus>3</SIKBOrderStatus> 1477 + <OrderId>7106525</OrderId> 1478 + <RapportNummer>02808304-0749-41ae-96eb-d62b0365ebe4</RapportNummer> 1479 + <IsDelayed>False</IsDelayed> 1480 + <ExpectedOn></ExpectedOn> 1481 + </Order> 1482 + <Order> 1483 + <OrderStatus>New</OrderStatus> 1484 + <SIKBOrderId></SIKBOrderId> 1485 + <SIKBOrderStatus>3</SIKBOrderStatus> 1486 + <OrderId>7108954</OrderId> 1487 + <RapportNummer>10776137-ef99-4947-9a6a-9a3b32cd2dec</RapportNummer> 1488 + <IsDelayed>False</IsDelayed> 1489 + <ExpectedOn></ExpectedOn> 1490 + </Order> 1491 + <Order> 1492 + <OrderStatus>New</OrderStatus> 1493 + <SIKBOrderId></SIKBOrderId> 1494 + <SIKBOrderStatus>3</SIKBOrderStatus> 1495 + <OrderId>7110401</OrderId> 1496 + <RapportNummer>7881575c-bee2-409f-b304-9e472e7ac702</RapportNummer> 1497 + <IsDelayed>False</IsDelayed> 1498 + <ExpectedOn>11/10/2018 00:00:00</ExpectedOn> 1499 + </Order> 1500 + </Orders> 1501 + <Status> 1502 + <StatusCode>1</StatusCode> 1503 + <StatusCodeDescription>OK</StatusCodeDescription> 1504 + <AtmisErrorCode>0</AtmisErrorCode> 1505 + <ErrorMessage></ErrorMessage> 1506 + </Status> 1507 + </Response> 1508 + 1509 + 1510 + 1390 1390 (% element-id="357" %) 1391 1391 = (% element-id="356" %)Customer wants to see real time information about the status in the interface(%%) = 1392 1392