Last modified by Nico Lemaire on 2025/05/06 15:49

From version 20.1
edited by Robin Huisman
on 2024/06/27 11:09
Change comment: There is no comment for this version
To version 26.1
edited by Robin Huisman
on 2024/10/25 14:53
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -34,30 +34,38 @@
34 34  Our IP-addresses:
35 35  
36 36  (% element-id="1881" %)
37 -inbound [[Web.terraindex.com>>url:http://Web.terraindex.com||element-id="1880"]]
37 +__**inbound [[Web.terraindex.com>>url:http://Web.terraindex.com||element-id="1880"]]**__
38 38  137.116.199.164
39 39  
40 40  (% element-id="1878" %)
41 -outbound [[Test.terraindex.com>>url:http://Test.terraindex.com||element-id="1877"]]
41 +__**outbound [[Test.terraindex.com>>url:http://Test.terraindex.com||element-id="1877"]]**__
42 42  104.45.9.128
43 43  
44 44  (% element-id="1875" %)
45 -Production outbound
45 +__**Production outbound (http)**__
46 46  40.115.34.64
47 47  
48 +__**Production outbound (ftp):**__
49 +
50 +13.93.123.234
51 +
48 48  (% element-id="1873" %)
49 -Test outbound
53 +__**Test outbound (http)**__
50 50  13.73.138.173
51 51  
56 +__**Test outbound (ftp):**__
57 +
58 +51.145.244.12
59 +
52 52  (% element-id="1871" %)
53 -CD/CI outbound
61 +__**CD/CI outbound**__
54 54  40.114.238.16
55 55  
56 56  (% element-id="1869" %)
57 -Office outbound
65 +__**Office outbound**__
58 58  213.124.115.132
67 +
59 59  
60 -
61 61  (% element-id="1864" %)
62 62  = (% element-id="1863" %)Labdelivery (menu-card) files Exchange(%%) =
63 63  
... ... @@ -1249,7 +1249,7 @@
1249 1249  )))
1250 1250  
1251 1251  (% element-id="654" %)
1252 -= (% element-id="653" %)Get Order status and Results(%%) =
1260 += (% element-id="653" %)Get Order status and Results XML and with PDF(%%) =
1253 1253  
1254 1254  (% element-id="652" %)
1255 1255  == (% element-id="651" %)Solution/Design(%%) ==
... ... @@ -1257,6 +1257,15 @@
1257 1257  (% element-id="650" %)
1258 1258  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.
1259 1259  
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 +
1260 1260  (% class="table-hover" element-id="647" %)
1261 1261  (% 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
1262 1262  (% 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), 
... ... @@ -1380,6 +1380,240 @@
1380 1380  (% 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" %)
1381 1381  
1382 1382  (% 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 Status 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 +== Request example Order XML ==
1511 +
1512 +
1513 +public GetOrderResultsCall.Response GetOrderResults(string WebserviceUsername, string WebservicePassword, string CustomerUsername, string customerid, string orderid, string sikbVersion)
1514 + {
1515 + GetOrderResultsCall.Response set = new GetOrderResultsCall.Response();
1516 + string responseMessage = null;
1517 + try
1518 + {
1519 + bool useZipstream = true;
1520 + var content = new FormUrlEncodedContent(new[]
1521 + {
1522 + new KeyValuePair<string, string>("userName", WebserviceUsername),
1523 + new KeyValuePair<string, string>("password", WebservicePassword),
1524 + new KeyValuePair<string, string>("customerUsername", CustomerUsername),
1525 + new KeyValuePair<string, string>("clientId", customerid),
1526 + new KeyValuePair<string, string>("orderId", orderid),
1527 + new KeyValuePair<string, string>("sikbVersion", sikbVersion),
1528 + new KeyValuePair<string, string>("useZip", useZipstream.ToString() ),
1529 + });
1530 +
1531 + HttpResponseMessage response = _HttpClient.PostAsync(_HttpClient.BaseAddress + "/GetOrderResults", content).GetAwaiter().GetResult();
1532 + responseMessage = response.Content.ReadAsStringAsync().GetAwaiter().GetResult();
1533 + response.EnsureSuccessStatusCode();
1534 +
1535 + if (string.IsNullOrEmpty(responseMessage))
1536 + {
1537 + throw new Exception("Empty response from: [" + _HttpClient.BaseAddress + " /GetOrderResults" + "]");
1538 + }
1539 + using (var ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(responseMessage~)~)~)
1540 + {
1541 + XmlSerializer serializer = new XmlSerializer(typeof(GetOrderResultsCall.Response));
1542 + set = (GetOrderResultsCall.Response)serializer.Deserialize(ms);
1543 + }
1544 +
1545 + if (useZipstream && !string.IsNullOrEmpty(set.FileContent))
1546 + {
1547 + ~/~/convert from base64 string back to normal
1548 + ~/~/first check for real Base64, by checking there is no 'xml' in it
1549 + ~/~/If encoded, it wont contain either of the root XML tags of SIKB
1550 + if (!set.FileContent.Contains("FeatureCollectionIMSIKB0101") && !set.FileContent.Contains("labresultaat"))
1551 + {
1552 + set.FileContent = ZipStreamHelper.DecompressBase64StringToString(set.FileContent);
1553 + }
1554 + }
1555 +
1556 + }
1557 + catch (Exception ex)
1558 + {
1559 + #region handle exception
1560 +
1561 + set.Status = new BusinessEntities.LabRestService.GetOrderResultsCall.ResponseStatus();
1562 + set.Status.StatusCode = ((int)ResultCodes.GeneralError).ToString();
1563 + set.Status.ErrorMessage = "Exception occurred in GetOrderResults (username: " + WebserviceUsername + ", password: " + WebservicePassword + ") with message: " + ex.ToString();
1564 +
1565 + ex.Data.Add("Response", responseMessage);
1566 + ex.Data.Add("WebserviceUsername", WebserviceUsername);
1567 + ex.Data.Add("WebservicePassword", WebservicePassword);
1568 + ex.Data.Add("CustomerUsername", CustomerUsername);
1569 + ex.Data.Add("sikbVersion", sikbVersion);
1570 + ex.Data.Add("customerid", customerid);
1571 + ex.Data.Add("orderId", orderid);
1572 + ex.Data.Add("Result", set);
1573 +
1574 + throw;
1575 + #endregion
1576 + }
1577 +
1578 + return set;
1579 +
1580 +
1581 +== Response Order XML Example ==
1582 +
1583 +
1584 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1585 + <Response>
1586 + <FileContent>DhVn3Q1AA==</FileContent>  ~/~/BASE64 Zip Stream, SIKB0101 labresults xml file
1587 + <Status>
1588 + <StatusCode>1</StatusCode>
1589 + <StatusCodeDescription>OK</StatusCodeDescription>
1590 + <AtmisErrorCode>0</AtmisErrorCode>  
1591 + <ErrorMessage></ErrorMessage>
1592 + </Status>
1593 + </Response>
1594 +
1595 +
1596 +== Request example Order PDF File ==
1597 +
1598 +
1599 +
1600 + bool useZipstream = true; ~/~/ Always Supported, Keep it true!!
1601 + var content = new FormUrlEncodedContent(new[]
1602 + {
1603 + new KeyValuePair<string, string>("userName", WebserviceUsername),
1604 + new KeyValuePair<string, string>("password", WebservicePassword),
1605 + new KeyValuePair<string, string>("customerUsername", CustomerUsername),
1606 + new KeyValuePair<string, string>("clientId", customerid),
1607 + new KeyValuePair<string, string>("orderId", orderid),
1608 + new KeyValuePair<string, string>("useZip", useZipstream.ToString()), ~/~/ Always Supported, Keep it true!!.
1609 + new KeyValuePair<string, string>("languageCode", languageCode)
1610 + });
1611 +
1612 + HttpResponseMessage response = _HttpClient.PostAsync("GetOrderPdf", content).GetAwaiter().GetResult();
1613 + responseMessage = response.Content.ReadAsStringAsync().GetAwaiter().GetResult();
1614 + response.EnsureSuccessStatusCode();
1615 +
1616 +
1617 +== Response Order PDF Example ==
1618 +
1619 + <Response>
1620 + <OrderId>7113737</OrderId>
1621 + <FileContent>
1622 + BASE64 encoded file
1623 + </FileContent>
1624 + <Status>
1625 + <StatusCode>1</StatusCode>
1626 + <StatusCodeDescription>OK</StatusCodeDescription>
1627 + <ErrorMessage></ErrorMessage>
1628 + </Status>
1629 + </Response>
1630 +
1631 +
1632 +
1633 +(% element-id="357" %)
1383 1383  = (% element-id="356" %)Customer wants to see real time information about the status in the interface(%%) =
1384 1384  
1385 1385  (% element-id="354" %)