Last modified by Nico Lemaire on 2025/05/06 15:49
From version 1.2
edited by Roelof Zwaan
on 2021/11/23 10:03
on 2021/11/23 10:03
Change comment:
There is no comment for this version
To version 7.1
edited by Robin Huisman
on 2024/04/04 11:29
on 2024/04/04 11:29
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,1 @@ 1 -Implementati edcoumentatie.WebHome1 +Implementation documentation.WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.Ro elofZwaan1 +XWiki.RobinHuisman - Content
-
... ... @@ -1,47 +1,51 @@ 1 1 {{toc/}} 2 2 3 3 4 -= Firewall IP-Adresssen van TerraIndex = 4 +(% element-id="1884" %) 5 += (% element-id="1883" %)Firewall IP-Addresses of TerraIndex(%%) = 5 5 6 -Onze IP-adressen: 7 +(% element-id="1882" %) 8 +Our IP-addresses: 7 7 8 -ingaand [[Web.terraindex.com>>url:http://Web.terraindex.com]] 10 +(% element-id="1881" %) 11 +inbound [[Web.terraindex.com>>url:http://Web.terraindex.com||element-id="1880"]] 9 9 137.116.199.164 10 10 11 -ingaand [[Test.terraindex.com>>url:http://Test.terraindex.com]] 14 +(% element-id="1878" %) 15 +outbound [[Test.terraindex.com>>url:http://Test.terraindex.com||element-id="1877"]] 12 12 104.45.9.128 13 13 14 -Productie uitgaand 18 +(% element-id="1875" %) 19 +Production outbound 15 15 40.115.34.64 16 16 17 -Test uitgaand 22 +(% element-id="1873" %) 23 +Test outbound 18 18 13.73.138.173 19 19 20 -CD/CI uitgaand 26 +(% element-id="1871" %) 27 +CD/CI outbound 21 21 40.114.238.16 22 22 23 ---Kantoor VPN uitgaand (niet meer in gebruik, was de oude OpenVPN) 24 -10.33.66.215-- 25 - 26 -Kantoor uitgaand 30 +(% element-id="1869" %) 31 +Office outbound 27 27 213.124.115.132 28 28 29 ---Oude Citrix uitgaand (citrix is ook verhuisd, dit is niet meer in gebruik) 30 -83.96.194.140-- 31 31 35 +(% element-id="1864" %) 36 += (% element-id="1863" %)Labdelivery (menu-card) files Exchange(%%) = 32 32 33 -= Labaanlever bestanden uitwisseling = 38 +(% element-id="1862" %) 39 +== (% element-id="1861" %)Solution/Design(%%) == 34 34 35 -== Oplossing/Design == 36 36 37 - 38 -(% class="table-hover" %) 39 -|**Action**|**TerraIndex**| |**Laboratorium**|**Parameters/Message**|**Remarks**|**ResultCodes** 40 -|1|Sends a request to the function: GetCustomers().|=>| |**WebserviceUsername (string), ** 41 -**WebservicePassword (string),** 42 -**CustomerUsername (string)**| | 43 -|2| | |Receives the request and check the customers this username and searches the dateLastChanged for this Customer.| | | 44 -|3| |<=|Sends back the list of customers with the lastChangedTimestamp|ResultCode (), 42 +(% class="table-hover" element-id="1858" %) 43 +(% element-id="1856" %)|(% element-id="1855" %)(% element-id="1854" %)**Action**|(% element-id="1853" %)(% element-id="1852" %)**TerraIndex**|(% element-id="1851" %) |(% element-id="1849" %)(% element-id="1848" %)**Laboratorium**|(% element-id="1847" %)(% element-id="1846" %)**Parameters/Message**|(% element-id="1845" %)(% element-id="1844" %)**Remarks**|(% element-id="1843" %)(% element-id="1842" %)**ResultCodes** 44 +(% element-id="1841" %)|(% element-id="1840" %)1|(% element-id="1839" %)Sends a request to the function: GetCustomers().|=(% element-id="1838" %)>|(% element-id="1837" %) |(% element-id="1835" %)(% element-id="1834" %)**WebserviceUsername (string), **(%%) 45 +(% element-id="1832" %)**WebservicePassword (string),**(%%) 46 +(% element-id="1830" %)**CustomerUsername (string)**|(% element-id="1829" %) |(% element-id="1827" %) 47 +(% element-id="1825" %)|(% element-id="1824" %)2|(% element-id="1823" %) |(% element-id="1821" %) |(% element-id="1819" %)Receives the request and check the customers this username and searches the dateLastChanged for this Customer.|(% element-id="1818" %) |(% element-id="1816" %) |(% element-id="1814" %) 48 +(% element-id="1812" %)|(% element-id="1811" %)3|(% element-id="1810" %) |(% element-id="1808" %)<=|(% element-id="1807" %)Sends back the list of customers with the lastChangedTimestamp|(% element-id="1806" %)ResultCode (), 45 45 ErrorMessage (string), 46 46 List<customer> , Customer: 47 47 CustomerCode (string), ... ... @@ -48,7 +48,7 @@ 48 48 CustomerName (string), 49 49 LabID (int), 50 50 LabName (string), 51 -ChangedTimeStamp (DateTime)|We receive the dateTimestamp instead of sending it, so we always get the full list and we are also able to delete customercodes.|1 = Success, 55 +ChangedTimeStamp (DateTime)|(% element-id="1798" %)We receive the dateTimestamp instead of sending it, so we always get the full list and we are also able to delete customercodes.|(% element-id="1797" %)1 = Success, 52 52 2 = GeneralError, 53 53 3 = WrongSIKBVersion, 54 54 4 = InvalidCredentials, ... ... @@ -58,26 +58,29 @@ 58 58 8 = InvalidOrderId, 59 59 9 = OrderIdAlreadyApproved 60 60 10 = PDFNotAvailable 61 -|4|Receives the list of Customers, and will check for each customer it needs to request a new/changed labdelivery file based on the ChangedTimestamp.| | | |If a customer is not longer in this list, TerraIndex can remove this customercode from the customer database.| 62 -|5|Sends a request to the function: GetProductList() if it has changed.|=>| |**WebserviceUsername (string), ** 63 -**WebservicePassword (string),** 64 -**CustomerUsername (string),** 65 +(% element-id="1787" %)|(% element-id="1786" %)4|(% element-id="1785" %)Receives the list of Customers, and will check for each customer it needs to request a new/changed labdelivery file based on the ChangedTimestamp.|(% element-id="1784" %) |(% element-id="1782" %) |(% element-id="1780" %) |(% element-id="1778" %)If a customer is not longer in this list, TerraIndex can remove this customercode from the customer database.|(% element-id="1777" %) 66 +(% element-id="1775" %)|(% element-id="1774" %)5|(% element-id="1773" %)Sends a request to the function: GetProductList() if it has changed.|=(% element-id="1772" %)>|(% element-id="1771" %) |(% element-id="1769" %)(% element-id="1768" %)**WebserviceUsername (string), **(%%) 67 +(% element-id="1766" %)**WebservicePassword (string),**(%%) 68 +(% element-id="1764" %)**CustomerUsername (string),**(%%) 65 65 LabID (int), 66 66 CustomerCode (string), 67 67 LanguageCode (string, default 'nld' volgens ISO 639-3-codes), 68 68 SIKBVersion (string, default: '13.4.0'), 69 -UseZipStream/UseZip (bool, default: 'false')|((( 73 +UseZipStream/UseZip (bool, default: 'false')|(% element-id="1758" %)(% element-id="1757" %) 74 +((( 75 +(% element-id="1756" %) 70 70 We start with dutch, then extend with multiple languages, TerraIndex is in the lead to request multiple languages. 71 71 TerraIndex uses: 'fra', 'nld', 'eng', 'spa', 'deu', 'ita', 'por', 'dan' 72 72 73 73 80 +(% element-id="1752" %) 74 74 Besides SIKB 13.4.0, TerraIndex also supports 9.0.0/8.0.0 etc. 75 -)))| 76 -|6| | |Reveives a request to create a labdelivery file in a certain version of SIKB. It will generate the file.| | | 77 -|7| |<=|Sends back the SIKB file, as a Base64 encoded string, with or without using a zipstream.|ResultCode (), 82 +)))|(% element-id="1751" %) 83 +(% element-id="1749" %)|(% element-id="1748" %)6|(% element-id="1747" %) |(% element-id="1745" %) |(% element-id="1743" %)Reveives a request to create a labdelivery file in a certain version of SIKB. It will generate the file.|(% element-id="1742" %) |(% element-id="1740" %) |(% element-id="1738" %) 84 +(% element-id="1736" %)|(% element-id="1735" %)7|(% element-id="1734" %) |(% element-id="1732" %)<=|(% element-id="1731" %)Sends back the SIKB file, as a Base64 encoded string, with or without using a zipstream.|(% element-id="1730" %)ResultCode (), 78 78 ErrorMessage (string), 79 79 FileContent_Base64 (string), 80 -UseZipStream/UseZip (bool, default: 'false')| |1 = Success, 87 +UseZipStream/UseZip (bool, default: 'false')|(% element-id="1726" %) |(% element-id="1724" %)1 = Success, 81 81 2 = GeneralError, 82 82 3 = WrongSIKBVersion, 83 83 4 = InvalidCredentials, ... ... @@ -87,330 +87,380 @@ 87 87 8 = InvalidOrderId, 88 88 9 = OrderIdAlreadyApproved 89 89 10 = PDFNotAvailable 90 -|8|Receives the DeliveryFile and saves the file for import into customer database.| | | | | 91 -|9|Go back to step 5, for every Customer code, every language.| | | | | 92 -|10|Process the LabDeliveryFiles| | | | | 97 +(% element-id="1714" %)|(% element-id="1713" %)8|(% element-id="1712" %)Receives the DeliveryFile and saves the file for import into customer database.|(% element-id="1711" %) |(% element-id="1709" %) |(% element-id="1707" %) |(% element-id="1705" %) |(% element-id="1703" %) 98 +(% element-id="1701" %)|(% element-id="1700" %)9|(% element-id="1699" %)Go back to step 5, for every Customer code, every language.|(% element-id="1698" %) |(% element-id="1696" %) |(% element-id="1694" %) |(% element-id="1692" %) |(% element-id="1690" %) 99 +(% element-id="1688" %)|(% element-id="1687" %)10|(% element-id="1686" %)Process the LabDeliveryFiles|(% element-id="1685" %) |(% element-id="1683" %) |(% element-id="1681" %) |(% element-id="1679" %) |(% element-id="1677" %) 93 93 101 +(% element-id="1675" %) 102 +== (% element-id="1674" %)Get Customers (POST)(%%) == 94 94 95 -== Get Customers (POST) == 104 +(% element-id="1673" %) 105 +=== (% element-id="1672" %)Request example(%%) === 96 96 97 -=== Request example === 98 - 99 -|((( 107 +(% element-id="1671" %) 108 +(% element-id="1669" %)|(% element-id="1668" %)(% element-id="1667" %) 109 +((( 110 +{{code language="C#"}} 100 100 public GetCustomersCall.Response GetCustomers(string WebserviceUsername, string WebservicePassword, string CustomerUsername) 112 + { 113 + GetCustomersCall.Response set = new GetCustomersCall.Response(); 101 101 102 - { 115 + try 116 + { 117 + var content = new FormUrlEncodedContent(new[] 118 + { 119 + new KeyValuePair<string, string>("userName", WebserviceUsername), 120 + new KeyValuePair<string, string>("password", WebservicePassword), 121 + new KeyValuePair<string, string>("customerUsername", CustomerUsername), 122 + }); 103 103 104 - GetCustomersCall.Response set = new GetCustomersCall.Response(); 124 + HttpResponseMessage response = _HttpClient.PostAsync(_HttpClient.BaseAddress + "/GetCustomers", content).Result; 125 + response.EnsureSuccessStatusCode(); 126 + string responseMessage = response.Content.ReadAsStringAsync().Result; 105 105 128 + if (string.IsNullOrEmpty(responseMessage)) 129 + { 130 + throw new Exception("Empty response from: [" + _HttpClient.BaseAddress + " / GetCustomers" + "]"); 131 + } 132 + using (var ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(responseMessage))) 133 + { 134 + XmlSerializer serializer = new XmlSerializer(typeof(GetCustomersCall.Response)); 135 + set = (GetCustomersCall.Response)serializer.Deserialize(ms); 136 + } 137 + } 138 + catch (Exception ex) 139 + { 140 + #region handle exception 141 + set.Status = new BusinessEntities.LabRestService.GetCustomersCall.ResponseStatus(); 142 + set.Status.StatusCode = ((int)ResultCodes.GeneralError).ToString(); 143 + set.Status.ErrorMessage = "Exception occurred in GetCustomers (username: " + WebserviceUsername + ", password: " + WebservicePassword + ") with message: " + ex.Message; 144 + ex.Data.Add("WebserviceUsername", WebserviceUsername); 145 + ex.Data.Add("WebservicePassword", WebservicePassword); 146 + ex.Data.Add("CustomerUsername", CustomerUsername); 147 + ExceptionHandler.HandleException(ex); 148 + #endregion 149 + } 150 + return set; 151 + } 152 +{{/code}} 106 106 107 - try 108 - 109 - { 110 - 111 - 112 - var content = new FormUrlEncodedContent(new[] 113 - 114 - { 115 - 116 - new KeyValuePair<string, string>("userName", WebserviceUsername), 117 - 118 - new KeyValuePair<string, string>("password", WebservicePassword), 119 - 120 - new KeyValuePair<string, string>("customerUsername", CustomerUsername), 121 - 122 - }); 123 - 124 - 125 - HttpResponseMessage response = _HttpClient.PostAsync(_HttpClient.BaseAddress + "/GetCustomers", content).Result; 126 - 127 - response.EnsureSuccessStatusCode(); 128 - 129 - string responseMessage = response.Content.ReadAsStringAsync().Result; 130 - 131 - 132 - if (string.IsNullOrEmpty(responseMessage)) 133 - 134 - { 135 - 136 - throw new Exception("Empty response from: [" + _HttpClient.BaseAddress + " / GetCustomers" + "]"); 137 - 138 - } 139 - 140 - using (var ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(responseMessage~)~)~) 141 - 142 - { 143 - 144 - XmlSerializer serializer = new XmlSerializer(typeof(GetCustomersCall.Response)); 145 - 146 - set = (GetCustomersCall.Response)serializer.Deserialize(ms); 147 - 148 - } 149 - 150 - 151 - } 152 - 153 - catch (Exception ex) 154 - 155 - { 156 - 157 - #region handle exception 158 - 159 - 160 - set.Status = new BusinessEntities.LabRestService.GetCustomersCall.ResponseStatus(); 161 - 162 - set.Status.StatusCode = ((int)ResultCodes.GeneralError).ToString(); 163 - 164 - set.Status.ErrorMessage = "Exception occurred in GetCustomers (username: " + WebserviceUsername + ", password: " + WebservicePassword + ") with message: " + ex.Message; 165 - 166 - 167 - ex.Data.Add("WebserviceUsername", WebserviceUsername); 168 - 169 - ex.Data.Add("WebservicePassword", WebservicePassword); 170 - 171 - ex.Data.Add("CustomerUsername", CustomerUsername); 172 - 173 - 174 - ExceptionHandler.HandleException(ex); 175 - 176 - #endregion 177 - 178 - } 179 - 180 - 181 - return set; 182 - 183 - } 154 +(% element-id="1566" %) 155 + 184 184 ))) 185 185 186 -|((( 158 +(% element-id="1564" %) 159 +(% element-id="1562" %)|(% element-id="1561" %)(% element-id="1560" %) 160 +((( 161 +(% element-id="1559" %) 187 187 POST https:~/~/<URL>/GetCustomers HTTP/1.1 188 188 164 +(% element-id="1558" %) 189 189 Content-Type: application/x-www-form-urlencoded 190 190 167 +(% element-id="1557" %) 191 191 Host: 81.175.89.24 192 192 170 +(% element-id="1556" %) 193 193 Content-Length: 115 194 194 173 +(% element-id="1555" %) 195 195 Expect: 100-continue 196 196 197 197 177 +(% element-id="1552" %) 198 198 userName=<webservice_username>&password=<Webservice_password>&customerUsername=<customer_username or token> 199 199 ))) 200 200 201 -=== Response example === 181 +(% element-id="1551" %) 182 +=== (% element-id="1550" %)Response example(%%) === 202 202 203 -|((( 184 +(% element-id="1549" %) 185 +(% element-id="1547" %)|(% element-id="1546" %)(% element-id="1545" %) 186 +((( 187 +{{code language="XML"}} 204 204 <?xml version="1.0" encoding="UTF-8" standalone="no"?> 205 - 206 206 <Response><Customers> 207 - 208 - <Customer LabId="1" LabName="Example Laboratorium" CustomerId="300" CustomerName="Adviesbureau De bodemkoning - Rotterdam" LastModifiedOnClient="2019-05-08T11:05:14.17+02:00" /> 209 - 210 - <Customer LabId="1" LabName="Example Laboratorium" CustomerId="656" CustomerName="Adviesbureau De bodemkoning - Delft" LastModifiedOnClient="2019-04-19T13:20:10.123+02:00" /> 211 - 190 + <Customer LabId="1" LabName="Example Laboratorium" CustomerId="300" CustomerName="Adviesbureau De bodemkoning - Rotterdam" LastModifiedOnClient="2019-05-08T11:05:14.17+02:00" ></Customer> 191 + <Customer LabId="1" LabName="Example Laboratorium" CustomerId="656" CustomerName="Adviesbureau De bodemkoning - Delft" LastModifiedOnClient="2019-04-19T13:20:10.123+02:00" ></Customer> 212 212 </Customers> 213 - 214 214 <Status> 215 - 216 - <StatusCode>1</StatusCode> 217 - 218 - <StatusCodeDescription>OK</StatusCodeDescription> 219 - 220 - <ErrorMessage></ErrorMessage> 221 - 194 + <StatusCode>1</StatusCode> 195 + <StatusCodeDescription>OK</StatusCodeDescription> 196 + <ErrorMessage></ErrorMessage> 222 222 </Status> 223 - 224 224 </Response> 199 +{{/code}} 200 + 201 +(% element-id="1492" %) 202 + 225 225 ))) 226 226 205 +(% element-id="1490" %) 206 +== (% element-id="1489" %)Get Products (POST)(%%) == 227 227 228 -== Get Products (POST) == 208 +(% element-id="1488" %) 209 +=== (% element-id="1487" %)Request example(%%) === 229 229 230 -=== Request example === 231 - 232 -|((( 211 +(% element-id="1486" %) 212 +(% element-id="1484" %)|(% element-id="1483" %)(% element-id="1482" %) 213 +((( 214 +(% element-id="1481" %) 233 233 public GetProductsCall.Response GetProductList(string WebserviceUsername, string WebservicePassword, string CustomerUsername, string customerid, int labid, string sikbVersion, string languageCode) 234 234 217 +(% element-id="1480" %) 235 235 { 236 236 237 237 221 +(% element-id="1477" %) 238 238 GetProductsCall.Response set = new GetProductsCall.Response(); 239 239 240 240 225 +(% element-id="1474" %) 241 241 try 242 242 228 +(% element-id="1473" %) 243 243 { 244 244 231 +(% element-id="1472" %) 245 245 bool useZipstream = true; 246 246 234 +(% element-id="1471" %) 247 247 var content = new FormUrlEncodedContent(new[] 248 248 237 +(% element-id="1470" %) 249 249 { 250 250 240 +(% element-id="1469" %) 251 251 new KeyValuePair<string, string>("userName", WebserviceUsername), 252 252 243 +(% element-id="1468" %) 253 253 new KeyValuePair<string, string>("password", WebservicePassword), 254 254 246 +(% element-id="1467" %) 255 255 new KeyValuePair<string, string>("customerUsername", CustomerUsername), 256 256 249 +(% element-id="1466" %) 257 257 new KeyValuePair<string, string>("languageCode", languageCode), 258 258 252 +(% element-id="1465" %) 259 259 new KeyValuePair<string, string>("clientId", customerid), 260 260 255 +(% element-id="1464" %) 261 261 new KeyValuePair<string, string>("sikbVersion", sikbVersion), 262 262 258 +(% element-id="1463" %) 263 263 new KeyValuePair<string, string>("useZip", useZipstream.ToString() ), 264 264 261 +(% element-id="1462" %) 265 265 }); 266 266 267 267 265 +(% element-id="1459" %) 268 268 HttpResponseMessage response = _HttpClient.PostAsync(_HttpClient.BaseAddress + "/GetProducts", content).Result; 269 269 268 +(% element-id="1458" %) 270 270 response.EnsureSuccessStatusCode(); 271 271 271 +(% element-id="1457" %) 272 272 string responseMessage = response.Content.ReadAsStringAsync().Result; 273 273 274 274 275 +(% element-id="1454" %) 275 275 if (string.IsNullOrEmpty(responseMessage)) 276 276 278 +(% element-id="1453" %) 277 277 { 278 278 281 +(% element-id="1452" %) 279 279 throw new Exception("Empty response from: [" + _HttpClient.BaseAddress + " /GetProducts" + "]"); 280 280 284 +(% element-id="1451" %) 281 281 } 282 282 287 +(% element-id="1450" %) 283 283 using (var ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(responseMessage~)~)~) 284 284 290 +(% element-id="1449" %) 285 285 { 286 286 293 +(% element-id="1448" %) 287 287 XmlSerializer serializer = new XmlSerializer(typeof(GetProductsCall.Response)); 288 288 296 +(% element-id="1447" %) 289 289 set = (GetProductsCall.Response)serializer.Deserialize(ms); 290 290 299 +(% element-id="1446" %) 291 291 } 292 292 293 293 303 +(% element-id="1443" %) 294 294 if (useZipstream && !string.IsNullOrEmpty(set.FileContent)) 295 295 306 +(% element-id="1442" %) 296 296 { 297 297 309 +(% element-id="1441" %) 298 298 ~/~/convert from base64 string back to normal 299 299 312 +(% element-id="1440" %) 300 300 ~/~/first check for real Base64, by checking there is no 'xml' in it 301 301 315 +(% element-id="1439" %) 302 302 if (!set.FileContent.Contains("<labaanlevering")) 303 303 318 +(% element-id="1438" %) 304 304 { 305 305 321 +(% element-id="1437" %) 306 306 set.FileContent = ZipStreamHelper.DecompressBase64StringToString(set.FileContent); 307 307 324 +(% element-id="1436" %) 308 308 } 309 309 327 +(% element-id="1435" %) 310 310 } 311 311 312 312 331 +(% element-id="1432" %) 313 313 } 314 314 334 +(% element-id="1431" %) 315 315 catch (Exception ex) 316 316 337 +(% element-id="1430" %) 317 317 { 318 318 340 +(% element-id="1429" %) 319 319 #region handle exception 320 320 321 321 344 +(% element-id="1426" %) 322 322 set.Status = new BusinessEntities.LabRestService.GetProductsCall.ResponseStatus(); 323 323 347 +(% element-id="1425" %) 324 324 set.Status.StatusCode = ((int)ResultCodes.GeneralError).ToString(); 325 325 350 +(% element-id="1424" %) 326 326 set.Status.ErrorMessage = "Exception occurred in GetProducts (username: " + WebserviceUsername + ", password: " + WebservicePassword + ") with message: " + ex.Message; 327 327 328 328 354 +(% element-id="1421" %) 329 329 ex.Data.Add("WebserviceUsername", WebserviceUsername); 330 330 357 +(% element-id="1420" %) 331 331 ex.Data.Add("WebservicePassword", WebservicePassword); 332 332 360 +(% element-id="1419" %) 333 333 ex.Data.Add("CustomerUsername", CustomerUsername); 334 334 363 +(% element-id="1418" %) 335 335 ex.Data.Add("sikbVersion", sikbVersion); 336 336 366 +(% element-id="1417" %) 337 337 ex.Data.Add("customerid", customerid); 338 338 369 +(% element-id="1416" %) 339 339 ex.Data.Add("languageCode", languageCode); 340 340 341 341 373 +(% element-id="1413" %) 342 342 ExceptionHandler.HandleException(ex); 343 343 376 +(% element-id="1412" %) 344 344 #endregion 345 345 379 +(% element-id="1411" %) 346 346 } 347 347 348 348 383 +(% element-id="1408" %) 349 349 return set; 350 350 386 +(% element-id="1407" %) 351 351 } 352 352 ))) 353 353 354 -|((( 390 +(% element-id="1406" %) 391 +(% element-id="1404" %)|(% element-id="1403" %)(% element-id="1402" %) 392 +((( 393 +(% element-id="1401" %) 355 355 POST https:~/~/<URL>/GetProducts HTTP/1.1 356 356 396 +(% element-id="1400" %) 357 357 Content-Type: application/x-www-form-urlencoded 358 358 399 +(% element-id="1399" %) 359 359 Host: 81.175.89.24 360 360 402 +(% element-id="1398" %) 361 361 Content-Length: 179 362 362 405 +(% element-id="1397" %) 363 363 Expect: 100-continue 364 364 365 365 409 +(% element-id="1394" %) 366 366 userName=<webservice_username>&password=<Webservice_password>&customerUsername=<customer_username or token>&languageCode=nld&clientId=300&sikbVersion=13.5.0&useZip=True 367 367 ))) 368 368 369 -=== Response example === 413 +(% element-id="1393" %) 414 +=== (% element-id="1392" %)Response example(%%) === 370 370 371 -|((( 416 +(% element-id="1391" %) 417 +(% element-id="1389" %)|(% element-id="1388" %)(% element-id="1387" %) 418 +((( 419 +(% element-id="1386" %) 372 372 <?xml version="1.0" encoding="UTF-8" standalone="no"?> 373 373 422 +(% element-id="1385" %) 374 374 <Response> 375 375 425 +(% element-id="1384" %) 376 376 <FileContent> {SIKB FILE in ZIPSTREAM BASE64 format}</FileContent> 377 377 428 +(% element-id="1383" %) 378 378 <Status> 379 379 431 +(% element-id="1382" %) 380 380 <StatusCode>1</StatusCode> 381 381 434 +(% element-id="1381" %) 382 382 <StatusCodeDescription>OK</StatusCodeDescription> 383 383 437 +(% element-id="1380" %) 384 384 <ErrorMessage></ErrorMessage> 385 385 440 +(% element-id="1379" %) 386 386 </Status></Response> 387 387 ))) 388 388 444 +(% element-id="1378" %) 445 += (% element-id="1377" %)Useraccount Checkup.(%%) = 389 389 447 +(% element-id="1374" %) 448 +== (% element-id="1373" %)Solution/Design(%%) == 390 390 391 -= Gebruikersaccount controleren. = 450 +(% element-id="1372" %) 451 +With every call we will no longer send customer usernames and customer passwords. We want to use a fixed Machine 2 Machine username and password for TerraIndex. So we need to be able to quickly check whether the Customer username we want to use exists, and is bound to our TerraIndex fixed Machine 2 machine account. 392 392 393 - 394 -== Oplossing/Design == 395 - 396 -Bij iedere call gaan we geen username van de klanten meer sturen met een vast webservice username en password voor TerraIndex. Hier willen we ook snel op kunnen controleren of deze wel bestaat. 397 - 453 +(% element-id="1371" %) 398 398 WebserviceUsername (string), 399 399 WebservicePassword (string), 400 400 CustomerUsername (string) 401 401 402 402 403 -Hiervoor maken we een Webserice voor ValidCredentials Check: 459 +(% element-id="1366" %) 460 +Therefor we call a Webserice for ValidCredentials Check: 404 404 405 405 406 -(% class="table-hover" %) 407 -|**Action**|**TerraIndex**| |**Laboratorium**|**Parameters/Message**|**Remarks**|**ResultCodes** 408 -|1|Sends a request to the function: ValidCredentials().|=>| |WebserviceUsername (string), 463 +(% class="table-hover" element-id="1363" %) 464 +(% element-id="1361" %)|(% element-id="1360" %)(% element-id="1359" %)**Action**|(% element-id="1358" %)(% element-id="1357" %)**TerraIndex**|(% element-id="1356" %) |(% element-id="1354" %)(% element-id="1353" %)**Laboratorium**|(% element-id="1352" %)(% element-id="1351" %)**Parameters/Message**|(% element-id="1350" %)(% element-id="1349" %)**Remarks**|(% element-id="1348" %)(% element-id="1347" %)**ResultCodes** 465 +(% element-id="1346" %)|(% element-id="1345" %)1|(% element-id="1344" %)Sends a request to the function: ValidCredentials().|=(% element-id="1343" %)>|(% element-id="1342" %) |(% element-id="1340" %)WebserviceUsername (string), 409 409 WebservicePassword (string), 410 -CustomerUsername (string)|We want to skip the Password of the customer, and we use the WebserviceUsername + WebservicePassword for real authentication.| 411 -|2| | |Receives the request and checks the combination of WebserviceUsername and WebservicePassword is Ok. Then checks the CustomerUsername is valid.| | | 412 -|3| |<=|Sends back a Success of InvalidCredentials|ResultCode (), 413 -ErrorMessage (string),| |1 = Success, 467 +CustomerUsername (string)|(% element-id="1337" %)We want to skip the Password of the customer, and we use the WebserviceUsername + WebservicePassword for real authentication.|(% element-id="1336" %) 468 +(% element-id="1334" %)|(% element-id="1333" %)2|(% element-id="1332" %) |(% element-id="1330" %) |(% element-id="1328" %)Receives the request and checks the combination of WebserviceUsername and WebservicePassword is Ok. Then checks the CustomerUsername is valid.|(% element-id="1327" %) |(% element-id="1325" %) |(% element-id="1323" %) 469 +(% element-id="1321" %)|(% element-id="1320" %)3|(% element-id="1319" %) |(% element-id="1317" %)<=|(% element-id="1316" %)Sends back a Success of InvalidCredentials|(% element-id="1315" %)ResultCode (), 470 +ErrorMessage (string),|(% element-id="1313" %) |(% element-id="1311" %)1 = Success, 414 414 2 = GeneralError, 415 415 3 = WrongSIKBVersion, 416 416 4 = InvalidCredentials, ... ... @@ -421,149 +421,215 @@ 421 421 9 = OrderIdAlreadyApproved 422 422 10 = PDFNotAvailable 423 423 424 -== Check ValidCredentials (POST) == 481 +(% element-id="1301" %) 482 +== (% element-id="1300" %)Check ValidCredentials (POST)(%%) == 425 425 426 -=== Request example === 484 +(% element-id="1299" %) 485 +=== (% element-id="1298" %)Request example(%%) === 427 427 428 -|((( 487 +(% element-id="1297" %) 488 +(% element-id="1295" %)|(% element-id="1294" %)(% element-id="1293" %) 489 +((( 490 +(% element-id="1292" %) 429 429 public ValidCredentialsCall.Response ValidCredentials(string WebserviceUsername, string WebservicePassword, string CustomerUsername, string customerid) 430 430 493 +(% element-id="1291" %) 431 431 { 432 432 496 +(% element-id="1290" %) 433 433 ValidCredentialsCall.Response set = new ValidCredentialsCall.Response(); 434 434 435 435 500 +(% element-id="1287" %) 436 436 try 437 437 503 +(% element-id="1286" %) 438 438 { 439 439 440 440 507 +(% element-id="1283" %) 441 441 var content = new FormUrlEncodedContent(new[] 442 442 510 +(% element-id="1282" %) 443 443 { 444 444 513 +(% element-id="1281" %) 445 445 new KeyValuePair<string, string>("userName", WebserviceUsername), 446 446 516 +(% element-id="1280" %) 447 447 new KeyValuePair<string, string>("password", WebservicePassword), 448 448 519 +(% element-id="1279" %) 449 449 ~/~/new KeyValuePair<string, string>("clientId", customerid), ~/~/ Optional 450 450 522 +(% element-id="1278" %) 451 451 new KeyValuePair<string, string>("customerUsername", CustomerUsername), 452 452 525 +(% element-id="1277" %) 453 453 }); 454 454 455 455 529 +(% element-id="1274" %) 456 456 HttpResponseMessage response = _HttpClient.PostAsync(_HttpClient.BaseAddress + "/ValidCredentials", content).Result; 457 457 532 +(% element-id="1273" %) 458 458 response.EnsureSuccessStatusCode(); 459 459 535 +(% element-id="1272" %) 460 460 string responseMessage = response.Content.ReadAsStringAsync().Result; 461 461 462 462 539 +(% element-id="1269" %) 463 463 if (string.IsNullOrEmpty(responseMessage)) 464 464 542 +(% element-id="1268" %) 465 465 { 466 466 545 +(% element-id="1267" %) 467 467 throw new Exception("Empty response from: [" + _HttpClient.BaseAddress + " / ValidCredentials" + "]"); 468 468 548 +(% element-id="1266" %) 469 469 } 470 470 551 +(% element-id="1265" %) 471 471 using (var ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(responseMessage~)~)~) 472 472 554 +(% element-id="1264" %) 473 473 { 474 474 557 +(% element-id="1263" %) 475 475 XmlSerializer serializer = new XmlSerializer(typeof(ValidCredentialsCall.Response)); 476 476 560 +(% element-id="1262" %) 477 477 set = (ValidCredentialsCall.Response)serializer.Deserialize(ms); 478 478 479 479 564 +(% element-id="1259" %) 480 480 return set; 481 481 567 +(% element-id="1258" %) 482 482 } 483 483 484 484 571 +(% element-id="1255" %) 485 485 } 486 486 574 +(% element-id="1254" %) 487 487 catch (Exception ex) 488 488 577 +(% element-id="1253" %) 489 489 { 490 490 580 +(% element-id="1252" %) 491 491 #region handle exception 492 492 493 493 584 +(% element-id="1249" %) 494 494 set.Status = new BusinessEntities.LabRestService.ValidCredentialsCall.ResponseStatus(); 495 495 587 +(% element-id="1248" %) 496 496 set.Status.StatusCode = ((int)ResultCodes.GeneralError).ToString(); 497 497 590 +(% element-id="1247" %) 498 498 set.Status.ErrorMessage = "Exception occurred in GetValidCredentials (username: " + WebserviceUsername + ", with message: " + ex.Message; 499 499 500 500 594 +(% element-id="1244" %) 501 501 ex.Data.Add("WebserviceUsername", WebserviceUsername); 502 502 597 +(% element-id="1243" %) 503 503 ex.Data.Add("WebservicePassword", WebservicePassword); 504 504 600 +(% element-id="1242" %) 505 505 ex.Data.Add("CustomerUsername", CustomerUsername); 506 506 507 507 604 +(% element-id="1239" %) 508 508 ExceptionHandler.HandleException(ex); 509 509 607 +(% element-id="1238" %) 510 510 #endregion 511 511 610 +(% element-id="1237" %) 512 512 } 513 513 514 514 614 +(% element-id="1234" %) 515 515 return set; 516 516 617 +(% element-id="1233" %) 517 517 } 518 518 ))) 519 519 520 -|((( 621 +(% element-id="1232" %) 622 +(% element-id="1230" %)|(% element-id="1229" %)(% element-id="1228" %) 623 +((( 624 +(% element-id="1227" %) 521 521 POST https:~/~/<URL>/ValidCredentials HTTP/1.1 522 522 627 +(% element-id="1226" %) 523 523 Content-Type: application/x-www-form-urlencoded 524 524 630 +(% element-id="1225" %) 525 525 Host: 81.175.89.24 526 526 633 +(% element-id="1224" %) 527 527 Content-Length: 125 528 528 636 +(% element-id="1223" %) 529 529 Expect: 100-continue 530 530 531 531 640 +(% element-id="1220" %) 532 532 userName=<webservice_username>&password=<Webservice_password>&clientId=<optional otherwise empty>&customerUsername=<customer_username or token> 533 533 ))) 534 534 535 -=== Response example === 644 +(% element-id="1219" %) 645 +=== (% element-id="1218" %)Response example(%%) === 536 536 537 -|((( 647 +(% element-id="1217" %) 648 +(% element-id="1215" %)|(% element-id="1214" %)(% element-id="1213" %) 649 +((( 650 +(% element-id="1212" %) 538 538 <?xml version="1.0" encoding="UTF-8" standalone="no"?><Response> 539 539 653 +(% element-id="1211" %) 540 540 <Status> 541 541 656 +(% element-id="1210" %) 542 542 <StatusCode>1</StatusCode> 543 543 659 +(% element-id="1209" %) 544 544 <StatusCodeDescription>OK</StatusCodeDescription> 545 545 662 +(% element-id="1208" %) 546 546 <ErrorMessage></ErrorMessage> 547 547 665 +(% element-id="1207" %) 548 548 </Status> 549 549 668 +(% element-id="1206" %) 550 550 </Response> 551 551 ))) 552 552 553 -= Opdrachten versturen (POST) = 672 +(% element-id="1205" %) 673 += (% element-id="1204" %)Labassignment request delivery(POST)(%%) = 554 554 555 -== Oplossing/Design == 675 +(% element-id="1203" %) 676 +== (% element-id="1202" %)Solution/Design(%%) == 556 556 557 -Hiervoor maken we een Webserice voor CreateOrder om de opdracht aan te maken. 558 -Na de create willen we in de toekomst een overzicht van het laboratorium in bijv. PDF tonen, waarbij de gebruiker de prijzen ziet en kan bevestigen of annuleren. 559 -Afhankelijk van de keuze van de gebruiker bij het laboratorium, roept TerraIndex de ApproveOrder of de CancelOrder aan. 678 +(% element-id="1201" %) 679 +For this we create a Webserice for CreateOrder to create the order in the lab system. 680 +After the creation, we would like to show an order overview of the laboratory in the future in PDF. The user can see the prices and can confirm or cancel. 681 +Depending on the user's choice at the laboratory, to support this or not, TerraIndex calls the ApproveOrder or the CancelOrder. 560 560 561 -Voor nu gaan we er vanuit dat wij dit niet kunnen, en stuurt TerraIndex needsApprovalIsSupported = false mee. Mocht dit True worden in de toekomst, dan kan het Lab bij het result aangeven of het wel of niet nodig is, in het NeedsApprove veld. 683 +(% element-id="0" %) 684 +For default we assume that we cannot do this yet, and TerraIndex sends needsApprovalIsSupported = false. If this becomes true in the future, the Lab can indicate whether or not it is necessary in the NeedsApprove field. 562 562 563 563 564 -(% class="table-hover" %) 565 -|**Action**|**TerraIndex**| |**Laboratorium**|**Parameters/Message**|**Remarks**|**ResultCodes** 566 -|1|Sends a request to the function: CreateOrder().|=>| |WebserviceUsername (string), 687 +(% class="table-hover" element-id="1195" %) 688 +(% element-id="1193" %)|(% element-id="1192" %)(% element-id="1191" %)**Action**|(% element-id="1190" %)(% element-id="1189" %)**TerraIndex**|(% element-id="1188" %) |(% element-id="1186" %)(% element-id="1185" %)**Laboratorium**|(% element-id="1184" %)(% element-id="1183" %)**Parameters/Message**|(% element-id="1182" %)(% element-id="1181" %)**Remarks**|(% element-id="1180" %)(% element-id="1179" %)**ResultCodes** 689 +(% element-id="1178" %)|(% element-id="1177" %)1|(% element-id="1176" %)Sends a request to the function: CreateOrder().|=(% element-id="1175" %)>|(% element-id="1174" %) |(% element-id="1172" %)WebserviceUsername (string), 567 567 WebservicePassword (string), 568 568 CustomerUsername (string), 569 569 FileContent_Base64 (string), ... ... @@ -570,22 +570,22 @@ 570 570 UseZipStream/UseZip (bool, default: 'false'), 571 571 CustomerCode (string), 572 572 SIKBVersion (string, default: '13.4.0'), 573 -needsApprovalIsSupported (bool)|SIKB Version included, so labs can quickly check the version. 696 +needsApprovalIsSupported (bool)|(% element-id="1164" %)SIKB Version included, so labs can quickly check the version. 574 574 Besides SIKB 13.4.0, TerraIndex also supports 9.0.0. 575 575 \\Before sending the SIKB, validate to the XSD! 576 576 And to the XSLT? 577 577 \\needsApprovalIsSupported = false; means we dont get PDF with offerte. This will make is faster. 578 -needsApprovalIsSupported = true; means lab will check the user setting to send a PDF Offerte back or not. (If the lab can support this.)| 579 -|2| | |Receives the request and checks the credentials.| | | 580 -|(% colspan="1" %)3|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)Credentials are valid, the Filecontent is checked on a valid Labassignment. When valid it will be processed and a OrderId is given.|(% colspan="1" %) |(% colspan="1" %)Laboratorium saves the Sample GUIDs if it's SIKB 13 or higher. 581 -Otherwise we use the idanlmons unique ID.|(% colspan="1" %) 582 -|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)Based on what customer, the order will be approved or the approve needs to be done in laboratorium system.|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) 583 -|4| |<=|Sends back a Success with the new OrderId|ResultCode (), 701 +needsApprovalIsSupported = true; means lab will check the user setting to send a PDF Offerte back or not. (If the lab can support this.)|(% element-id="1156" %) 702 +(% element-id="1154" %)|(% element-id="1153" %)2|(% element-id="1152" %) |(% element-id="1150" %) |(% element-id="1148" %)Receives the request and checks the credentials.|(% element-id="1147" %) |(% element-id="1145" %) |(% element-id="1143" %) 703 +(% element-id="1141" %)|(% colspan="1" element-id="1140" %)3|(% colspan="1" element-id="1139" %) |(% colspan="1" element-id="1137" %) |(% colspan="1" element-id="1135" %)Credentials are valid, the Filecontent is checked on a valid Labassignment. When valid it will be processed and a OrderId is given.|(% colspan="1" element-id="1134" %) |(% colspan="1" element-id="1132" %)Laboratorium saves the Sample GUIDs if it's SIKB 13 or higher. 704 +Otherwise we use the idanlmons unique ID.|(% colspan="1" element-id="1130" %) 705 +(% element-id="1128" %)|(% colspan="1" element-id="1127" %) |(% colspan="1" element-id="1125" %) |(% colspan="1" element-id="1123" %) |(% colspan="1" element-id="1121" %)Based on what customer, the order will be approved or the approve needs to be done in laboratorium system.|(% colspan="1" element-id="1120" %) |(% colspan="1" element-id="1118" %) |(% colspan="1" element-id="1116" %) 706 +(% element-id="1114" %)|(% element-id="1113" %)4|(% element-id="1112" %) |(% element-id="1110" %)<=|(% element-id="1109" %)Sends back a Success with the new OrderId|(% element-id="1108" %)ResultCode (), 584 584 ErrorMessage (string), 585 585 OrderId (string), 586 586 NeedsApprove (bool), 587 587 FileContent_Base64 (string), 588 -UseZipStream/UseZip (bool, default: 'false'),|In the future labs will send back the PDF with the prices and some checks. To approve or cancel. For the first version this is not required yet and the fileContent remains empty.|1 = Success, 711 +UseZipStream/UseZip (bool, default: 'false'),|(% element-id="1102" %)In the future labs will send back the PDF with the prices and some checks. To approve or cancel. For the first version this is not required yet and the fileContent remains empty.|(% element-id="1101" %)1 = Success, 589 589 2 = GeneralError, 590 590 3 = WrongSIKBVersion, 591 591 4 = InvalidCredentials, ... ... @@ -595,8 +595,10 @@ 595 595 8 = InvalidOrderId, 596 596 9 = OrderIdAlreadyApproved 597 597 10 = PDFNotAvailable 598 -|(% colspan="1" %)6|(% colspan="1" %)Receives the OrderId, and saves it. 599 - |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)((( 721 +(% element-id="1091" %)|(% colspan="1" element-id="1090" %)6|(% colspan="1" element-id="1089" %)Receives the OrderId, and saves it. 722 + |(% colspan="1" element-id="1086" %) |(% colspan="1" element-id="1084" %) |(% colspan="1" element-id="1082" %) |(% colspan="1" element-id="1080" %)(% element-id="1079" %) 723 +((( 724 +(% element-id="1078" %) 600 600 Default for now laboratorium will send: 601 601 NeedsApprove = False, 602 602 PDF = Empty, ... ... @@ -603,23 +603,25 @@ 603 603 Zipstream = False, 604 604 605 605 731 +(% element-id="1072" %) 606 606 In the future, do something with the PDF and show the PDF to users to Approve or Cancel. 607 607 This will be done by; NeedsApprove = true. 608 608 \\If NeedsApprove is False, the order is Processed and can't be changed in TI. Like it is now. 609 609 736 +(% element-id="1068" %) 610 610 611 -)))|(% colspan="1" %) 612 -|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) 613 -|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) 614 -|(% colspan="1" %) |(% colspan="1" %)**IN THE FUTURE: APPROVEORDER**|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) 615 -|(% colspan="1" %)7|(% colspan="1" %)Sends a request to the function: ApproveOrder().|(% colspan="1" %)=>|(% colspan="1" %) |(% colspan="1" %)WebserviceUsername (string), 738 +)))|(% colspan="1" element-id="1066" %) 739 +(% element-id="1064" %)|(% colspan="1" element-id="1063" %) |(% colspan="1" element-id="1061" %) |(% colspan="1" element-id="1059" %) |(% colspan="1" element-id="1057" %) |(% colspan="1" element-id="1055" %) |(% colspan="1" element-id="1053" %) |(% colspan="1" element-id="1051" %) 740 +(% element-id="1049" %)|(% colspan="1" element-id="1048" %) |(% colspan="1" element-id="1046" %) |(% colspan="1" element-id="1044" %) |(% colspan="1" element-id="1042" %) |(% colspan="1" element-id="1040" %) |(% colspan="1" element-id="1038" %) |(% colspan="1" element-id="1036" %) 741 +(% element-id="1034" %)|(% colspan="1" element-id="1033" %) |(% colspan="1" element-id="1031" %)(% element-id="1030" %)**IN THE FUTURE: APPROVEORDER**|(% colspan="1" element-id="1029" %) |(% colspan="1" element-id="1027" %) |(% colspan="1" element-id="1025" %) |(% colspan="1" element-id="1023" %) |(% colspan="1" element-id="1021" %) 742 +(% element-id="1019" %)|(% colspan="1" element-id="1018" %)7|(% colspan="1" element-id="1017" %)Sends a request to the function: ApproveOrder().|(% colspan="1" element-id="1016" %)=>|(% colspan="1" element-id="1015" %) |(% colspan="1" element-id="1013" %)WebserviceUsername (string), 616 616 WebservicePassword (string), 617 617 CustomerUsername (string), 618 -OrderId (string)|(% colspan="1" %) |(% colspan="1" %) 619 -|(% colspan="1" %)8|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)Receives the approve and checks the credentials and the OrderId.|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) 620 -|(% colspan="1" %)9|(% colspan="1" %) |(% colspan="1" %)<=|(% colspan="1" %)Sends back a Success with the new CertificateNr|(% colspan="1" %)ResultCode (), 745 +OrderId (string)|(% colspan="1" element-id="1009" %) |(% colspan="1" element-id="1007" %) 746 +(% element-id="1005" %)|(% colspan="1" element-id="1004" %)8|(% colspan="1" element-id="1003" %) |(% colspan="1" element-id="1001" %) |(% colspan="1" element-id="999" %)Receives the approve and checks the credentials and the OrderId.|(% colspan="1" element-id="998" %) |(% colspan="1" element-id="996" %) |(% colspan="1" element-id="994" %) 747 +(% element-id="992" %)|(% colspan="1" element-id="991" %)9|(% colspan="1" element-id="990" %) |(% colspan="1" element-id="988" %)<=|(% colspan="1" element-id="987" %)Sends back a Success with the new CertificateNr|(% colspan="1" element-id="986" %)ResultCode (), 621 621 ErrorMessage (string), 622 -CertificateNr (string)|(% colspan="1" %)This process takes too long at some labs. Maybe this won't be workable...so maybe the CertificateNr return won't be possible. In this case, leave the CertificateNr empty. TerraIndex will read it from GetOrderStatus calls.|(% colspan="1" %)1 = Success, 749 +CertificateNr (string)|(% colspan="1" element-id="983" %)This process takes too long at some labs. Maybe this won't be workable...so maybe the CertificateNr return won't be possible. In this case, leave the CertificateNr empty. TerraIndex will read it from GetOrderStatus calls.|(% colspan="1" element-id="982" %)1 = Success, 623 623 2 = GeneralError, 624 624 3 = WrongSIKBVersion, 625 625 4 = InvalidCredentials, ... ... @@ -629,16 +629,16 @@ 629 629 8 = InvalidOrderId, 630 630 9 = OrderIdAlreadyApproved 631 631 10 = PDFNotAvailable 632 -|(% colspan="1" %)10|(% colspan="1" %)Receives the CerificateNr and saves it.|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) 633 -|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) 634 -|(% colspan="1" %) |(% colspan="1" %)**IN THE FUTURE: CANCELORDER**|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) 635 -|7|Sends a request to the function: CancelOrder().|=>| |WebserviceUsername (string), 759 +(% element-id="972" %)|(% colspan="1" element-id="971" %)10|(% colspan="1" element-id="970" %)Receives the CerificateNr and saves it.|(% colspan="1" element-id="969" %) |(% colspan="1" element-id="967" %) |(% colspan="1" element-id="965" %) |(% colspan="1" element-id="963" %) |(% colspan="1" element-id="961" %) 760 +(% element-id="959" %)|(% colspan="1" element-id="958" %) |(% colspan="1" element-id="956" %) |(% colspan="1" element-id="954" %) |(% colspan="1" element-id="952" %) |(% colspan="1" element-id="950" %) |(% colspan="1" element-id="948" %) |(% colspan="1" element-id="946" %) 761 +(% element-id="944" %)|(% colspan="1" element-id="943" %) |(% colspan="1" element-id="941" %)(% element-id="940" %)**IN THE FUTURE: CANCELORDER**|(% colspan="1" element-id="939" %) |(% colspan="1" element-id="937" %) |(% colspan="1" element-id="935" %) |(% colspan="1" element-id="933" %) |(% colspan="1" element-id="931" %) 762 +(% element-id="929" %)|(% element-id="928" %)7|(% element-id="927" %)Sends a request to the function: CancelOrder().|=(% element-id="926" %)>|(% element-id="925" %) |(% element-id="923" %)WebserviceUsername (string), 636 636 WebservicePassword (string), 637 637 CustomerUsername (string), 638 -OrderId (string)| | 639 -|8| | |Receives the cancel and checks the credentials and the OrderId.| | | 640 -|9| |<=|Sends back a Success |ResultCode (), 641 -ErrorMessage (string)| |1 = Success, 765 +OrderId (string)|(% element-id="919" %) |(% element-id="917" %) 766 +(% element-id="915" %)|(% element-id="914" %)8|(% element-id="913" %) |(% element-id="911" %) |(% element-id="909" %)Receives the cancel and checks the credentials and the OrderId.|(% element-id="908" %) |(% element-id="906" %) |(% element-id="904" %) 767 +(% element-id="902" %)|(% element-id="901" %)9|(% element-id="900" %) |(% element-id="898" %)<=|(% element-id="897" %)Sends back a Success |(% element-id="896" %)ResultCode (), 768 +ErrorMessage (string)|(% element-id="894" %) |(% element-id="892" %)1 = Success, 642 642 2 = GeneralError, 643 643 3 = WrongSIKBVersion, 644 644 4 = InvalidCredentials, ... ... @@ -648,325 +648,466 @@ 648 648 8 = InvalidOrderId, 649 649 9 = OrderIdAlreadyApproved 650 650 10 = PDFNotAvailable 651 -|10|Removes the OrderId and the IsSend to False| | | |If OrderIsAleadyApproved, set the values to Approved and keep the OrderId and IsSend.| 652 -|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) 778 +(% element-id="882" %)|(% element-id="881" %)10|(% element-id="880" %)Removes the OrderId and the IsSend to False|(% element-id="879" %) |(% element-id="877" %) |(% element-id="875" %) |(% element-id="873" %)If OrderIsAleadyApproved, set the values to Approved and keep the OrderId and IsSend.|(% element-id="872" %) 779 +(% element-id="870" %)|(% colspan="1" element-id="869" %) |(% colspan="1" element-id="867" %) |(% colspan="1" element-id="865" %) |(% colspan="1" element-id="863" %) |(% colspan="1" element-id="861" %) |(% colspan="1" element-id="859" %) |(% colspan="1" element-id="857" %) 653 653 654 -== Create Order == 781 +(% element-id="855" %) 782 +== (% element-id="854" %)Create Order(%%) == 655 655 656 -=== Request example === 784 +(% element-id="853" %) 785 +=== (% element-id="852" %)Request example(%%) === 657 657 658 -|((( 787 +(% element-id="851" %) 788 +(% element-id="849" %)|(% element-id="848" %)(% element-id="847" %) 789 +((( 790 +(% element-id="846" %) 659 659 public CreateOrderResponse.Response SendLabAssignment(string WebserviceUsername, string WebservicePassword, string CustomerUsername, string customerid, string sikbVersion, string assignmentXML, string languageCode, bool needsApprovalIsSupported = false) 660 660 793 +(% element-id="845" %) 661 661 { 662 662 796 +(% element-id="844" %) 663 663 CreateOrderResponse.Response set = new CreateOrderResponse.Response(); 664 664 665 665 800 +(% element-id="841" %) 666 666 try 667 667 803 +(% element-id="840" %) 668 668 { 669 669 806 +(% element-id="839" %) 670 670 bool useZipstream = true; 671 671 672 672 810 +(% element-id="836" %) 673 673 MultipartFormDataContent content = new MultipartFormDataContent(); 674 674 675 675 814 +(% element-id="833" %) 676 676 ~/~/Add Formdata 677 677 817 +(% element-id="832" %) 678 678 var formDataDictionary = new[] 679 679 820 +(% element-id="831" %) 680 680 { 681 681 823 +(% element-id="830" %) 682 682 new KeyValuePair<string, string>("userName", WebserviceUsername), 683 683 826 +(% element-id="829" %) 684 684 new KeyValuePair<string, string>("password", WebservicePassword), 685 685 829 +(% element-id="828" %) 686 686 new KeyValuePair<string, string>("customerUserName", CustomerUsername), 687 687 832 +(% element-id="827" %) 688 688 new KeyValuePair<string, string>("clientId", customerid), 689 689 835 +(% element-id="826" %) 690 690 new KeyValuePair<string, string>("sikbVersion", sikbVersion), 691 691 838 +(% element-id="825" %) 692 692 new KeyValuePair<string, string>("languageCode", languageCode), 693 693 841 +(% element-id="824" %) 694 694 new KeyValuePair<string, string>("useZip", useZipstream.ToString() ), 695 695 844 +(% element-id="823" %) 696 696 new KeyValuePair<string, string>("needsApprovalIsSupported", needsApprovalIsSupported.ToString() ), 697 697 847 +(% element-id="822" %) 698 698 ~/~/new KeyValuePair<string, string>("orderXml", ZipStreamHelper.CompressToBase64String(assignmentXML)), 699 699 850 +(% element-id="821" %) 700 700 ~/~/new KeyValuePair<string, string>("orderXml", assignmentXML), 701 701 853 +(% element-id="820" %) 702 702 }; 703 703 856 +(% element-id="819" %) 704 704 foreach (var item in formDataDictionary) 705 705 859 +(% element-id="818" %) 706 706 { 707 707 862 +(% element-id="817" %) 708 708 content.Add(new StringContent(item.Value), $"\"{item.Key}\""); 709 709 865 +(% element-id="816" %) 710 710 } 711 711 712 712 869 +(% element-id="813" %) 713 713 string filexml = string.Empty; 714 714 872 +(% element-id="812" %) 715 715 if (useZipstream) 716 716 875 +(% element-id="811" %) 717 717 { 718 718 878 +(% element-id="810" %) 719 719 filexml = ZipStreamHelper.CompressToBase64String(assignmentXML); 720 720 881 +(% element-id="809" %) 721 721 } 722 722 884 +(% element-id="808" %) 723 723 else 724 724 887 +(% element-id="807" %) 725 725 { 726 726 890 +(% element-id="806" %) 727 727 filexml = assignmentXML; 728 728 893 +(% element-id="805" %) 729 729 } 730 730 731 731 897 +(% element-id="802" %) 732 732 ~/~/Add filecontent 733 733 900 +(% element-id="801" %) 734 734 var fileContent = new ByteArrayContent(ZipStreamHelper.stringToByteArray(filexml)); 735 735 903 +(% element-id="800" %) 736 736 fileContent.Headers.ContentDisposition = 737 737 906 +(% element-id="799" %) 738 738 new System.Net.Http.Headers.ContentDispositionHeaderValue("form-data") ~/~/<- 'form-data' instead of 'attachment' 739 739 909 +(% element-id="798" %) 740 740 { 741 741 912 +(% element-id="797" %) 742 742 Name = "\"orderXml\"", ~/~/ \" is needed so the message contains the quotes, wihtout it will fail 743 743 915 +(% element-id="796" %) 744 744 FileName = "\"VivaTerraIndexAssignment.xml\"" 745 745 918 +(% element-id="795" %) 746 746 }; 747 747 921 +(% element-id="794" %) 748 748 fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("application/xml"); 749 749 924 +(% element-id="793" %) 750 750 content.Add(fileContent); 751 751 752 752 928 +(% element-id="790" %) 753 753 ~/~/Start sending 754 754 755 755 932 +(% element-id="787" %) 756 756 HttpResponseMessage response = _HttpClient.PostAsync(_HttpClient.BaseAddress + "/CreateOrder", content).Result; 757 757 935 +(% element-id="786" %) 758 758 response.EnsureSuccessStatusCode(); 759 759 938 +(% element-id="785" %) 760 760 string responseMessage = response.Content.ReadAsStringAsync().Result; 761 761 762 762 942 +(% element-id="782" %) 763 763 if (string.IsNullOrEmpty(responseMessage)) 764 764 945 +(% element-id="781" %) 765 765 { 766 766 948 +(% element-id="780" %) 767 767 throw new Exception("Empty response from: [" + _HttpClient.BaseAddress + " /CreateOrder" + "]"); 768 768 951 +(% element-id="779" %) 769 769 } 770 770 954 +(% element-id="778" %) 771 771 using (var ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(responseMessage~)~)~) 772 772 957 +(% element-id="777" %) 773 773 { 774 774 960 +(% element-id="776" %) 775 775 XmlSerializer serializer = new XmlSerializer(typeof(CreateOrderResponse.Response)); 776 776 963 +(% element-id="775" %) 777 777 set = (CreateOrderResponse.Response)serializer.Deserialize(ms); 778 778 966 +(% element-id="774" %) 779 779 } 780 780 781 781 970 +(% element-id="771" %) 782 782 ~/~/Can contain a PDf with price information 783 783 973 +(% element-id="770" %) 784 784 if (set.UseZip && !string.IsNullOrEmpty(set.FileContent)) 785 785 976 +(% element-id="769" %) 786 786 { 787 787 979 +(% element-id="768" %) 788 788 ~/~/convert from base64 string back to normal 789 789 982 +(% element-id="767" %) 790 790 set.FileContent = ZipStreamHelper.DecompressBase64StringToString(set.FileContent); 791 791 985 +(% element-id="766" %) 792 792 } 793 793 794 794 989 +(% element-id="763" %) 795 795 } 796 796 992 +(% element-id="762" %) 797 797 catch (Exception ex) 798 798 995 +(% element-id="761" %) 799 799 { 800 800 998 +(% element-id="760" %) 801 801 #region handle exception 802 802 803 803 1002 +(% element-id="757" %) 804 804 set.Status = new BusinessEntities.LabRestService.CreateOrderResponse.ResponseStatus(); 805 805 1005 +(% element-id="756" %) 806 806 set.Status.StatusCode = ((int)ResultCodes.GeneralError).ToString(); 807 807 1008 +(% element-id="755" %) 808 808 set.Status.ErrorMessage = "Exception occurred in CreateOrder (username: " + WebserviceUsername + ") with message: " + ex.Message; 809 809 810 810 1012 +(% element-id="752" %) 811 811 ex.Data.Add("WebserviceUsername", WebserviceUsername); 812 812 1015 +(% element-id="751" %) 813 813 ex.Data.Add("WebservicePassword", WebservicePassword); 814 814 1018 +(% element-id="750" %) 815 815 ex.Data.Add("CustomerUsername", CustomerUsername); 816 816 1021 +(% element-id="749" %) 817 817 ex.Data.Add("sikbVersion", sikbVersion); 818 818 1024 +(% element-id="748" %) 819 819 ex.Data.Add("customerid", customerid); 820 820 821 821 1028 +(% element-id="745" %) 822 822 ExceptionHandler.HandleException(ex); 823 823 1031 +(% element-id="744" %) 824 824 #endregion 825 825 1034 +(% element-id="743" %) 826 826 } 827 827 828 828 1038 +(% element-id="740" %) 829 829 return set; 830 830 1041 +(% element-id="739" %) 831 831 } 832 832 ))) 833 833 834 -|((( 1045 +(% element-id="738" %) 1046 +(% element-id="736" %)|(% element-id="735" %)(% element-id="734" %) 1047 +((( 1048 +(% element-id="733" %) 835 835 POST https:~/~/<URL>/CreateOrder HTTP/1.1 836 836 1051 +(% element-id="732" %) 837 837 Content-Type: multipart/form-data; boundary="28a3e130-70c9-4a1a-b544-a802a1ade6ca" 838 838 1054 +(% element-id="731" %) 839 839 Host: 81.175.89.24 840 840 1057 +(% element-id="730" %) 841 841 Content-Length: 5010 842 842 1060 +(% element-id="729" %) 843 843 Expect: 100-continue 844 844 845 845 1064 +(% element-id="726" %) 846 846 ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca 847 847 1067 +(% element-id="725" %) 848 848 Content-Type: text/plain; charset=utf-8 849 849 1070 +(% element-id="724" %) 850 850 Content-Disposition: form-data; name="userName" 851 851 852 852 1074 +(% element-id="721" %) 853 853 <Webservice_Username> 854 854 1077 +(% element-id="720" %) 855 855 ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca 856 856 1080 +(% element-id="719" %) 857 857 Content-Type: text/plain; charset=utf-8 858 858 1083 +(% element-id="718" %) 859 859 Content-Disposition: form-data; name="password" 860 860 861 861 1087 +(% element-id="715" %) 862 862 <Webservice_Password> 863 863 1090 +(% element-id="714" %) 864 864 ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca 865 865 1093 +(% element-id="713" %) 866 866 Content-Type: text/plain; charset=utf-8 867 867 1096 +(% element-id="712" %) 868 868 Content-Disposition: form-data; name="customerUserName" 869 869 870 870 1100 +(% element-id="709" %) 871 871 <Customer_Username or token> 872 872 1103 +(% element-id="708" %) 873 873 ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca 874 874 1106 +(% element-id="707" %) 875 875 Content-Type: text/plain; charset=utf-8 876 876 1109 +(% element-id="706" %) 877 877 Content-Disposition: form-data; name="clientId" 878 878 879 879 1113 +(% element-id="703" %) 880 880 300 881 881 1116 +(% element-id="702" %) 882 882 ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca 883 883 1119 +(% element-id="701" %) 884 884 Content-Type: text/plain; charset=utf-8 885 885 1122 +(% element-id="700" %) 886 886 Content-Disposition: form-data; name="sikbVersion" 887 887 888 888 1126 +(% element-id="697" %) 889 889 13.4.0 890 890 1129 +(% element-id="696" %) 891 891 ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca 892 892 1132 +(% element-id="695" %) 893 893 Content-Type: text/plain; charset=utf-8 894 894 1135 +(% element-id="694" %) 895 895 Content-Disposition: form-data; name="languageCode" 896 896 897 897 1139 +(% element-id="691" %) 898 898 nld 899 899 1142 +(% element-id="690" %) 900 900 ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca 901 901 1145 +(% element-id="689" %) 902 902 Content-Type: text/plain; charset=utf-8 903 903 1148 +(% element-id="688" %) 904 904 Content-Disposition: form-data; name="useZip" 905 905 906 906 1152 +(% element-id="685" %) 907 907 True 908 908 1155 +(% element-id="684" %) 909 909 ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca 910 910 1158 +(% element-id="683" %) 911 911 Content-Type: text/plain; charset=utf-8 912 912 1161 +(% element-id="682" %) 913 913 Content-Disposition: form-data; name="needsApprovalIsSupported" 914 914 915 915 1165 +(% element-id="679" %) 916 916 False 917 917 1168 +(% element-id="678" %) 918 918 ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca 919 919 1171 +(% element-id="677" %) 920 920 Content-Disposition: form-data; name="orderXml"; filename="VivaTerraIndexAssignment.xml" 921 921 1174 +(% element-id="676" %) 922 922 Content-Type: application/xml 923 923 924 924 1178 +(% element-id="673" %) 925 925 <SIKB File in Zip stream Base64 encoding> 926 926 1181 +(% element-id="672" %) 927 927 ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca~-~- 928 928 ))) 929 929 930 -=== Response example === 1185 +(% element-id="671" %) 1186 +=== (% element-id="670" %)Response example(%%) === 931 931 932 -|((( 1188 +(% element-id="669" %) 1189 +(% element-id="667" %)|(% element-id="666" %)(% element-id="665" %) 1190 +((( 1191 +(% element-id="664" %) 933 933 <?xml version="1.0" encoding="UTF-8" standalone="no"?> 934 934 1194 +(% element-id="663" %) 935 935 <Response> 936 936 1197 +(% element-id="662" %) 937 937 <OrderId>7113828</OrderId> 938 938 1200 +(% element-id="661" %) 939 939 <NeedsApproval>True</NeedsApproval> 940 940 1203 +(% element-id="660" %) 941 941 <FileContent></FileContent> 942 942 1206 +(% element-id="659" %) 943 943 <Status> 944 944 1209 +(% element-id="658" %) 945 945 <StatusCode>1</StatusCode> 946 946 1212 +(% element-id="657" %) 947 947 <StatusCodeDescription>OK</StatusCodeDescription> 948 948 1215 +(% element-id="656" %) 949 949 <ErrorMessage></ErrorMessage> 950 950 1218 +(% element-id="655" %) 951 951 </Status></Response> 952 952 ))) 953 953 1222 +(% element-id="654" %) 1223 += (% element-id="653" %)Get Order status and Results(%%) = 954 954 1225 +(% element-id="652" %) 1226 +== (% element-id="651" %)Soluion/Design(%%) == 955 955 956 -= Get Order status and Results = 1228 +(% element-id="650" %) 1229 +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. 957 957 958 -== Oplossing/Design == 959 - 960 -TerraIndex gaat opvragen per licentie, welke resultaten en klaar staan. Deze worden opgevraagd als de nieuwste wijzigingen nieuwer zijn dan de laatste keer checken. Zo downloaden we nooit onnodig teveel en is het altijd nogmaals op te vragen. 961 - 962 - 963 -(% class="table-hover" %) 964 -|Action|TerraIndex| |Laboratorium|Parameters/Message|Remarks|ResultCodes 965 -|1|Sends a request to the function: GetCustomers().|=>| |WebserviceUsername (string), 1231 +(% class="table-hover" element-id="647" %) 1232 +(% 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 1233 +(% 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), 966 966 WebservicePassword (string), 967 -CustomerUsername (string)|We want to skip the Password of the customer, and we introduce the WebserviceUsername + WebservicePassword.| 968 -|2| | |Receives the request and check the customers this username and searches the dateLastChanged for this Customer.| | | 969 -|3| |<=|Sends back the list of customers with the lastChangedTimestamp|ResultCode (), 1235 +CustomerUsername (string)|(% element-id="627" %)We want to skip the Password of the customer, and we introduce the WebserviceUsername + WebservicePassword.|(% element-id="626" %) 1236 +(% element-id="624" %)|(% element-id="623" %)2|(% element-id="622" %) |(% element-id="620" %) |(% element-id="618" %)Receives the request and check the customers this username and searches the dateLastChanged for this Customer.|(% element-id="617" %) |(% element-id="615" %) |(% element-id="613" %) 1237 +(% element-id="611" %)|(% element-id="610" %)3|(% element-id="609" %) |(% element-id="607" %)<=|(% element-id="606" %)Sends back the list of customers with the lastChangedTimestamp|(% element-id="605" %)ResultCode (), 970 970 ErrorMessage (string), 971 971 List<customer> , Customer: 972 972 CustomerCode (string), ... ... @@ -973,7 +973,7 @@ 973 973 CustomerName (string), 974 974 LabID (int), 975 975 LabName (string), 976 -ChangedTimeStamp (DateTime)|We receive the dateTimestamp instead of sending it, so we always get the full list and we are also able to delete customercodes.|1 = Success, 1244 +ChangedTimeStamp (DateTime)|(% element-id="597" %)We receive the dateTimestamp instead of sending it, so we always get the full list and we are also able to delete customercodes.|(% element-id="596" %)1 = Success, 977 977 2 = GeneralError, 978 978 3 = WrongSIKBVersion, 979 979 4 = InvalidCredentials, ... ... @@ -983,15 +983,15 @@ 983 983 8 = InvalidOrderId, 984 984 9 = OrderIdAlreadyApproved 985 985 10 = PDFNotAvailable 986 -|4|Receives the list of Customers. Read the Timestamp this Customer is last checked for Results/Statuses.| | | | | 987 -|5|Send for each Customer a call to retreive all orders statuses changes since a certain timestamp. 988 -Function: GetOrderStatuses()|=>| |WebserviceUsername (string), 1254 +(% element-id="586" %)|(% element-id="585" %)4|(% element-id="584" %)Receives the list of Customers. Read the Timestamp this Customer is last checked for Results/Statuses.|(% element-id="583" %) |(% element-id="581" %) |(% element-id="579" %) |(% element-id="577" %) |(% element-id="575" %) 1255 +(% element-id="573" %)|(% element-id="572" %)5|(% element-id="571" %)Send for each Customer a call to retreive all orders statuses changes since a certain timestamp. 1256 +Function: GetOrderStatuses()|=(% element-id="569" %)>|(% element-id="568" %) |(% element-id="566" %)WebserviceUsername (string), 989 989 WebservicePassword (string), 990 990 CustomerUsername (string), 991 991 CustomerCode (string), 992 -LastCheckedTimestamp (DateTime)|TerraIndex keeps track of the last check timestamp for each license.| 993 -|6| | |Receives the request and check the orders that are changed since the timestamp for this Customer.| | | 994 -|7| |<=|Sends back the list of orders with the status and lastChangedTimestamp|ResultCode (), 1260 +LastCheckedTimestamp (DateTime)|(% element-id="561" %)TerraIndex keeps track of the last check timestamp for each license.|(% element-id="560" %) 1261 +(% element-id="558" %)|(% element-id="557" %)6|(% element-id="556" %) |(% element-id="554" %) |(% element-id="552" %)Receives the request and check the orders that are changed since the timestamp for this Customer.|(% element-id="551" %) |(% element-id="549" %) |(% element-id="547" %) 1262 +(% element-id="545" %)|(% element-id="544" %)7|(% element-id="543" %) |(% element-id="541" %)<=|(% element-id="540" %)Sends back the list of orders with the status and lastChangedTimestamp|(% element-id="539" %)ResultCode (), 995 995 ErrorMessage (string), 996 996 OrderID (string), 997 997 LabassignmentGUID (GUID), ... ... @@ -998,10 +998,10 @@ 998 998 CertificateNumber (string) 999 999 OrderStatusSIKB (int), 1000 1000 Delayed (boolean), 1001 -ExpectedTimeStamp (DateTime),|OrderStatusSIKB is the SIKB Labassignment status. 1269 +ExpectedTimeStamp (DateTime),|(% element-id="531" %)OrderStatusSIKB is the SIKB Labassignment status. 1002 1002 \\Delayed is a boolean to tell the customer a order will be later ready then expected. The ExpectedTimestamp. 1003 1003 If Delayed for the firsttime, TerraIndex can send a notification to the users and show a different layout. 1004 -\\LabassignmentGUID is filled to support also Labassignments that are not from TerraIndex Ordered.|1 = Success, 1272 +\\LabassignmentGUID is filled to support also Labassignments that are not from TerraIndex Ordered.|(% element-id="525" %)1 = Success, 1005 1005 2 = GeneralError, 1006 1006 3 = WrongSIKBVersion, 1007 1007 4 = InvalidCredentials, ... ... @@ -1011,22 +1011,22 @@ 1011 1011 8 = InvalidOrderId, 1012 1012 9 = OrderIdAlreadyApproved 1013 1013 10 = PDFNotAvailable 1014 -|8|Receives the list of Orders with status. 1015 -Update the CertificateNr if this is not already present in the labassignment. | | | |CertifcateNumber could be new here, if the lab wasn't able to fill it directly at the ApproveOrder.| 1016 -|9|Send for each Order a call to retreive all results. 1017 -Function: GetOrderResults()|=>| |WebserviceUsername (string), 1282 +(% element-id="515" %)|(% element-id="514" %)8|(% element-id="513" %)Receives the list of Orders with status. 1283 +Update the CertificateNr if this is not already present in the labassignment. |(% element-id="511" %) |(% element-id="509" %) |(% element-id="507" %) |(% element-id="505" %)CertifcateNumber could be new here, if the lab wasn't able to fill it directly at the ApproveOrder.|(% element-id="504" %) 1284 +(% element-id="502" %)|(% element-id="501" %)9|(% element-id="500" %)Send for each Order a call to retreive all results. 1285 +Function: GetOrderResults()|=(% element-id="498" %)>|(% element-id="497" %) |(% element-id="495" %)WebserviceUsername (string), 1018 1018 WebservicePassword (string), 1019 1019 CustomerUsername (string), 1020 1020 CustomerCode (string), 1021 1021 OrderID (string), 1022 -SIKBVersion (string, default: '13.4.0')|Besides SIKB 13.4.0, TerraIndex also supports 9.0.0/8.0.0 etc.| 1023 -|10| | |Receives the request and creates a SIKB results file based on the version that is requested.| | | 1024 -|11| |<=|Sends back the results of the orders.|ResultCode (), 1290 +SIKBVersion (string, default: '13.4.0')|(% element-id="489" %)Besides SIKB 13.4.0, TerraIndex also supports 9.0.0/8.0.0 etc.|(% element-id="488" %) 1291 +(% element-id="486" %)|(% element-id="485" %)10|(% element-id="484" %) |(% element-id="482" %) |(% element-id="480" %)Receives the request and creates a SIKB results file based on the version that is requested.|(% element-id="479" %) |(% element-id="477" %) |(% element-id="475" %) 1292 +(% element-id="473" %)|(% element-id="472" %)11|(% element-id="471" %) |(% element-id="469" %)<=|(% element-id="468" %)Sends back the results of the orders.|(% element-id="467" %)ResultCode (), 1025 1025 ErrorMessage (string), 1026 1026 OrderId (string), 1027 1027 LabassignmentGUID (GUID), 1028 1028 FileContent_Base64 (string), 1029 -UseZipStream/UseZip (bool, default: 'false'),| |1 = Success, 1297 +UseZipStream/UseZip (bool, default: 'false'),|(% element-id="461" %) |(% element-id="459" %)1 = Success, 1030 1030 2 = GeneralError, 1031 1031 3 = WrongSIKBVersion, 1032 1032 4 = InvalidCredentials, ... ... @@ -1036,9 +1036,12 @@ 1036 1036 8 = InvalidOrderId, 1037 1037 9 = OrderIdAlreadyApproved 1038 1038 10 = PDFNotAvailable 1039 -|12|Receives the results and imports all results.| | | |((( 1307 +(% element-id="449" %)|(% element-id="448" %)12|(% element-id="447" %)Receives the results and imports all results.|(% element-id="446" %) |(% element-id="444" %) |(% element-id="442" %) |(% element-id="440" %)(% element-id="439" %) 1308 +((( 1309 +(% element-id="438" %) 1040 1040 Import will be done to corresponding samples based on: 1041 1041 1312 +(% element-id="437" %) 1042 1042 * Find Project by ProjectGUID (as provided in the labassignment) 1043 1043 * Find Project by ProjectCode (as provided in the Labassignment) 1044 1044 * Find Project and Labassignment by LabassignmentGUID (as provided in the Labassignment) ... ... @@ -1047,25 +1047,27 @@ 1047 1047 For lower version Labassignments the lab should return the 'old' idanlmons as SampleGUID in the XML. 1048 1048 * Find Samples (only if Project is already found ) by SampleName 1049 1049 1321 +(% element-id="429" %) 1050 1050 What is imported? 1051 1051 1324 +(% element-id="428" %) 1052 1052 * If Sample is found, the results in the XML are always all updated and/or inserted. 1053 1053 * If Project is found, but the sample is not; The Sample and the results are inserted as new Sample. (If watersample; fake filtertube and fake measurementpoints are created) 1054 -)))| 1055 -|13|If OrderStatus is 'Completed/Reported' (SIKBID: 5) 1327 +)))|(% element-id="425" %) 1328 +(% element-id="423" %)|(% element-id="422" %)13|(% element-id="421" %)If OrderStatus is 'Completed/Reported' (SIKBID: 5) 1056 1056 Request the PDF certificate. 1057 -Function: GetOrderPDF()|=>| |WebserviceUsername (string), 1330 +Function: GetOrderPDF()|=(% element-id="418" %)>|(% element-id="417" %) |(% element-id="415" %)WebserviceUsername (string), 1058 1058 WebservicePassword (string), 1059 1059 CustomerUsername (string), 1060 1060 CustomerCode (string), 1061 -OrderID (string),| | 1062 -|14| | |Receives the request and creates the PDF for the Order.| | | 1063 -|15| |<=|Sends back the PDF of the order.|ResultCode (), 1334 +OrderID (string),|(% element-id="410" %) |(% element-id="408" %) 1335 +(% element-id="406" %)|(% element-id="405" %)14|(% element-id="404" %) |(% element-id="402" %) |(% element-id="400" %)Receives the request and creates the PDF for the Order.|(% element-id="399" %) |(% element-id="397" %) |(% element-id="395" %) 1336 +(% element-id="393" %)|(% element-id="392" %)15|(% element-id="391" %) |(% element-id="389" %)<=|(% element-id="388" %)Sends back the PDF of the order.|(% element-id="387" %)ResultCode (), 1064 1064 ErrorMessage (string), 1065 1065 OrderId (string), 1066 1066 LabassignmentGUID (GUID), 1067 1067 FileContent_Base64 (string), 1068 -UseZipStream/UseZip (bool, default: 'false'),|If the PDF is not available yet, please give the resultcode: PDFNotAvailable.|1 = Success, 1341 +UseZipStream/UseZip (bool, default: 'false'),|(% element-id="381" %)If the PDF is not available yet, please give the resultcode: PDFNotAvailable.|(% element-id="380" %)1 = Success, 1069 1069 2 = GeneralError, 1070 1070 3 = WrongSIKBVersion, 1071 1071 4 = InvalidCredentials, ... ... @@ -1075,27 +1075,30 @@ 1075 1075 8 = InvalidOrderId, 1076 1076 9 = OrderIdAlreadyApproved 1077 1077 10 = PDFNotAvailable 1078 -|12|Receives the PDF and stores it for reporting and downloading.| | | | | 1351 +(% 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" %) 1079 1079 1080 -= 1081 -Customer wants to see real time information about the status in the interface = 1353 +(% element-id="357" %) 1354 += (% element-id="356" %)Customer wants to see real time information about the status in the interface(%%) = 1082 1082 1083 -== Oplossing/Design == 1356 +(% element-id="354" %) 1357 +== (% element-id="353" %)Solution/Design(%%) == 1084 1084 1085 -Om in de interface van TerraIndex altijd up to date informatie te tonen als een gebruiker een labopdracht opent om de status te zien, hergebruiken we een deel van de GetOrderStatus, maar dan met specifiek een OrderID. 1359 +(% element-id="352" %) 1360 +To always show up-to-date information in the TerraIndex interface when a user opens a lab assignment to see the status, we reuse part of the GetOrderStatus, but with a specific OrderID. 1086 1086 1362 +(% element-id="351" %) 1087 1087 ..NOT SUPPORTED YET... 1088 1088 1089 -(% class="table-hover" %) 1090 -|(% colspan="1" %)Action|(% colspan="1" %)TerraIndex|(% colspan="1" %) |(% colspan="1" %)Laboratorium|(% colspan="1" %)Parameters/Message|(% colspan="1" %)Remarks|(% colspan="1" %)ResultCodes 1091 -|1|Request the Order status for a single Order/Labassignment. 1092 -Function: GetOrderStatus()|=>| |WebserviceUsername (string), 1365 +(% class="table-hover" element-id="350" %) 1366 +(% element-id="348" %)|(% colspan="1" element-id="347" %)Action|(% colspan="1" element-id="346" %)TerraIndex|(% colspan="1" element-id="345" %) |(% colspan="1" element-id="343" %)Laboratorium|(% colspan="1" element-id="342" %)Parameters/Message|(% colspan="1" element-id="341" %)Remarks|(% colspan="1" element-id="340" %)ResultCodes 1367 +(% element-id="339" %)|(% element-id="338" %)1|(% element-id="337" %)Request the Order status for a single Order/Labassignment. 1368 +Function: GetOrderStatus()|=(% element-id="335" %)>|(% element-id="334" %) |(% element-id="332" %)WebserviceUsername (string), 1093 1093 WebservicePassword (string), 1094 1094 CustomerUsername (string), 1095 1095 CustomerCode (string), 1096 -OrderID (string),| | 1097 -|2| | |Receives the request and gets the status for the Order.| | | 1098 -|3| |<=|Sends back the status of the order.|ResultCode (), 1372 +OrderID (string),|(% element-id="327" %) |(% element-id="325" %) 1373 +(% element-id="323" %)|(% element-id="322" %)2|(% element-id="321" %) |(% element-id="319" %) |(% element-id="317" %)Receives the request and gets the status for the Order.|(% element-id="316" %) |(% element-id="314" %) |(% element-id="312" %) 1374 +(% element-id="310" %)|(% element-id="309" %)3|(% element-id="308" %) |(% element-id="306" %)<=|(% element-id="305" %)Sends back the status of the order.|(% element-id="304" %)ResultCode (), 1099 1099 ErrorMessage (string), 1100 1100 OrderID (string), 1101 1101 LabassignmentGUID (GUID), ... ... @@ -1102,10 +1102,10 @@ 1102 1102 CertificateNumber (string) 1103 1103 OrderStatusSIKB (int), 1104 1104 Delayed (boolean), 1105 -ExpectedTimeStamp (DateTime),|OrderStatusSIKB is the SIKB Labassignment status. 1381 +ExpectedTimeStamp (DateTime),|(% element-id="296" %)OrderStatusSIKB is the SIKB Labassignment status. 1106 1106 \\Delayed is a boolean to tell the customer a order will be later ready then expected. The ExpectedTimestamp. 1107 1107 If Delayed for the firsttime, TerraIndex can send a notification to the users and show a different layout. 1108 -\\LabassignmentGUID is filled to support also Labassignments that are not from TerraIndex Ordered.|1 = Success, 1384 +\\LabassignmentGUID is filled to support also Labassignments that are not from TerraIndex Ordered.|(% element-id="290" %)1 = Success, 1109 1109 2 = GeneralError, 1110 1110 3 = WrongSIKBVersion, 1111 1111 4 = InvalidCredentials, ... ... @@ -1115,12 +1115,8 @@ 1115 1115 8 = InvalidOrderId, 1116 1116 9 = OrderIdAlreadyApproved 1117 1117 10 = PDFNotAvailable 1118 -|4|Receives the status and shows in the interface the updated info. 1119 -Update the CertificateNr if this is not already present in the labassignment. | | | |CertifcateNumber could be new here, if the lab wasn't able to fill it directly at the ApproveOrder.| 1394 +(% element-id="280" %)|(% element-id="279" %)4|(% element-id="278" %)Receives the status and shows in the interface the updated info. 1395 +Update the CertificateNr if this is not already present in the labassignment. |(% element-id="276" %) |(% element-id="274" %) |(% element-id="272" %) |(% element-id="270" %)CertifcateNumber could be new here, if the lab wasn't able to fill it directly at the ApproveOrder.|(% element-id="269" %) 1120 1120 1121 - 1122 - 1123 - 1124 - 1125 - 1397 +(% element-id="265" %) 1126 1126