New Custom Adapter with Connector not giving options when adding as Input

2775
6
04-18-2014 05:44 AM
AaronSeidel
New Contributor
I am creating a custom Adapter (with connector) based on the NMEA adapter (needed additional fields and so forth). The issue is though that when I go to add the new adapter/connector in as an input for the Geo-event processor it just shows the name and none of the fields such as stream name or port.
The connector itself works fine if I choose a different adapter, so the issue would have to be with the adapter. One of the things I tried to do to see if it helped was to switch from the XML adapter definition to one defined in the code like in the samples.

Any ideas on what might cause this issue?

Thank you,
0 Kudos
6 Replies
RyanElliott
New Contributor III
Is the version number of the Adapter the same as the version number of the GeoEvent Processor?  Typically this (matching versions between Adapter and GEP) should not be required, but it can cause this odd missing property behavior you describe.

-Ryan
0 Kudos
AaronSeidel
New Contributor
I did try and change the version to 10.2.1, maybe I should try 10.2.0 as well.
Another thing I noticed is that when I edit the connector (which doesn't seem to take the settings in the code) to the correct adapter and hit save, when I go back in to edit again it will have changed the adapter back to JSON (the first in the list).
0 Kudos
AaronSeidel
New Contributor
As an update, changing the version number didn't make a difference in this case.
0 Kudos
AaronSeidel
New Contributor
I figured I would attach the Connector/Adapter information as that might help you figure things out.

GeoEventDefinition complex = new DefaultGeoEventDefinition();

complex.setName("SGCustom");
complex.setOwner("StrataGIS");


List<FieldDefinition> topLevelFields = new ArrayList<FieldDefinition>();
topLevelFields.add(new DefaultFieldDefinition("DeviceId",
  FieldType.String, "TRACK_ID"));
topLevelFields.add(new DefaultFieldDefinition("TimeStamp",
  FieldType.Date, "TIME_START"));
topLevelFields.add(new DefaultFieldDefinition("Shape",
  FieldType.Geometry, "GEOMETRY"));
topLevelFields.add(new DefaultFieldDefinition("Validity",
  FieldType.String));
topLevelFields.add(new DefaultFieldDefinition("Speed",
  FieldType.Double));
topLevelFields.add(new DefaultFieldDefinition("Course",
  FieldType.Double));
topLevelFields.add(new DefaultFieldDefinition("Variation",
  FieldType.Double));
topLevelFields.add(new DefaultFieldDefinition("EastWest",
  FieldType.String));
topLevelFields.add(new DefaultFieldDefinition("VehicleId",
  FieldType.String, "VEHICLE_ID"));

complex.setFieldDefinitions(topLevelFields);

geoEventDefinitions.put(complex.getName(), complex);

Uri adapterUri = new Uri();
adapterUri.setDomain("com.stratagis.geoevent.customadapter");
adapterUri.setName("StrataGIS");
adapterUri.setVersion("0.0.1");

Uri transportUri = new Uri();
transportUri.setDomain("com.esri.ges.transport.inbound");
transportUri.setName("UDP");
transportUri.setVersion("10.2.1");

Connector newConnector = new Connector("StrataGIS", "stratagis-in",
  ConnectorType.inbound, adapterUri, transportUri,
  "StrataGIS Connector",
  "This connector works with the custom coded devices from StrataGIS");


ConnectorProperty portProperty = new ConnectorProperty(
  Source.transport, "port", "1721", "Communication Port ");


newConnector.addShownProperty(portProperty);

connectors.add(newConnector);
0 Kudos
MingZhao
New Contributor III
The problem with not seeing properties on the input or output page is usually caused by mis-matched uri of an adapter or a transport between what the input page sees and what the connector says.  Looking at the connector code, you are defining a uri with "com.stratagis.geoevent.customadapter", "StrataGIS", and "0.0.1".  The first part is the domain, the 2nd part is the name of the component and the 3rd is the version.  Are these the correct definitions used in your custom adapter?  Another way to check if they are correct is to create a new connector with this custom adapter.  Look a the connector xml and see what it says.  Also, if you discard the connector that is installed with your adapter and create a brand new one, would you be able to see the input properties?
0 Kudos
AaronSeidel
New Contributor
After talking with our contact at ESRI the adapter is now showing the options when adding it as an input. It appears that it was largely due to the URI of the project oddly enough.
Thank you for the help
0 Kudos