Archived

This forum has been archived. Please start a new discussion on GitHub.

encoding error



Hi all

I could not understand why I got this error after I set the Ice.EncodingVersion = 1.0


initData.properties.setProperty("Ice.EncodingVersion", "1.0");

string ipv6 = initData.properties.getProperty("Ice.IPv6"); //this is "0"

string encoding = initData.properties.getProperty("Ice.EncodingVersion"); //this is "1.0"

m_communicator = Ice.Util.initialize(initData);

//this get error, the error msg says it is 1.1 but I set it to 1.0 before initial it

//error: unsupported encoding version: 1.1(can only support encodings compatible with version 1.1)


m_TopicManagerPrx = IceStorm.TopicManagerPrxHelper.checkedCast(m_communicator.propertyToProxy(m_ProxyPropert));

//this ok
m_TopicManagerPrx = IceStorm.TopicManagerPrxHelper.checkedCast(m_communicator.propertyToProxy(m_ProxyPropert).ice_encodingVersion(new EncodingVersion(1, 0)));

Comments

  • xdm
    xdm La Coruña, Spain
    There isn't "Ice.EncodingVersion" property there is "Ice.Default.EncodingVersion"

    Using the wrong names should produce a warning, unless you have disabled warnings by setting Ice.Warn.UnknownProperties to 0
    warning: unknown property: `Ice.EncodingVersion'
    
  • it works. thanks