|
POST
|
Hello Sharon - What you are trying to do is definitely possible. I'm limited in my options for sending data to GeoEvent via TCP ... basically I have to use the GeoEvent Simulator ... but I can walk through what I did with you. The GeoEvent Simulator normally sends delimited text, specifically comma separated values. But that's not some hard-coded property or behavior. We could use it to send XML - we would just have to configure a GeoEvent input to expect the data to arrive via TCP and couple the TCP transport with the XML adapter so the input would know how to interpret the data. I've attached an input file (FeatureFlightsXML.csv) you can use as an example. Ignore the *.csv extension ... it's only there because the GeoEvent Simulator is looking for files named *.csv ... the file contains XML with each event on a separate line. This is necessary because the Simulator is sending data one line of text at a time, so we have to account for that. <Flight><FlightNumber>SWA2706</FlightNumber><StartTime>3/16/2012 02:25:30 PM</StartTime><OriginAirportCode>IAD</OriginAirportCode><DestinationAirportCode>TPA</DestinationAirportCode><AircraftType>B733</AircraftType><Altitude>37000</Altitude><Longitude>-79.585739</Longitude><Latitude>34.265521</Latitude></Flight>
<Flight><FlightNumber>SWA724</FlightNumber><StartTime>3/16/2012 02:25:30 PM</StartTime><OriginAirportCode>IAD</OriginAirportCode><DestinationAirportCode>ABE</DestinationAirportCode><AircraftType>SF34</AircraftType><Altitude>10000</Altitude><Longitude>-76.405289</Longitude><Latitude>39.573271</Latitude></Flight>
<Flight><FlightNumber>SWA992</FlightNumber><StartTime>3/16/2012 02:25:30 PM</StartTime><OriginAirportCode>IAD</OriginAirportCode><DestinationAirportCode>MDW</DestinationAirportCode><AircraftType>B737</AircraftType><Altitude>36400</Altitude><Longitude>-82.067414</Longitude><Latitude>39.630957</Latitude></Flight>
<Flight><FlightNumber>SWA2358</FlightNumber><StartTime>3/16/2012 02:25:30 PM</StartTime><OriginAirportCode>TPA</OriginAirportCode><DestinationAirportCode>IAD</DestinationAirportCode><AircraftType>B733</AircraftType><Altitude>37000</Altitude><Longitude>-81.20226</Longitude><Latitude>32.099263</Latitude></Flight> I've also attached a GeoEvent configuration file (Xml-to-JSON-Config.xml) which has a custom inbound connector I configured, pairing the XML adapter with the TCP transport. The configuration includes three inputs: one expects delimited text via tcp, one expects to receive XML via a REST endpoint, and the third is my custom input which expects XML via TCP. The output included in the configuration expects to be able to write generic JSON to a file it can create in the C:\GeoEvent\output folder on your local server. The GeoEvent Service XML-to-JSON feeds data from each input to the file-json-out output. Its the job of the adapters of each input to create GeoEvents from the data they receive. The output will deconstruct each GeoEvent to create generic JSON and will write that JSON to the system file. The tcp-text-in input is what I used to verify that I can use the GeoEvent Simulator to send XML. I created a GeoEvent Definition with a single field of type String. When I send an event from the simulator to TCP port 5565, the tcp-text-in input interprets the received data using the Text adapter and brings the data in as one long String. The rest-xml-in input is what I used to verify that I was sending valid XML. I configured this input to create a GeoEvent Definition for me. When I select any one line of data from the simulation file and HTTP / POST it to the rest-xml-in input's endpoint, I can verify that the received data can be interpreted using the XML adapter by seeing a GeoEvent get created and written out to the system file. The custom-xml-via-tcp input is what you're looking for. I configured this input to use TCP port 5566 (rather than the default 5565). So all I have to do is tell the GeoEvent Simulator to disconnect from the default port and reconnect on port 5566 ... then I can send the same event data one line at a time to the custom input, which will interpret the received data using the XML adapter, create GeoEvents, and write the data out to the system file. Hope this helps - RJ
... View more
09-15-2015
05:19 PM
|
0
|
1
|
1640
|
|
POST
|
Hello Adriana - I was assuming that you were using the Esri/geoevent-datastore-proxy. Is this true, or are you using the Esri/resource-proxy? The former was developed specifically for GeoEvent users who are unable to adopt the latest release of GeoEvent. Specifically it provides token management for ArcGIS Server connections registered with GeoEvent as Data Stores. Users who must remain at the 10.2.2 or 10.3.0 release who need functionality built-in to the GeoEvent 10.3.1 release can find what they need by using the GeoEvent Data Store proxy. If you're using the .NET version of the "resource-proxy" to enhance a web application, I don't think we'll be able to help; this forum is specific to the use of the ArcGIS GeoEvent Extension for Server. If you're using the GeoEvent Data Store proxy, but are not using GeoEvent, that would be an unsupported configuration. Either way, the GeoEvent product team does not have the experience you are looking for. I think you are correct that this may be a security, proxy, JavaScript API related problem. You might have better luck if you take your question to another forum. Perhaps: ArcGIS API for JavaScript, or Web AppBuilder for ArcGIS. or Web AppBuilder Custom Widgets Good Luck - RJ
... View more
09-15-2015
03:40 PM
|
0
|
0
|
2518
|
|
POST
|
Hello Gal - http://www.ims.gov.il/ims/PublicXML/observ.xml I'm not seeing any problem with the XML returned from the above URL. The GeoEvent's XML adapter is able to parse it just fine. I've attached illustrations of my 'Receive XML on a REST Endpoint' input configuration and the generated GeoEvent Definition. I chose to have the adapter look specifically for <surface_station> nodes, rather than receiving the <israel_surface_data> structure in as a single event. I used a Chrome Poster plug-in to HTTP / POST the attached XML to the GeoEvent input's REST endpoint. What I did notice was that, when using a 'Poll an External Website for XML' input, there were errors logged by the HTTP inbound transport to the effect that requests to http://www.ims.gov.il/ims/PublicXML/observ.xml returned an HTTP 406 'Not Acceptable' error. 2015-09-15 11:50:58,156 | ERROR | gov.il/ims/PublicXML/observ.xml] | HttpInboundTransport | nsport.http.HttpInboundTransport 456 | 272 - com.esri.ges.framework.transport.http-transport - 10.3.1 | http://www.ims.gov.il/ims/PublicXML/observ.xml: Request failed (HTTP/1.1 406 Not Acceptable). I'll ask to see if one of the developers can tell me why the request to your server are being returned as 'Not Acceptable', but it doesn't appear to be an issue with the XML formatting or content. - RJ
... View more
09-15-2015
12:27 PM
|
2
|
2
|
5207
|
|
POST
|
Lloyd - If you navigate to Site > GeoEvent > Connectors and search for "XML" ... you are not seeing the following two inbound connectors? These should be out-of-the-box at the 10.3.0 release. What do you see when browsing to the URL https://localhost:6143/geoevent/manager/version.txt (You should see the product version 10.3.0.4322) Are you able to locate the XML adapter's JAR file (xml-adapter-10.3.0.jar) down beneath the framework? C:\Program Files\ArcGIS\Server\GeoEvent\system\com\esri\ges\framework\adapter\xml-adapter\10.3.0 - RJ
... View more
09-15-2015
11:44 AM
|
0
|
0
|
762
|
|
POST
|
Hello Darryl - I don't have any references for you of someone who has developed a custom adapter for handling a response from a request made on a SOAP service. GeoEvent is fundamentally RESTful, meaning that we interact with services using REST requests. You might take a look at the thread Is it possible to send a SOAP request with GeoEvent? For background, here's what I know about the differences between REST and SOAP. In a REST query you might have some JSON (JavaScript Object Notation) in the body of the request, but often you do not. This is because everything you need to communicate to the service being queried is contained in the request’s URL as parameters. In this way a REST call is sort of like invoking a function with parameters you pass in the function call. SOAP is fundamentally different. It is XML based – as opposed to REST which more “object-oriented”, using JSON “objects” to pass information. When making a SOAP request you always have some sort of XML body which contains the authentication and request parameters. You get back an XML response which you then have to parse. SOAP fell out of favor primarily because XML parsing is considered expensive. A JSON response from a REST service request would, of course, have some sort of header. But the response is primarily a single object or a list of objects expressed as JSON. This object (or list of objects) returned from your request is something GeoEvent would consider an event (or a list of events). XML can also be used to represent an event or a list of events – and we introduced the XML adapter in the 10.3 product release to handle that sort of message content. So a SOAP / XML response might be something the XML adapter out-of-the-box could parse, but since the XML is not “object-oriented” (like what we usually see with JSON) there is going to be quite a lot of work needed to delve into the XML response you receive and pull out the event data you are looking for. The amount of work required would probably make using an out-of-the-box GeoEvent Service filters and processors impractical. You would probably need to develop a custom processor if you wanted to process a SOAP response to extract event data within a GeoEvent Service. Alternatively you could develop a custom adapter to parse the SOAP / XML response and construct a set of GeoEvents your adapter would then pass into your GeoEvent Service for some basic filtering and/or processing. Which brings us back to your original question, has anyone done this? So … the recommendation is to avoid services which use SOAP. In addition to a custom processor or custom adapter you will probably also have to develop a custom transport to handle service polling, since you will need to construct the XML body the SOAP service expects to authenticate and communicate your request. This is definitely not something you can just configure GeoEvent to do. More than likely it is going to be a development project in which you use the GeoEvent SDK to develop custom components and extend the product to support SOAP – not in general – but for a specific service which you want to poll for data. Hope this information helps - RJ
... View more
09-10-2015
05:24 PM
|
2
|
2
|
2495
|
|
POST
|
Hello Adriana - Are you using a GeoEvent output -- either the Add a Feature output or the Update a Feature output -- to make edits to your feature service? If so, you can review the Debugging the Add a Feature / Update a Feature Output Connectors blog to see how to configure GeoEvent to log debug messages which should tell you something about the JSON being sent in the requests to Server and the responses returned from Server. If you are not using GeoEvent and the application you are developing is making its own requests on a feature service's .../FeatureServer/0/addFeatures or .../FeatureServer/0/updateFeatures REST endpoint, you might want to ask your question on the Web AppBuilder for ArcGIS forum. Someone there can provide you advice on developing your web application. Hope this information helps - RJ
... View more
09-10-2015
05:02 PM
|
0
|
2
|
2518
|