Input connector for xml?

6611
9
12-17-2013 06:02 AM
LloydLochridge
New Contributor
Has anyone created a custom input connector for xml that you are willing to share?  I have looked at the ArcGIS GeoEvent Processor Developer Guide and while it appears possible, it is above my technical expertise.
0 Kudos
9 Replies
DennisGeasan
Occasional Contributor II
Look at the samples in the SDK.  I think one of those is for reading XML.

Recently I accidently set the Generic JSON input URL to an XML source and it successfully read the source.

DG
0 Kudos
LloydLochridge
New Contributor
Did not work for me but thanks for the responce.
0 Kudos
SimonJackson
Occasional Contributor III
Is there a compiled Connector that polls a website for XML?
Or perhaps an adapter I can import and build a connector using it within the GEP manager?
0 Kudos
RJSunderman
Esri Regular Contributor
The development team is prototyping a generic XML adapter for the 10.3 product release. If you have specific XML examples you would like to make sure GeoEvent Processor can handle, please post them as attachments to this thread so that we can evaluate them against the requirments we've developed and discuss specifics with you as needed.
0 Kudos
DebraVian_Brown
New Contributor

Hello -- Has there been a "generic" XML adapter created for GeoEvent?  Thank you...

0 Kudos
RJSunderman
Esri Regular Contributor

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

SimonJackson
Occasional Contributor III

Did you resolve why you were getting the 406 error?

Have same error when trying to hook into this XML feed

http://realtimedata.water.nsw.gov.au/wgen/sites.rs.anon.xml 

0 Kudos
GregoryChristakos
Esri Contributor

Hello Simon,

I know I am a bit late to the discussion here but I wanted to provide a response in case someone else comes across this discussion. The issue with the 406 error looks to be due to the acceptable MIME type included in the HTTP request header.

By default, the "Poll An External Website for XML" input connector defines the default acceptable MIME type as "application/xml". This MIME type isn't always defined on the web server and therefore isn't acceptable for (hence the 406). As a result, it is up to us to change the acceptable MIME type to something the external web server recognizes in order to issue a 'successful' request (I emphasize successful since the request is in fact valid.. it's just not what the web server wants or recognizes). With external XML sources, I have had success with changing the acceptable MIME type to text/xml, application/xhtml+xml, etc. I would recommend reviewing the MIME types available for XML and changing the acceptable MIME type in ArcGIS GeoEvent Server from application/xml as needed.

In situations where we have direct access to the web server hosting the XML, a different solution to this problem would be to define the MIME type on the web server to use application/xml (ArcGIS GeoEvent Server's default). In Microsoft IIS for example (installed with the ArcGIS Web Adaptor), we can see that the default MIME type for .xml extensions is text/xml. If we wanted to, we could change the default MIME type in Microsoft IIS from text/xml to application/xml for .xml extensions. With this change in place, we wouldn't need to adjust the acceptable MIME type default in ArcGIS GeoEvent Server (however we could if we wanted to hence the previous paragraph).

The key takeaway here is to pay close attention to the MIME types being used. Sometimes what ArcGIS GeoEvent Server uses by default isn't what the web server recognizes and vice versa. Hope this helps!

0 Kudos