Error Loading String QoS Profile from Java

2 posts / 0 new
Last post
Offline
Last seen: 5 years 10 months ago
Joined: 03/17/2015
Posts: 10
Error Loading String QoS Profile from Java

Hi All,

I need to load QoS profile from a static String field defined like:


  String profileQosPolicyEmulator="<dds><qos_library name=\"InitialPeers\"><qos_profile name=\"DefaultProfilex\"><participant_qos>"+
                     "<discovery><initial_peers><element>builtin.udpv4://10.0.2.2</element></initial_peers></discovery>" +            
            "</participant_qos>"+
             "</qos_profile>"+
            "</qos_library>"+            
             "<property>" +
             "<value><element><name>dds.transport.UDPv4.builtin.public_address</name>" +
             "<value>127.0.0.1</value></element>" +
             "</value>" +
             "</property>" +
             "</dds>";

 DomainParticipantFactoryQos factoryQos = new DomainParticipantFactoryQos();
        
        DomainParticipantFactory factory = DomainParticipantFactory.get_instance();
        
        factory.get_qos(factoryQos);
   
    
        factoryQos.profile.string_profile.add("str://"+profileQosPolicyEmulator);
        factory.set_qos(factoryQos);

I have obtained the following errors:

RTIXMLParser_parseFromString:Parse error at line 1: not well-formed (invalid token)
DDS_XMLParser_parse_from_string:Error parsing string

DDS_QosProvider_load_profiles_from_string_sequenceI:ERROR: loading profiles

DDS_QosProvider_load_profiles_from_policyI:ERROR: loading profiles

DDS_QosProvider_load_profilesI:ERROR: loading profiles

DDS_DomainParticipantFactory_load_profilesI:!load profiles

Who could help me?

thanx in advance.

Manuel

Offline
Last seen: 5 years 10 months ago
Joined: 03/17/2015
Posts: 10

I have resolved the issue:

String ProfileQosPolicyEmulator="<dds><participant_library name=\"libparticipant\"><domain_participant name=\"domainpart\">"+
            "<participant_qos name=\"partqos\"><discovery><initial_peers><element>builtin.udpv4://10.0.2.2</element></initial_peers>" +
             "</discovery><property><value><element><name>dds.transport.UDPv4.builtin.public_address</name>" +
             "<value>127.0.0.1</value></element></value></property>" +            
            "</participant_qos></domain_participant></participant_library>"+            
            "</dds>";

In Android Addendum Manual is not specified the correct structure.

bye
MAnuel