RTIXMLParser_validateOnStartTag:Parse error at line 62: Unexpected tag 'types'

3 posts / 0 new
Last post
Offline
Last seen: 3 years 5 months ago
Joined: 08/25/2020
Posts: 5
RTIXMLParser_validateOnStartTag:Parse error at line 62: Unexpected tag 'types'

Hi, I am working on the Web Integration Service Hello World Example located here: https://community.rti.com/static/documentation/connext-dds/5.2.3/doc/manuals/web_integration_service/tutorials.html on Windows 10

 

I'm getting the error: RTIXMLParser_validateOnStartTag:Parse error at line 62: Unexpected tag 'types'

                                RTIXMLParser_parseFromFile_ex:Parse error in file 'C:\Program Files\rti_connext_dds-6.0.0\resource\xml\RTI_WEB_INTEGRATION_SERVICE.xml'

 

when I run: "%NDDSHOME%/bin/rtiwebintegrationservice" -cfgName EmptyConfiguration

 

I went ahead and checked out the file referenced by the error(RTI_WEB_INTEGRATION_SERVICE.xml) and sure enough it has a tag called 'types'. Here's the file:

 

<!-- RTI Data Distribution Service Deployment -->
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/6.0.0/rti_web_integration_service.xsd">

<!-- Here we define ShapeType, which is the type associated with all
the Shape topics (i.e., Circles, Triangles, and Squares). -->
<types>
<const name="MAX_COLOR_LEN" type="long" value="128" />
<struct name="ShapeType">
<member name="color" key="true" type="string"
stringMaxLength="MAX_COLOR_LEN" />
<member name="x" type="long" />
<member name="y" type="long" />
<member name="shapesize" type="long" />
</struct>
</types>

<!-- Default QoS settings are defined under DefaultQosProfile. By default
all the entities will take this configuration. -->
<qos_library name="DefaultQosLib">
<qos_profile name="DefaultQosProfile"
is_default_qos="true">
<datareader_qos>
<!-- This property lets the readers be matched
with both XCDR and XCDR2 DataWriters. -->
<representation>
<value>
<element>XCDR_DATA_REPRESENTATION</element>
<element>XCDR2_DATA_REPRESENTATION</element>
</value>
</representation>
</datareader_qos>
<datawriter_qos>
<history>
<kind>KEEP_ALL_HISTORY_QOS</kind>
</history>
</datawriter_qos>
<participant_qos>
<database>
<shutdown_cleanup_period>
<sec>0</sec>
<nanosec>100000000</nanosec>
</shutdown_cleanup_period>
</database>
</participant_qos>
</qos_profile>

<qos_profile name="MonitoringLib"
base_name="BuiltinQosLib::Generic.Monitoring.Common">
</qos_profile>
</qos_library>

<domain_library name="ShapesDomainLibrary">
<domain name="ShapesDomain" domain_id="0">
<register_type name="ShapeType" type_ref="ShapeType" />
<topic name="Square" register_type_ref="ShapeType" />
</domain>
</domain_library>

<!-- Empty configuration -->
<web_integration_service name="EmptyConfiguration">
<types>  <-----This is line 62
<const name="MAX_NAME_LEN" type="long" value="64"/>
<const name="MAX_MSG_LEN" type="long" value="128"/>
<struct name="HelloWorld">
<member name="sender" type="string" key="true" stringMaxLength="MAX_NAME_LEN"/>
<member name="message" type="string" stringMaxLength="MAX_MSG_LEN"/>
<member name="count" type="long"/>
</struct>
</types>
</web_integration_service>

<!-- ShapesDemo Configuration. It creates all the necessary entities
to publish and subscribe to Squares. -->
<web_integration_service name="shapesDemoTutorial">
<application name="ShapesDemoApp">
<domain_participant name="MyParticipant"
domain_ref="ShapesDomainLibrary::ShapesDomain" >
<publisher name="MyPublisher">
<data_writer name="MySquareWriter" topic_ref="Square" />
</publisher>
<subscriber name="MySubscriber">
<data_reader name="MySquareReader" topic_ref="Square" />
</subscriber>
<participant_qos base_name="DefaultQosLib::MonitoringLib" />
</domain_participant>
</application>
</web_integration_service>
</dds>

 

The environment variable NDDSHOME has the value: C:\Program Files\rti_connext_dds-6.0.0

I was able to recreate the DDS tutorial in Java just fine which leads me to believe that my NDDSHOME variable is set correctly. 

Any ideas what might cause the error?

AttachmentSize
File rti_web_integration_service.xml3.65 KB
irene's picture
Offline
Last seen: 2 years 4 months ago
Joined: 11/08/2017
Posts: 15

Hi Jacob,

The error you are seeing is because the XML parse doesn't expect the tag "types" to be defined in the "web_integration" section. Types have to be defined at the same level than the "web_integration" tag. In fact, you already have the type defined at the beginning of the configuration file.

I recommend you to not modify the configuration files that are included in the Web Integration Service package. It is a better approach to create your own configuration file and command Web Integration Service to run that configuration file.  Web Integration Service will load the predefined ones (like the one that you are modifying) first and, them, the one that you have specify. A nexample of running using your own configuration file: 

$ rtiwebintegrationservice -cfgName EmptyConfiguration -cfgFile MyWebIntegrationConfigFile.xml

I would like add that you are reading the documentation for Connext 5.2.3 when you are using Connext 6.0.0, a newer version. Here you have the right link: https://community.rti.com/static/documentation/connext-dds/6.0.0/doc/manuals/web_integration_service/tutorials.html

I hope I've helped,

Irene

 

 

Offline
Last seen: 3 years 5 months ago
Joined: 08/25/2020
Posts: 5

Thank you very much! That fixed my problem!