Remote Routing Service configuration of content filter

5 posts / 0 new
Last post
Offline
Last seen: 6 years 10 months ago
Joined: 07/12/2012
Posts: 51
Remote Routing Service configuration of content filter

I am trying to remotely change the configuration service. In particular, the content filter must be changed. However, the routing service

reports a syntax error that cannot be explained by the available documentation. I created the XML string but eventually resorted to using

rtirssh to eliminate the possiblility of errors in the application software, but the error is still the same.

The rtirssh command used is (routing service is disabled) :

update FaceBossSurfaceRouting UP_ROUTE_section01::UGToSurfaceSession::ContinuousIORoute_99_to_Surface auto_topic_route.input.content_filter.expression="machineId=1111"

and the resulting command send is the routing service

id:
host: -1062699164
app: 14320
invocation: 20
target_router: "FaceBossSurfaceRouting"
command:
_d: RTI_ROUTING_SERVICE_COMMAND_UPDATE
entity_desc:
name: "UP_ROUTE_section01::UGToSurfaceSession::ContinuousIORoute_99_to_Surface"
xml_url:
is_final: true
content: "str://"<auto_topic_route><input><content_filter><expression> machineId=1111
</expression></content_filter></input></auto_topic_route>""

However, the routing service reports:

ROUTERCfgFileDomainRoute_onEndElement:Parse error at line 10: missing <connection_1> or <participant_1> tag
RTIXMLParser_parseFromString:error parsing XML string
DDS_XMLParser_parse_from_string:Error parsing string
ROUTERCfgFileParser_parseXmlString:error parsing configuration file 'xml string'
ROUTERService_updateEntity:!parse xml code snippet
ROUTERService_onUpdateEntity:!update entity

The command looks OK, at least according to the available documentation.  The error message refers to possible missing tags.

In the router configuration, the topic route is not even enclosed by any of the two tags lised in the error message.

What is the correct syntax to update a content filter ?

 

Thanks

Nico.

 

Organization:
rose's picture
Offline
Last seen: 3 years 5 months ago
Joined: 08/22/2011
Posts: 148

Hello Nico, 

That syntax should work correctly, and I am running some tests to confirm.  Would it be possible to attach the lines near "line 10" in your XML, or the lines surrounding the <participant_1> tag in your original XML?  

Edit: I have run a test with the shapes demo and a Routing Service, and it works correctly.  I have attached the XML.  (I grabbed the XML from this example, so it has extraneous comments and type definitions in it).

I publish shapes data in domain 5 and I subscribe in domain 0.

The command I run to start the Routing Service is:

"c:\Program Files\rti\5.0.0\RTI_Routing_Service_5.0.0\scripts\rtiroutingservice.bat" -cfgFile Routing-UDP-LAN.xml -cfgName Router2

The commands I send in the shell (domain 3) are

RTI Routing Service> disable Router2

RTI Routing Service> update Router2 DataDomain::SessionForward::TemperatureForwa rd auto_topic_route.input.content_filter.expression="color='BLUE'"

RTI Routing Service> enable Router2

Thank you,

Rose 

File Attachments: 
Offline
Last seen: 6 years 10 months ago
Joined: 07/12/2012
Posts: 51

Hi Rose,

Thank you for looking at this, but at this time, please do not spend more time on this until I can provide more consistent  information. My results vary

at the moment. However, in short the problem seems related to whether the domain route is loaded dynamically (with remote command) or statically (routing

service is started with the domain route already in a config file).

If I load the domain route dynamically, the content filter cannot be adjusted and the XML parse error is the result. However, if I delete the entity (auto_topic_route)

and reload it, the content filter can be adjusted after that.

If the router is started with a 'static' configuration, the content filter can also be adjusted without a problem.

I will post more consistent results if it becomes available.

Thanks

Nico.

 

Offline
Last seen: 6 years 10 months ago
Joined: 07/12/2012
Posts: 51

Hi Rose,

After some more testing, my conclusion is that the Routing service behave differently between when:

1. A domain route is loaded remotely, and

2. The domain route is loaded conventionally at startup.

The behaviour is different in terms of adjusting the content filter.

However, I decided to run the example you used and issued the same commands, but got a parser error when the content filter is adjusted. I am using

version 5.0.0.9 of the Routing Service - maybe that is the difference. Below is the output of rtirssh commands, followed by the Routing Service response.

---------------------------------------- rtirssh session---------------------------------------------------------------------------------

RTI Routing Service> disable Router2
Result: routing service disabled OK
RTI Routing Service> update Router2 DataDomain::SessionForward::TemperatureForward auto_topic_route.input.content_filter
.expression="color='BLUE'"
Error: error parsing XML document
RTI Routing Service>

-------------------------------------------------Routing Service response---------------------------------------------------------------------------------------------------

C:\RTI_work\Examples\DataSubsetWAN\ExampleCode\scripts>StartRouterUDPLAN.bat Router2
Loading C:\RTI\RTI_Routing_Service_5.0.0.9\resource\xml\RTI_ROUTING_SERVICE.xml
Loading Routing-UDP-LAN.xml
Adapter plugin LOADED OK: rtidds (version 5.0.0)
[DataDomain] Domain route STARTED [dds(5) <=> dds(0)]
ROUTERService_start:Service started OK (name=Router2, group_name=RTI_RoutingService_JUSE4813_2924)
Remote configuration enabled on domain 3
RTI Routing Service 5.0.0 started (with name Router2)
ROUTERService_stop:Stopping service
[DataDomain] Domain route STOPPED
ROUTERXmlSnippetAdapterExtCls_onStartElement:Parse error at line 2: Unexpected initial tag
RTIXMLParser_parseFromString:error parsing XML string
ROUTERXmlSnippetAdapter_translate:!XML snippet preprocessing failure
ROUTERService_updateEntity:!parse snippet
ROUTERService_onUpdateEntity:!update entity

Thanks

Nico.

 

rose's picture
Offline
Last seen: 3 years 5 months ago
Joined: 08/22/2011
Posts: 148

Hello Nico, 

I will try to reproduce the problem – at the same time, can you use -verbosity 5 and let me know what the output is?  That should give some additional information about the XML that is sent. 

Edit: I am not having any luck in reproducing the problem, even with version 5.0.0.9.  I think that having the verbosity data may give a hint.  Also, if you use the RTI Admin Console it can show you the current configuration that the Routing Service thinks it has loaded (including any dynamically-loaded parts).  That may help track down why it thinks the XML is malformed.

Rose