For certain users we have limited Webservices available for integration with user systems. To connect with the TerraIndex database to upload new projects, you can connect to a webservice to import your data.

It’s called the: ConvertAndImport Webservice

Changelog

Update 2022-08-23

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.

 URL 
Oldhttps://web.terraindex.com/DataWS/https://web.terraindex.com/DataWS/ITWImportExportServiceASMX_V1_0.asmx?wsdl
Newhttps://web.terraindex.com/DataWSExternals/https://web.terraindex.com/DataWSExternals/ITWImportExportServiceASMX_V1_0.asmx?wsdl

We also have new REST Calls, with the same Input Output formats:

https://web.terraindex.com/datawsExternals/ITWImportExportRestService_V1_0/

/Convert
input as json: ConversionRequest
output as json: ConversionResult

/Import
input as json: ImportRequest
output as json: ImportResult

/ConvertAndImport
input as json: ImportRequest
output as json: ImportResult

as    POST   or   GET

Upload a TerraIndex formatted project

To start connecting this webservice, you should use this URL of the Import Export Webservice:

https://web.terraindex.com/DataWSExternals/ITWImportExportServiceASMX_V1_0.asmx

The WSDL is available at:

https://web.terraindex.com/DataWSExternals/ITWImportExportServiceASMX_V1_0.asmx?wsdl

The idea is that you upload a XML file that contains project information. The file should look like this: Documentation TerraIndex Export format - dsFieldProject.xsd

It can also be request as an export of the project by using this Webservice: Setting up a Webservice connection for project exports

After sending the XML to the server, it should return you a Success.
If not Success, it will give some exception information and a detailed log of what has happened.
If Success, it will also give a detailed log of what has happened.
 

Example code of how to ConvertAndImport the XML file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
    private void SendImportCall(string xmlDataset)
    {
       if (string.IsNullOrEmpty(xmlDataset))
        {
           throw new Exception("XML of dataset is empty!");
        }
        MessageBox.Show("New data will now be send to the Internet."); // Field projects expect VeldData as the header.

        xmlDataset = xmlDataset.Replace("dsFieldProject", "VeldData");
        ConvertAndImportRequest request = new ConvertAndImportRequest()
        {
            AuthorisationRequest = new AuthorisationRequest()
            {
                Username = "Username",
                Password = "Password",
                Licensenumber = "123", // Licensenumber of the customer ApplicationCode = 12 // Application code as retreived from service@terraindex.com
           },
            LanguageCode = "eng",
            WebserviceVersion = "1.0",
            UseZipStream = true,
            LogFormat = ExportLogFormat.HTML // or XML
       };

        request.TypeOfImport = ImportType.Import_Field_V1_0_0;
        request.ImportClassification = ImportClassification.Project_Import;
        List<ITWorks.TerraIndex.ExcelPlugin.TerraIndex_DataWS.File> Files = new List<ITWorks.TerraIndex.ExcelPlugin.TerraIndex_DataWS.File>();
        ITWorks.TerraIndex.ExcelPlugin.TerraIndex_DataWS.File file = new ITWorks.TerraIndex.ExcelPlugin.TerraIndex_DataWS.File()
        {
            FileName = "ti_file.xml",
            FileContent = xmlDataset,
            TypeOfFile = FileType.Field_XML
        };
        Files.Add(file);

       //Compress
       CompressFiles(Files);
        request.Files = Files;

       //SEND
       try
        {
            ImportResult resultImport = client.ConvertAndImport(request);
           if (resultImport == null) return;
           if (resultImport.ResultCode != ImportResultCode.Import_Succes)
            {
               string logHTMLorXML = string.Empty;
               if (!string.IsNullOrEmpty(resultImport.ImportLog))
                {
                   try
                    {
                        logHTMLorXML = ZipStreamHelper.DecompressBase64StringToString(resultImport.ImportLog);
                    }
                   catch (Exception) { logHTMLorXML = resultImport.ImportLog; }
                }
               throw new Exception(resultImport.ResultCode + " - " + resultImport.ResultMessage);
            }
           else
            {
               //SUCCES; you could use the log to see what has been done
               string logHTMLorXML = ZipStreamHelper.DecompressBase64StringToString(resultImport.ImportLog);
            }
        }
       catch (Exception e)
        {
           throw new Exception("ConvertAndImport error: " + e.ToString());
        }
    }

   private void CompressFiles(List<ITWorks.TerraIndex.ExcelPlugin.TerraIndex_DataWS.File> list)
    {
       int i = 0; foreach (ITWorks.TerraIndex.ExcelPlugin.TerraIndex_DataWS.File file in list)
        {
            i++; //Define new FileType
           FileType resultFileType = FileType.Field_XML;
           try
            {
                file.TypeOfFile = (FileType)resultFileType;
                file.FileContent = ZipStreamHelper.CompressToBase64String(file.FileContent);
            }
           catch (Exception)
            {
               throw new Exception("An error occured while trying to compress the data");
            }
           finally
            { }
        }
    }

In this example, the parameter 'xmlDataset' string is filled with this xml:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

<dsFieldProject
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///C:/Temp/dsFieldProject.xsd">
<tblProjects>
 <PrID>242</PrID>
 <PrCode>2018-010-DEMO</PrCode>
 <PrName>TU Delft, the Netherlands</PrName>
 <PrConsultancyFirm>TerraIndex</PrConsultancyFirm>
 <PrLeaderCode>Consult</PrLeaderCode>
 <PrFieldworkFirm>TerraIndex</PrFieldworkFirm>
 <PrDrillingMasterCode>Borelog</PrDrillingMasterCode>
 <PrGuid>46ba5f9e-5d59-8c8c-c5d6-ac9e9651ec4b</PrGuid>
 <PrDateLastChanged>2018-08-31T11:12:50.45</PrDateLastChanged>
 <PrLocPointGeometry>POINT (6.1000890695634133 52.58846240818189)</PrLocPointGeometry>
 <PrTemplateID>23737</PrTemplateID>
 <PrCoordinateSystem>RD</PrCoordinateSystem>
</tblProjects>
<tblMeasurementPoints>
 <MpID>1</MpID>
 <MpName>A01</MpName>
 <MpNameNumeric>1</MpNameNumeric>
 <MpDate>2018-08-01T00:00:00</MpDate>
 <MpDepth>300</MpDepth>
 <MpXCoord>203588.1</MpXCoord>
 <MpYCoord>511339.61</MpYCoord>
 <MpDrillingMasterCode>John Borelog</MpDrillingMasterCode>
 <MpGroundLevelTypeCode>KL</MpGroundLevelTypeCode>
 <MpTypeCode>P</MpTypeCode>
 <MpCoordinatesPrecisionCode>G1</MpCoordinatesPrecisionCode>
 <PrID>242</PrID>
 <MpGuid>d09c8af7-45d1-4cd2-939f-7db42218b4ec</MpGuid>
 <MpDateLastChanged>2018-08-28T10:00:26.567</MpDateLastChanged>
 <MpPointGeometry>POINT (6.10416686139686 52.5874623700489)</MpPointGeometry>
</tblMeasurementPoints>
<tblMeasurementPoints>
 <MpID>2</MpID>
 <MpName>A04</MpName>
 <MpNameNumeric>4</MpNameNumeric>
 <MpDate>2018-08-01T00:00:00</MpDate>
 <MpDepth>300</MpDepth>
 <MpXCoord>203508.7</MpXCoord>
 <MpYCoord>511382.74</MpYCoord>
 <MpDrillingMasterCode>John Borelog</MpDrillingMasterCode>
 <MpGroundLevelTypeCode>KL</MpGroundLevelTypeCode>
 <MpTypeCode>B</MpTypeCode>
 <MpGWT>150</MpGWT>
 <MpCoordinatesPrecisionCode>G1</MpCoordinatesPrecisionCode>
 <PrID>242</PrID>
 <MpGuid>133ef5e8-2990-4b75-b718-27cd7bb9630d</MpGuid>
 <MpDateLastChanged>2018-08-28T10:00:26.57</MpDateLastChanged>
 <MpPointGeometry>POINT (6.10300163732122 52.5878570271434)</MpPointGeometry>
</tblMeasurementPoints>
</dsFieldProject>

ID’s in the XML should be valid internally, as Primary- and Foreign-Keys. Once getting pushed into the database, the database will provice new ID’s.

DateLastChanged fields containing DateTime values, should be send to the server in +2 Timezone (Amsterdam).

More information about the xml format can be found here:  https://wiki.terraindex.com/bin/view/Implementation%20documentation/Documentation%20TerraIndex%20Export%20format%20-%20dsFieldProject.xsd/

Example SOAP call that will be send:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
 <ConvertAndImport
  xmlns="https://wsterraindex.terraindex.com/ITWorks.TerraIndex/"
  xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <request>
   <AuthorisationRequest>
    <Username>USERNAME</Username>
    <Password>PASSWORD</Password>
    <Licensenumber>LICENSENUMBER</Licensenumber>
    <ApplicationCode>APPLICATIONCODE</ApplicationCode>
    <FeatureWord>0</FeatureWord>
   </AuthorisationRequest>
   <WebserviceVersion>1.0</WebserviceVersion>
   <TypeOfImport>Import_Field_V1_0_0</TypeOfImport>
   <LanguageCode>eng</LanguageCode>
   <ImportClassification>Project_Import</ImportClassification>
   <Files>
    <File>
     <FileName>ti_file.xml</FileName>
     <TypeOfFile>Field_XML</TypeOfFile>
     <FileContent>H4sIAAAAAAAEAO2Z3U/bSBDA30+6/4HHq04L++01QpF6gSJOGHIlQu29rb1j8JHY1tpplf++u5tPHDcVAt0LEZHwzoxn1vPxc2Kf3cPEnOtWD37/7ejorE0nI1v9B1nbBIETjezV+YDRSJ2dhMO1eFgZGFDs/7wqLNfKGz2FwcXfF8no+tZrw3qtHc9r8PZHJxvZ6FE3O8LrKvNndkTDqmx11o7ANlXZ0d21FqDtFd7MpinYjurfoh5VTasnPaGHRTvviJJZWWRFrSe7qrtWt+Cy960os66n0WNVdmW338ud3Vzaalaaa/gGk94cWefbR+8mxWWkmU1aXWbzT4WdPvMK2oDtevpUuLp/r+xT1/zcFpNJUT4kuml3T/vYNLNp3RbP0345K8wgMkJIDhKRSGWIG6JRKgBQRgmjeU6zGITvhGC8Cedydu1CDR91+QAm9BPCzH3GlJwSdYpDc3XNnuW2Ksr2EqoptHY+GN1e3YyP/kDsWEoScckUlZi7PYkjjo/dAVU0IpEQKqIfvOsdD2vfn+HBXWg3BcOqsqYo3Ybu5i5F08HlxaL9O+IwTyfdgfITloBuZhamULYh8nrUktrNFzk7Cf/XsjA6Qbo9RIuVa2mwRbZRrwRrK5+5ZVYponyM8Wn4+BOCbm35JVzCIGTOa5frtf7rYu2zSL3+a0e/r3OSem9nJ/VnyMGCG5yQkT6L/rOm2j5tSzZlaEYWsqLZqWBS3+lpPYGxfurucjxLwYfZNnbtoX2/n0OT2aLT+km9qGW4avv0ExvfuIl2lwWlG1D4maeNRbflegHsUuoniUIc6ZhLxFLBEGciRbFQArGcZEoplhKjfbW2x25R+d2xCw1C8SnnWw3SM3ZJvW/mREQI4RxTFtHlzHFM4kgwEmEsP3jHvROX1Pdg2yLTE0fkwufH5xXax8rslLCt6qEtXJ/11Hcrwf/MAqm7Fv4GUpSzatZM5otu2Imw5WTVAv0mKZhE+410byFJ/Zetrs63BfduN8YZb0cLjOhHwq9hQXthQffDgh5g8U5hYWQKjHODGGYKcQcIlGJjUJZzHmUmirhRL4aFfA0sYskFloTHNF7Bwt2vWUwcNJgiB1i8ISxYLyzYfliwAyzeKSyEoJprqRAo4IhLypHO3Rf6PIYcM8NTTeOXwkKwV8BCqphIipnEgqslLHAcYcq5cl862AEWbwgL3gsLvh8W/ACLdwoLEzMmtSaI5FQiHkcSpRHNEDZ5bmKcizQz/yssBKeCcUUVUXLJCsk5w4QJioU4sOINWSF6WSH2s0IcWPFOWYEJxG4yAYHQ7leIdlVWToJ0zCKeSpGxl/8KeRUrYi6l4AQTrvjqMSHGsYoFd8zgh0cWL4VFq9evFJzIpcj39IAek2NXo9VyqfUFG1rwITZPf+MxIafcD/2fmITKbpstz/xY1+GlAyNnJ6vjre2tN+FDLl9y/ACsG9f/7xgAAA==</FileContent>
    </File>
   </Files>
   <LogFormat>HTML</LogFormat>
   <UseZipStream>true</UseZipStream>
  </request>
 </ConvertAndImport>
</s:Body>
</s:Envelope>
Tags:
 
TerraIndex