Home Help Center

encoding error

changchang Member shen changOrganization: nasaProject: AMO HDU ✭✭


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

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    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'
    
  • changchang Member shen changOrganization: nasaProject: AMO HDU ✭✭
    it works. thanks
Sign In or Register to comment.