Please enable JavaScript to view this site.

Version:

Navigation: Hands-On Guides > HTTP Inbound

Create a feature station in HTTP

Prev Top Next More

This document serves the purpose of providing a hands-on guide for creating a new feature station in the Utility Network geodatabase using an HTTP Inbound service endpoint.

After completing all the steps, the result will be an electricity substation in the Utility Network, on layer 0 with assetgroup=200 and assetype=203.

Steps to reproduce:

1.Prepare your XSL file.

2.Create an HTTP Inbound service endpoint in VertiGIS Integrator.

3.Execute a CURL command.

4.Check the Protocol page in VertiGIS Integrator.

Prepare the XSL file

The Copy.xsl can be used for the transformation of the incoming data, being part of the XML flow between the endpoint and the ArcGIS Server. Since it is a basic template for processing the VI XML, it needs to be configured.

To modify the XSL file:

1.In Windows Explorer, navigate to the VI >apache-tomcat-9.0.87>webapps>utpostserver>WEB-INF>xsl folder (e.g. C:\VertiGIS Integrator\apache-tomcat-9.0.87\webapps\utpostserver\WEB-INF\xsl).

2.Create a backup copy for the Copy.XSL file. (If you do not have the Copy.xsl file you can create a new .xsl file).

3.In the Copy.xsl file, paste the HTTP Inbound XSL template and save it.

4.Modify the file's name. (for this exercise, use our example: SAP_to_GIS_HTTP_In.xsl)

Create an HTTP Inbound service endpoint

The second step is to create an HTTP Inbound service endpoint in VertiGIS Integrator pointing to your newly created .xsl file (in our example: SAP_to_GIS_HTTP_In.xsl).

To create a new HTTP Service Endpoint:

1.Open the VertiGIS Integrator user interface.

2.Navigate to the Settings tab>Service Endpoints.

3.In the Service Endpoints tab, expand the HTTP folder, right click on the HTTPInbound subfolder and select the Add option to open the Service Endpoint modal.

httpinservendv10

Set parameters for the Service Endpoint:

1.Add a Name for the endpoint (for this exercise: HttpInTest).

2.Add a description.

3.In the Request XSL file field add the name matching to your newly created .xsl file (SAP_to_GIS_HTTP_In.xsl).        

4.From the Response XML template drop-down field, select Request XML.

5.In the Target version field, add SDE.DEFAULT.

6.Set the Priority field to 1.

7.Click on the OK button to save the endpoint.

Send a CURL command

To simulate a request coming from an external system (e.g. SAP) to GIS side we will use a CURL command (a general command tool to send requests). Sending a personalized CURL command is a method to call the VertiGIS Integrator interface and use it for testing purposes because you can create your own test request by curl and send it by command line.

In our example we used this CURL command: curl --request POST --data "sap_id=1234&sap_name=New Station Name&x=390452.1528000012&y=5820230.3950999975" http://HOSTNAME.int.vertigis.com:8080/utpostserver/HttpRequestAction.action?endpoint=HttpInTest -u USERNAME:PASSWORD . For the CURL command to work, you have to replace the bolded HOSTNAME with your local hostname. You can check you hostname in Windows Explorer>System>About.

Breaking down the command we can see each piece has its purpose:

--request POST: sends the post request to VertiGIS Integrator.

--data "sap_id=1234&sap_name=New Station Name&x=390452.1528000012&y=5820230.3950999975": is used to set the data along with parameters such as the sap id, sap name, x and y coordinates.

http://HOSTNAME.int.vertigis.com: is the URL for the HTTP Inbound interface. It contains the hostname.

Make sure to add the URL matching your local hostname. You can check you hostname in Windows Explorer>System>About.

:8080/: represents the default port number. If you changed the port number while configuring Apache Tomcat, please use that one.

utpostserver: is the UTPostServer web application.

HttpRequestAction.action: The VertiGIS Integrator has an action class integrated, meaning an interface is published for the HTTP request.

endpoint=HttpInTest: the endpoint is a mandatory parameter for the HTTP request. The HttpInTest is the name of the HTTP inbound service endpoint we set up in VertiGIS Integrator (in the Create an HTTP Inbound service endpoint segment).

-u USERNAME:PASSWORD: represents the username and password to authenticate in VertiGIS Integrator.

The username and password were set up in the tomcat-users.xml file. This file can be found in your \VertiGIS Integrator\apache-tomcat-9.0.87\conf folder. You can set up new usernames and passwords in the tomcat-users.xml file but you have to make sure your values match the CURL command. If you have previously set up the username and password for the SOAP exercise, you can use those values.

 

To send the CURL command:

1.In Windows Explorer, open the CMD console.

2.Paste the CURL command: curl --request POST --data "sap_id=1234&sap_name=New Station Name&x=390452.1528000012&y=5820230.3950999975" http://HOSTNAME.int.vertigis.com:8080/utpostserver/HttpRequestAction.action?endpoint=HttpInTest -u USERNAME:PASSWORD

httpincurl

Make sure the hostname and username + password match with the values on your local machine, respectively from System>About and the tomcat-users.xml file.

3.Click Enter to send the command. If the values are correct, the command is sent and a new line will be displayed.

Check the Protocol page in VertiGIS Integrator

The VertiGIS Integrator receives the HTTP request from the CURL command and converts it to a Request XML (check it in Message XML).

httpin

Afterward, the VertiGIS Integrator transforms this Request XML into VI XML via an XSLT transformation. You can find the matching sap_id=ASSETID=200, sap_name=ASSETNAME=New Station Name, the geometry (X&Y coordinates). The result is an electricity substation in the Utility Network, on layer 0 with assetgroup=200 and assetype=203.

httpinvixml

The VI XML is processed and sent to ArcGIS Server, which will create or update the feature service.

© 2024 VertiGIS GmbH. All Rights Reserved. | Privacy Center | Imprint
Documentation Version 10.0 (fa3b2a93)