Wiki source code of Setting up a Webservice connection to get Overview data from TerraIndex
Version 8.1 by Robin Huisman on 2022/09/13 16:58
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | To connect with the TerraIndex database to retreive specific datasets/overviews from TerraIndex, you can connect to a webservice. This webservice provides a function to request the available queries and it’s required Paraterms, and a function to request the actual data. | ||
2 | |||
3 | An example of such an overview is presented in the image below. | ||
4 | |||
5 | [[image:1637574454403-426.png||height="346" width="1486"]] | ||
6 | |||
7 | {{toc/}} | ||
8 | |||
9 | |||
10 | == Changelog == | ||
11 | |||
12 | === Update 2022-08-23 === | ||
13 | |||
14 | As part of on-going efforts to improve performance and scalability, we have introduced a dedicated version of DataWS named DataWSExternals. This new service should be used for external API consumers. | ||
15 | |||
16 | | |**URL**|**Example** | ||
17 | |**Old**|{{code language="none"}}https://web.terraindex.com/DataWS/{{/code}}|((( | ||
18 | [[https:~~/~~/web.terraindex.com/DataWS/ITWViewServiceASMX_V1_0.asmx?wsdl>>https://web.terraindex.com/DataWS/ITWViewServiceASMX_V1_0.asmx?wsdl]] | ||
19 | ))) | ||
20 | |**New**|{{code language="none"}}https://web.terraindex.com/DataWSExternals/{{/code}}|((( | ||
21 | [[https:~~/~~/web.terraindex.com/DataWSExternals/ITWViewServiceASMX_V1_0.asmx>>https://web.terraindex.com/DataWS/ITWViewServiceASMX_V1_0.asmx?wsdl]][[?wsdl>>https://web.terraindex.com/DataWSExternals/ITWViewService_V1_0.svc?wsdl]] | ||
22 | ))) | ||
23 | |||
24 | {{info}} | ||
25 | This url also works; [[https:~~/~~/web.terraindex.com/DataWSExternals/ITWViewServiceASMX_V1_0.asmx?wsdl>>https://web.terraindex.com/DataWSExternals/ITWViewServiceASMX_V1_0.asmx?wsdl]] | ||
26 | |||
27 | {{/info}} | ||
28 | |||
29 | == 1. Retreive all overviews queries from TerraIndex == | ||
30 | |||
31 | To retreive all available queries from the TerraIndex Environment, there is a SOAP webservice call available. This will return all overview queries with it’s names and the required parameters. | ||
32 | With the name and the parameters you can request the actual data with function 2, explained in the next chapter. | ||
33 | |||
34 | To start connecting this webservice, you should use this URL: | ||
35 | |||
36 | [[https:~~/~~/web.terraindex.com/DataWSExternals/ITWViewService_V1_0.svc>>https://web.terraindex.com/DataWSExternals/ITWViewService_V1_0.svc?wsdl]] | ||
37 | |||
38 | (% class="box infomessage" %) | ||
39 | ((( | ||
40 | If you prefer a REST service, please let us know. It’s currently a SOAP webservice because there will be a typed definition available to avoid mistakes. | ||
41 | ))) | ||
42 | |||
43 | Get the WSDL from: | ||
44 | |||
45 | [[https:~~/~~/web.terraindex.com/DataWSExternals/ITWViewService_V1_0.svc?wsdl>>https://web.terraindex.com/DataWSExternals/ITWViewService_V1_0.svc?wsdl]] | ||
46 | |||
47 | [[image:1637574900554-168.png]] | ||
48 | |||
49 | |||
50 | Fill the **Envelope **of a **SOAP **HTTP call with: | ||
51 | |||
52 | {{code language="XML" layout="LINENUMBERS"}} | ||
53 | |||
54 | <soap:Envelope | ||
55 | xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" | ||
56 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
57 | xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
58 | <soap:Body> | ||
59 | <GetOverviewQueries | ||
60 | xmlns="https://wsterraindex.terraindex.com/ITWorks.TerraIndex/"> | ||
61 | <request> | ||
62 | <Authorisation> | ||
63 | <Username>USERNAME</Username> | ||
64 | <Password>PASSWORD</Password> | ||
65 | <Licensenumber>LICENSENUMBER, of the customer</Licensenumber> | ||
66 | <ApplicationCode>YOUR APP CODE, REQUEST at service@terraindex.com</ApplicationCode> | ||
67 | <FeatureWord>0</FeatureWord> | ||
68 | </Authorisation> | ||
69 | <WebserviceVersion>1.0</WebserviceVersion> | ||
70 | <LanguageCode>nld</LanguageCode> | ||
71 | <UseZipStream>false</UseZipStream> | ||
72 | <DataType>JSON</DataType> | ||
73 | <!--JSON or XML --> | ||
74 | </request> | ||
75 | </GetOverviewQueries> | ||
76 | </soap:Body> | ||
77 | </soap:Envelope> | ||
78 | {{/code}} | ||
79 | |||
80 | Set the correct values for: | ||
81 | |||
82 | * (% class="mark" %)Username(%%); as the username in TerraIndex | ||
83 | * (% class="mark" %)Password(%%); as the username in TerraIndex | ||
84 | * (% class="mark" %)Licensenumber(%%); as your companies license number | ||
85 | * (% class="mark" %)ApplicationCode(%%); as provided by TerraIndex to you, if not provided, request one at: [[service@terraindex.com>>path:mailto:service@terraindex.com]] | ||
86 | * (% class="mark" %)UseZipStreamto (%%)'true', to get GZip data stream. This will be much faster over the internet. | ||
87 | Check here for the Class to use it: [[Setting up a Webservice connection for project exports>>Implementation documentation.Setting up a Webservice connection for project exports.WebHome]], Chapter: Zip Stream class. | ||
88 | * (% class="mark" %)DataType(%%); set the correct data type you would like to receive, this is 'JSON' or 'XML'. | ||
89 | |||
90 | You will receive a response like this: | ||
91 | |||
92 | {{code layout="LINENUMBERS"}} | ||
93 | |||
94 | <soap:Envelope | ||
95 | xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" | ||
96 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
97 | xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
98 | <soap:Body> | ||
99 | <GetOverviewQueriesResponse | ||
100 | xmlns="https://wsterraindex.terraindex.com/ITWorks.TerraIndex/"> | ||
101 | <GetOverviewQueriesResult> | ||
102 | <ResultCode>Succes</ResultCode> | ||
103 | <Content>[ | ||
104 | { | ||
105 | "Name": " ", | ||
106 | "Parameters": null, | ||
107 | "Description": "" | ||
108 | }, | ||
109 | { | ||
110 | "Name": "ArcGIS Export - 1 - Coords", | ||
111 | "Parameters": [ | ||
112 | "ProjectID" | ||
113 | ], | ||
114 | "Description": "" | ||
115 | }, | ||
116 | { | ||
117 | "Name": "ArcGIS Export - 2 - An.results", | ||
118 | "Parameters": [ | ||
119 | "ProjectID" | ||
120 | ], | ||
121 | "Description": "" | ||
122 | }, | ||
123 | { | ||
124 | "Name": "ATKB Overzicht 2", | ||
125 | "Parameters": [ | ||
126 | "PROJECTID" | ||
127 | ], | ||
128 | "Description": "" | ||
129 | }, | ||
130 | { | ||
131 | "Name": "ATKB Peilbuisoverzicht 2", | ||
132 | "Parameters": [ | ||
133 | "PROJECTID" | ||
134 | ], | ||
135 | "Description": "" | ||
136 | }, | ||
137 | { | ||
138 | "Name": "BAM Overzicht diameters", | ||
139 | "Parameters": [ | ||
140 | "ProjectID" | ||
141 | ], | ||
142 | "Description": "" | ||
143 | }, | ||
144 | { | ||
145 | "Name": "BBK", | ||
146 | "Parameters": [ | ||
147 | "projectid" | ||
148 | ], | ||
149 | "Description": "" | ||
150 | }, | ||
151 | { | ||
152 | "Name": "BQ6:Toetsing grond(meng)monste", | ||
153 | "Parameters": [], | ||
154 | "Description": "20190805 BOOT Query #6: Toetsing grond(meng)monsters" | ||
155 | }, | ||
156 | { | ||
157 | "Name": "BQ6A:Toetsing grond(meng)monst", | ||
158 | "Parameters": [ | ||
159 | "ProjectID" | ||
160 | ], | ||
161 | "Description": "20190805 BOOT Query #6: Toetsing grond(meng)monsters" | ||
162 | }, | ||
163 | { | ||
164 | "Name": "Corr. watermonsters (STAP)", | ||
165 | "Parameters": [ | ||
166 | "DateBegin", | ||
167 | "DateEnd" | ||
168 | ], | ||
169 | "Description": "Hiermee zoekt u naar watermonsters die voor alle componenten uit het STAP-pakket een <D hebben. Datum invoeren als MM/DD/YYYY" | ||
170 | }, | ||
171 | { | ||
172 | "Name": "datum", | ||
173 | "Parameters": [], | ||
174 | "Description": "" | ||
175 | }, | ||
176 | { | ||
177 | "Name": "field/analysemonsters", | ||
178 | "Parameters": [], | ||
179 | "Description": "" | ||
180 | }, | ||
181 | { | ||
182 | "Name": "FROM ITWBMAM0 AM ", | ||
183 | "Parameters": null, | ||
184 | "Description": "" | ||
185 | }, | ||
186 | { | ||
187 | "Name": "Gebruikte analyses", | ||
188 | "Parameters": [ | ||
189 | "StartDatum", | ||
190 | "EindDatum" | ||
191 | ], | ||
192 | "Description": "Geeft een overzicht van het aantal keer dat analyses gebruikt zijn, in een op te geven periode, per laboratorium/klantcode/prijsafspraak\r\nDatum invoeren als MM/DD/YYYY\r\n" | ||
193 | }, | ||
194 | { | ||
195 | "Name": "Haskoning aangepast", | ||
196 | "Parameters": [ | ||
197 | "ProjectID" | ||
198 | ], | ||
199 | "Description": "" | ||
200 | }, | ||
201 | { | ||
202 | "Name": "Haskoning nieuw", | ||
203 | "Parameters": [ | ||
204 | "ProjectID" | ||
205 | ], | ||
206 | "Description": "" | ||
207 | }, | ||
208 | { | ||
209 | "Name": "ITW Analysemonsters + deelmons", | ||
210 | "Parameters": [ | ||
211 | "ProjectID" | ||
212 | ], | ||
213 | "Description": "Gegevens analysemonsters" | ||
214 | }, | ||
215 | { | ||
216 | "Name": "ITW Analyseresultaten Grond", | ||
217 | "Parameters": [ | ||
218 | "ProjectID" | ||
219 | ], | ||
220 | "Description": "Overzicht van analyseresultaten van grondmonsters" | ||
221 | }, | ||
222 | { | ||
223 | "Name": "ITW Asbest veldmonsters", | ||
224 | "Parameters": [ | ||
225 | "ProjectID" | ||
226 | ], | ||
227 | "Description": "Overzicht van asbestveldmonsters" | ||
228 | }, | ||
229 | { | ||
230 | "Name": "ITW Boringen + Peilbuizen", | ||
231 | "Parameters": [ | ||
232 | "ProjectID" | ||
233 | ], | ||
234 | "Description": "Overzicht gegevens boringen met peilbuizen" | ||
235 | }, | ||
236 | { | ||
237 | "Name": "ITW Dieptes per meetpunt", | ||
238 | "Parameters": [ | ||
239 | "ProjectID" | ||
240 | ], | ||
241 | "Description": "Dieptes van de meetpunten" | ||
242 | }, | ||
243 | { | ||
244 | "Name": "ITW Dubbele watermonsters", | ||
245 | "Parameters": [], | ||
246 | "Description": "Overzicht dubbele watermonsters in de actieve projecten" | ||
247 | }, | ||
248 | { | ||
249 | "Name": "ITW Grondverzet overzicht", | ||
250 | "Parameters": [ | ||
251 | "ProjectID" | ||
252 | ], | ||
253 | "Description": "Analyseresultaten voor de Grondverzet toetsing" | ||
254 | }, | ||
255 | { | ||
256 | "Name": "ITW Lagen incl. Archeologie", | ||
257 | "Parameters": [ | ||
258 | "ProjectID" | ||
259 | ], | ||
260 | "Description": "Lagen inclusief Archeologie kenmerken" | ||
261 | }, | ||
262 | { | ||
263 | "Name": "ITW MVS export", | ||
264 | "Parameters": [ | ||
265 | "ProjectID" | ||
266 | ], | ||
267 | "Description": "" | ||
268 | }, | ||
269 | { | ||
270 | "Name": "ITW Normen Bbk", | ||
271 | "Parameters": [], | ||
272 | "Description": "Normen van het Besluit Bodemkwaliteit" | ||
273 | }, | ||
274 | { | ||
275 | "Name": "ITW Normen Vlarebo", | ||
276 | "Parameters": [], | ||
277 | "Description": "Normen Vlarebo (> 1-6-2008)" | ||
278 | }, | ||
279 | { | ||
280 | "Name": "ITW Project totalen", | ||
281 | "Parameters": [ | ||
282 | "ProjectID" | ||
283 | ], | ||
284 | "Description": "Van diverse onderdelen de totalen in het project" | ||
285 | }, | ||
286 | { | ||
287 | "Name": "ITW Rekencoëfficienten Bbk", | ||
288 | "Parameters": [], | ||
289 | "Description": "Rekencoëfficienten van het Besluit bodemkwaliteit" | ||
290 | }, | ||
291 | { | ||
292 | "Name": "ITW Sada export", | ||
293 | "Parameters": [ | ||
294 | "ProjectID" | ||
295 | ], | ||
296 | "Description": "Alle gegevens om te importeren in Sada" | ||
297 | }, | ||
298 | { | ||
299 | "Name": "ITW Samples Duplicate Bar Code", | ||
300 | "Parameters": [], | ||
301 | "Description": "Report Field Samples With Duplicate Barcode" | ||
302 | }, | ||
303 | { | ||
304 | "Name": "ITW Samples Without Bar Code", | ||
305 | "Parameters": [], | ||
306 | "Description": "Report Field Samples Without Barcode" | ||
307 | }, | ||
308 | { | ||
309 | "Name": "ITW Toetsing Bbk", | ||
310 | "Parameters": [ | ||
311 | "ProjectID" | ||
312 | ], | ||
313 | "Description": "Resultaten toetsing Bbk" | ||
314 | }, | ||
315 | { | ||
316 | "Name": "ITW Toetsing BBK BoToVa", | ||
317 | "Parameters": [ | ||
318 | "ProjectID" | ||
319 | ], | ||
320 | "Description": "Resultaten toetsing BBK BoToVa" | ||
321 | }, | ||
322 | { | ||
323 | "Name": "ITW Toetsing Brusselse", | ||
324 | "Parameters": [ | ||
325 | "ProjectID" | ||
326 | ], | ||
327 | "Description": "Resultaten Brusselse toetsing" | ||
328 | }, | ||
329 | { | ||
330 | "Name": "ITW Toetsing Eigen normen", | ||
331 | "Parameters": [ | ||
332 | "ProjectID" | ||
333 | ], | ||
334 | "Description": "Resultaten toetsing aan eigen normen" | ||
335 | }, | ||
336 | { | ||
337 | "Name": "ITW Toetsing Vlarebo", | ||
338 | "Parameters": [ | ||
339 | "ProjectID" | ||
340 | ], | ||
341 | "Description": "Resultaten toetsing Vlarebo" | ||
342 | }, | ||
343 | { | ||
344 | "Name": "ITW Toetsing Vlarebo Grondverz", | ||
345 | "Parameters": [ | ||
346 | "ProjectID" | ||
347 | ], | ||
348 | "Description": "Resultaten toetsing Vlarebo grondverzet" | ||
349 | }, | ||
350 | { | ||
351 | "Name": "ITW Toetsing Waalse", | ||
352 | "Parameters": [ | ||
353 | "ProjectID" | ||
354 | ], | ||
355 | "Description": "Resultaten Waalse toetsing" | ||
356 | }, | ||
357 | { | ||
358 | "Name": "ITW Toetsing Waterbodem BoToVa", | ||
359 | "Parameters": [ | ||
360 | "ProjectID" | ||
361 | ], | ||
362 | "Description": "Resultaten waterbodemtoetsingen BoToVa (T1, T3, T5, T6, T7)" | ||
363 | }, | ||
364 | { | ||
365 | "Name": "ITW Toetsing Wbb", | ||
366 | "Parameters": [ | ||
367 | "ProjectID" | ||
368 | ], | ||
369 | "Description": "Alle gegevens die nodig zijn om in een gis te importeren met Wbb gegevens" | ||
370 | }, | ||
371 | { | ||
372 | "Name": "ITW Toetsing WBB BoToVa", | ||
373 | "Parameters": [ | ||
374 | "ProjectID" | ||
375 | ], | ||
376 | "Description": "Resultaten toetsing WBB BoToVa" | ||
377 | }, | ||
378 | { | ||
379 | "Name": "ITW Toetsresultaten Wbb", | ||
380 | "Parameters": [ | ||
381 | "ProjectID" | ||
382 | ], | ||
383 | "Description": "Alle gegevens die je nodig hebt om in een gis te importeren met Wbb gegevens" | ||
384 | }, | ||
385 | { | ||
386 | "Name": "ITW Veldmonsters", | ||
387 | "Parameters": [ | ||
388 | "ProjectID" | ||
389 | ], | ||
390 | "Description": "Gegevens veldmonsters" | ||
391 | }, | ||
392 | { | ||
393 | "Name": "ITW Waterm. incl. flessen", | ||
394 | "Parameters": [ | ||
395 | "ProjectID" | ||
396 | ], | ||
397 | "Description": "Overzicht gegevens watermonsters inclusief flessen" | ||
398 | }, | ||
399 | { | ||
400 | "Name": "ITW Watermonsters", | ||
401 | "Parameters": [ | ||
402 | "ProjectID" | ||
403 | ], | ||
404 | "Description": "Overzicht gegevens watermonstername" | ||
405 | }, | ||
406 | { | ||
407 | "Name": "ITW Watermonsters (NL)", | ||
408 | "Parameters": [ | ||
409 | "ProjectID" | ||
410 | ], | ||
411 | "Description": "Overzicht watermonsters" | ||
412 | }, | ||
413 | { | ||
414 | "Name": "ITW Watermonsters uitgebreid", | ||
415 | "Parameters": [ | ||
416 | "ProjectID" | ||
417 | ], | ||
418 | "Description": "Overzicht gegevens watermonstername (uitgebreid)" | ||
419 | }, | ||
420 | { | ||
421 | "Name": "ITW zoeken barcode", | ||
422 | "Parameters": [ | ||
423 | "Barcode" | ||
424 | ], | ||
425 | "Description": "Toont een overzicht van alle veldmonsters met een (gedeelte van) een barcode, en in welk analysemonster ze voorkomen" | ||
426 | }, | ||
427 | { | ||
428 | "Name": "ITW zoeken project", | ||
429 | "Parameters": [ | ||
430 | "ProjectCodeNaam" | ||
431 | ], | ||
432 | "Description": "Zoeken op (gedeelte van) projectcode en projectnaam in archieven en over vestigingen heen" | ||
433 | }, | ||
434 | { | ||
435 | "Name": "ITW Zoeken projectnaam", | ||
436 | "Parameters": [ | ||
437 | "Projectnaam" | ||
438 | ], | ||
439 | "Description": "" | ||
440 | }, | ||
441 | { | ||
442 | "Name": "MP, XY, Lagen", | ||
443 | "Parameters": [ | ||
444 | "ProjectID" | ||
445 | ], | ||
446 | "Description": "" | ||
447 | }, | ||
448 | { | ||
449 | "Name": "MP, XY, Lagen alle Proj", | ||
450 | "Parameters": [], | ||
451 | "Description": "" | ||
452 | }, | ||
453 | { | ||
454 | "Name": "ORDER BY AM.ANLMONSNM", | ||
455 | "Parameters": null, | ||
456 | "Description": "" | ||
457 | }, | ||
458 | { | ||
459 | "Name": "Ovam test", | ||
460 | "Parameters": [ | ||
461 | "ProjectID" | ||
462 | ], | ||
463 | "Description": "" | ||
464 | }, | ||
465 | { | ||
466 | "Name": "Overzicht analyseresultaten", | ||
467 | "Parameters": [ | ||
468 | "ProjectID" | ||
469 | ], | ||
470 | "Description": "" | ||
471 | }, | ||
472 | { | ||
473 | "Name": "Sada", | ||
474 | "Parameters": [ | ||
475 | "ProjectID" | ||
476 | ], | ||
477 | "Description": "Sada export" | ||
478 | }, | ||
479 | { | ||
480 | "Name": "Test", | ||
481 | "Parameters": [ | ||
482 | "ProjectID" | ||
483 | ], | ||
484 | "Description": "Geef meetpunten met x-y" | ||
485 | }, | ||
486 | { | ||
487 | "Name": "Test Env1", | ||
488 | "Parameters": [ | ||
489 | "ProjectID" | ||
490 | ], | ||
491 | "Description": "" | ||
492 | }, | ||
493 | { | ||
494 | "Name": "Test Env2", | ||
495 | "Parameters": [ | ||
496 | "ProjectID" | ||
497 | ], | ||
498 | "Description": "" | ||
499 | }, | ||
500 | { | ||
501 | "Name": "Test Env3", | ||
502 | "Parameters": [ | ||
503 | "ProjectID" | ||
504 | ], | ||
505 | "Description": "" | ||
506 | }, | ||
507 | { | ||
508 | "Name": "test jayme", | ||
509 | "Parameters": [], | ||
510 | "Description": "" | ||
511 | }, | ||
512 | { | ||
513 | "Name": "Test nle", | ||
514 | "Parameters": [], | ||
515 | "Description": "" | ||
516 | }, | ||
517 | { | ||
518 | "Name": "Test vandaag", | ||
519 | "Parameters": [ | ||
520 | "PROJECTID" | ||
521 | ], | ||
522 | "Description": "" | ||
523 | }, | ||
524 | { | ||
525 | "Name": "testLSC2", | ||
526 | "Parameters": [], | ||
527 | "Description": "" | ||
528 | }, | ||
529 | { | ||
530 | "Name": "veldmonsters", | ||
531 | "Parameters": [], | ||
532 | "Description": "" | ||
533 | }, | ||
534 | { | ||
535 | "Name": "Watermonsters over database", | ||
536 | "Parameters": [], | ||
537 | "Description": "" | ||
538 | }, | ||
539 | { | ||
540 | "Name": "Watersamples", | ||
541 | "Parameters": [ | ||
542 | "ProjectID" | ||
543 | ], | ||
544 | "Description": "Watersamples" | ||
545 | }, | ||
546 | { | ||
547 | "Name": "Watersamples in project", | ||
548 | "Parameters": [ | ||
549 | "ProjectID" | ||
550 | ], | ||
551 | "Description": "Shows all water samples in the current project" | ||
552 | }, | ||
553 | { | ||
554 | "Name": "zzw", | ||
555 | "Parameters": [], | ||
556 | "Description": "" | ||
557 | } | ||
558 | ]</Content> | ||
559 | </GetOverviewQueriesResult> | ||
560 | </GetOverviewQueriesResponse> | ||
561 | </soap:Body> | ||
562 | </soap:Envelope> | ||
563 | {{/code}} | ||
564 | |||
565 | The Content JSON looks like this, but is also available as XML: | ||
566 | |||
567 | {{code language="JSON" layout="LINENUMBERS"}} | ||
568 | [ | ||
569 | { | ||
570 | "Name": "ITW Toetsing WBB BoToVa", | ||
571 | "Parameters": [ | ||
572 | "ProjectID" | ||
573 | ], | ||
574 | "Description": "Resultaten toetsing WBB BoToVa" | ||
575 | }, | ||
576 | { | ||
577 | "Name": "ITW Toetsresultaten Wbb", | ||
578 | "Parameters": [ | ||
579 | "ProjectID" | ||
580 | ], | ||
581 | "Description": "Alle gegevens die je nodig hebt om in een gis te importeren met Wbb gegevens" | ||
582 | }, | ||
583 | { | ||
584 | "Name": "ITW Veldmonsters", | ||
585 | "Parameters": [ | ||
586 | "ProjectID" | ||
587 | ], | ||
588 | "Description": "Gegevens veldmonsters" | ||
589 | }, | ||
590 | { | ||
591 | "Name": "ITW Waterm. incl. flessen", | ||
592 | "Parameters": [ | ||
593 | "ProjectID" | ||
594 | ], | ||
595 | "Description": "Overzicht gegevens watermonsters inclusief flessen" | ||
596 | }, | ||
597 | { | ||
598 | "Name": "ITW zoeken barcode", | ||
599 | "Parameters": [ | ||
600 | "Barcode" | ||
601 | ], | ||
602 | "Description": "Toont een overzicht van alle veldmonsters met een (gedeelte van) een barcode, en in welk analysemonster ze voorkomen" | ||
603 | }, | ||
604 | { | ||
605 | "Name": "MP, XY, Lagen alle Proj", | ||
606 | "Parameters": [], | ||
607 | "Description": "" | ||
608 | }, | ||
609 | { | ||
610 | "Name": "Overzicht analyseresultaten", | ||
611 | "Parameters": [ | ||
612 | "ProjectID" | ||
613 | ], | ||
614 | "Description": "" | ||
615 | }, | ||
616 | { | ||
617 | "Name": "Watersamples in project", | ||
618 | "Parameters": [ | ||
619 | "ProjectID" | ||
620 | ], | ||
621 | "Description": "Shows all water samples in the current project" | ||
622 | } | ||
623 | ] | ||
624 | {{/code}} | ||
625 | |||
626 | |||
627 | (% class="box infomessage" %) | ||
628 | ((( | ||
629 | Is UseZipStream = true; the Content needs to be inflated using the ZipSteamHelper Class. The code can be found here: [[Setting up a Webservice connection for project exports>>Implementation documentation.Setting up a Webservice connection for project exports.WebHome]] | ||
630 | ))) | ||
631 | |||
632 | |||
633 | == 2. Retreive the actual query data from TerraIndex == | ||
634 | |||
635 | To request the actual data from the Overview query in TerraIndex we have a second SOAP webservice call in the same WSDL/Webservice. | ||
636 | |||
637 | [[image:1637575660334-733.png]] | ||
638 | |||
639 | Fill the **Envelope **of a **SOAP **HTTP call with: | ||
640 | |||
641 | |||
642 | {{code language="none" layout="LINENUMBERS"}} | ||
643 | |||
644 | <soap:Envelope | ||
645 | xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" | ||
646 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
647 | xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
648 | <soap:Body> | ||
649 | <GetQueryResult | ||
650 | xmlns="https://wsterraindex.terraindex.com/ITWorks.TerraIndex/"> | ||
651 | <request> | ||
652 | <Authorisation> | ||
653 | <Username>USERNAME</Username> | ||
654 | <Password>PASSWORD</Password> | ||
655 | <Licensenumber>LICENSENUMBER, of the customer</Licensenumber> | ||
656 | <ApplicationCode>YOUR APP CODE, REQUEST at service@terraindex.com</ApplicationCode> | ||
657 | <FeatureWord>0</FeatureWord> | ||
658 | </Authorisation> | ||
659 | <WebserviceVersion>1.0</WebserviceVersion> | ||
660 | <LanguageCode>nld</LanguageCode> | ||
661 | <UseZipStream>true</UseZipStream> | ||
662 | <ViewName>ITW Toetsresultaten Wbb</ViewName> | ||
663 | <Param>{"ProjectID":"100000218"}</Param> | ||
664 | <DataType>JSON</DataType> | ||
665 | </request> | ||
666 | </GetQueryResult> | ||
667 | </soap:Body> | ||
668 | </soap:Envelope> | ||
669 | {{/code}} | ||
670 | |||
671 | Set the correct values for: | ||
672 | |||
673 | * (% class="mark" %)Username(%%); as the username in TerraIndex | ||
674 | * (% class="mark" %)Password(%%); as the username in TerraIndex | ||
675 | * (% class="mark" %)Licensenumber(%%); as your companies license number | ||
676 | * (% class="mark" %)ApplicationCode(%%); as provided by TerraIndex to you, if not provided, request one at: [[service@terraindex.com>>path:mailto:service@terraindex.com]] | ||
677 | * (% class="mark" %)UseZipStreamto (%%)'true', to get GZip data stream. This will be much faster over the internet. | ||
678 | Check here for the Class to use it: | ||
679 | |||
680 | * (% class="mark" %)Chapter(%%): Zip Stream class. | ||
681 | * (% class="mark" %)DataType(%%); set the correct data type you would like to receive, this is 'JSON' or 'XML'. | ||
682 | * (% class="mark" %)Param (%%)must be the Array as received from the GetOverviewQueries, and filled with data. Always needs to be JSON. | ||
683 | |||
684 | You will receive a response like this: | ||
685 | |||
686 | {{code language="xml" layout="LINENUMBERS"}} | ||
687 | |||
688 | <soap:Envelope | ||
689 | xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" | ||
690 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
691 | xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
692 | <soap:Body> | ||
693 | <GetQueryResultResponse | ||
694 | xmlns="https://wsterraindex.terraindex.com/ITWorks.TerraIndex/"> | ||
695 | <GetQueryResultResult> | ||
696 | <ResultCode>Succes</ResultCode> | ||
697 | <Content>H4sIAAAAAAAEAO1R30/CMBD+V0yfhzk3gsnemBgxYdHoIhpjzMEOVuha0rUgEv53y7ATfTcxkbfvV+56/TYsw5EgFj9v2K1WMxqbscodZ2kICUDYaUUhAAu8KxHLnYt6RfykR2JSGY2F5e8kXSolMgsrfaw3gPMEzpzxyGJphQjYkwcpIl+SyAulpoZ+qnc0WQqcN7KSlSH9OTavcLcLjeZvjk61krkTemjszg4hhBa0WxBl0Imjdlwf8ICSxW04hYBlyrD4DGrct6Wt/JqBrSfsSX+QrRfNwy7qb9njm7IaF5rPllxOmxe6y1eI+itVK10xQS+4mzy8JFkc5nI8WDysxyS0Ssk0qft1OVJKeJrM+fDbNidcaUWLJv/aHXqceXC9B9vgF9sOj23/o7ajY9t/rO2X7QeXis4U1QUAAA==</Content> | ||
698 | </GetQueryResultResult> | ||
699 | </GetQueryResultResponse> | ||
700 | </soap:Body> | ||
701 | </soap:Envelope> | ||
702 | {{/code}} | ||
703 | |||
704 | (% class="box infomessage" %) | ||
705 | ((( | ||
706 | Is UseZipStream = true; the Content needs to be inflated using the ZipSteamHelper Class. The code can be found here: [[Setting up a Webservice connection for project exports>>Implementation documentation.Setting up a Webservice connection for project exports.WebHome]] | ||
707 | ))) | ||
708 | |||
709 | |||
710 | The Content JSON looks like this, but is also available as XML (see below the json for xml): | ||
711 | |||
712 | {{code language="JSON"}} | ||
713 | { | ||
714 | "Table": [ | ||
715 | { | ||
716 | "Projectcode": "M20B0026-3200", | ||
717 | "Projectnaam": "Marwei Delfstrahuizen", | ||
718 | "Meetpuntnaam": "DL07B01", | ||
719 | "X": null, | ||
720 | "Y": null, | ||
721 | "Maaiveldhoogte": null, | ||
722 | "MaaiveldRefvlak": null, | ||
723 | "Monsternaam": "dsa", | ||
724 | "Matrix": "grond", | ||
725 | "Datum": "2020-04-03T06:34:00", | ||
726 | "Van": 40, | ||
727 | "Tot": 100, | ||
728 | "Humus": null, | ||
729 | "Lutum": null, | ||
730 | "HLType": null, | ||
731 | "Code": null, | ||
732 | "Omschrijving": null, | ||
733 | "Meetwaarde": null, | ||
734 | "MeetwAlfa": null, | ||
735 | "Ref": null, | ||
736 | "Eenh": null, | ||
737 | "Meetdatum": null, | ||
738 | "WaardeBewMeth": null, | ||
739 | "Symbool": null, | ||
740 | "BkiWaarde": null, | ||
741 | "BkiGroep": null, | ||
742 | "S_AW": null, | ||
743 | "T": null, | ||
744 | "I": null | ||
745 | }, | ||
746 | { | ||
747 | "Projectcode": "M20B0026-3200", | ||
748 | "Projectnaam": "Marwei Delfstrahuizen", | ||
749 | "Meetpuntnaam": "DL07B02", | ||
750 | "X": null, | ||
751 | "Y": null, | ||
752 | "Maaiveldhoogte": null, | ||
753 | "MaaiveldRefvlak": null, | ||
754 | "Monsternaam": "dsa", | ||
755 | "Matrix": "grond", | ||
756 | "Datum": "2020-04-03T06:34:00", | ||
757 | "Van": 40, | ||
758 | "Tot": 100, | ||
759 | "Humus": null, | ||
760 | "Lutum": null, | ||
761 | "HLType": null, | ||
762 | "Code": null, | ||
763 | "Omschrijving": null, | ||
764 | "Meetwaarde": null, | ||
765 | "MeetwAlfa": null, | ||
766 | "Ref": null, | ||
767 | "Eenh": null, | ||
768 | "Meetdatum": null, | ||
769 | "WaardeBewMeth": null, | ||
770 | "Symbool": null, | ||
771 | "BkiWaarde": null, | ||
772 | "BkiGroep": null, | ||
773 | "S_AW": null, | ||
774 | "T": null, | ||
775 | "I": null | ||
776 | }, | ||
777 | { | ||
778 | "Projectcode": "M20B0026-3200", | ||
779 | "Projectnaam": "Marwei Delfstrahuizen", | ||
780 | "Meetpuntnaam": "DL07B03", | ||
781 | "X": null, | ||
782 | "Y": null, | ||
783 | "Maaiveldhoogte": null, | ||
784 | "MaaiveldRefvlak": null, | ||
785 | "Monsternaam": "dsa", | ||
786 | "Matrix": "grond", | ||
787 | "Datum": "2020-04-03T06:34:00", | ||
788 | "Van": 40, | ||
789 | "Tot": 100, | ||
790 | "Humus": null, | ||
791 | "Lutum": null, | ||
792 | "HLType": null, | ||
793 | "Code": null, | ||
794 | "Omschrijving": null, | ||
795 | "Meetwaarde": null, | ||
796 | "MeetwAlfa": null, | ||
797 | "Ref": null, | ||
798 | "Eenh": null, | ||
799 | "Meetdatum": null, | ||
800 | "WaardeBewMeth": null, | ||
801 | "Symbool": null, | ||
802 | "BkiWaarde": null, | ||
803 | "BkiGroep": null, | ||
804 | "S_AW": null, | ||
805 | "T": null, | ||
806 | "I": null | ||
807 | } | ||
808 | ] | ||
809 | } | ||
810 | {{/code}} | ||
811 | |||
812 | The Content XML looks like this: | ||
813 | |||
814 | {{code language="none" layout="LINENUMBERS"}} | ||
815 | <NewDataSet> | ||
816 | <Table> | ||
817 | <Projectcode>M20B0026-3200</Projectcode> | ||
818 | <Projectnaam>Marwei Delfstrahuizen</Projectnaam> | ||
819 | <Meetpuntnaam>DL07B01</Meetpuntnaam> | ||
820 | <Monsternaam>dsa</Monsternaam> | ||
821 | <Matrix>grond</Matrix> | ||
822 | <Datum>2020-04-03T06:34:00+02:00</Datum> | ||
823 | <Van>40</Van> | ||
824 | <Tot>100</Tot> | ||
825 | </Table> | ||
826 | <Table> | ||
827 | <Projectcode>M20B0026-3200</Projectcode> | ||
828 | <Projectnaam>Marwei Delfstrahuizen</Projectnaam> | ||
829 | <Meetpuntnaam>DL07B02</Meetpuntnaam> | ||
830 | <Monsternaam>dsa</Monsternaam> | ||
831 | <Matrix>grond</Matrix> | ||
832 | <Datum>2020-04-03T06:34:00+02:00</Datum> | ||
833 | <Van>40</Van> | ||
834 | <Tot>100</Tot> | ||
835 | </Table> | ||
836 | <Table> | ||
837 | <Projectcode>M20B0026-3200</Projectcode> | ||
838 | <Projectnaam>Marwei Delfstrahuizen</Projectnaam> | ||
839 | <Meetpuntnaam>DL07B03</Meetpuntnaam> | ||
840 | <Monsternaam>dsa</Monsternaam> | ||
841 | <Matrix>grond</Matrix> | ||
842 | <Datum>2020-04-03T06:34:00+02:00</Datum> | ||
843 | <Van>40</Van> | ||
844 | <Tot>100</Tot> | ||
845 | </Table> | ||
846 | </NewDataSet> | ||
847 | {{/code}} | ||
848 | |||
849 | (% class="box infomessage" %) | ||
850 | ((( | ||
851 | This could be parsed directly into a C# .Net Dataset | ||
852 | ))) |