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