
Originally Posted by
michi
Hi Karl, I've post a
patch for this problem. Please let me know how you go with that.
Cheers,
Michi.
There is now another issue with the generated code (in another part of my Slice) that does not allow it to compile. The problem is when a struct is mapped to a C# struct. The generated code does not initialize the struct when reading it from the stream. Here is the code generated - the function is the one called by IceInternal.DispatchStatus dispatch__(). I hope this is sufficient detail for you:
Code:
public static IceInternal.DispatchStatus GetPackagePubDates___(CommonServices obj__, IceInternal.Incoming inS__, Ice.Current current__)
{
checkMode__(Ice.OperationMode.Idempotent, current__.mode);
IceInternal.BasicStream is__ = inS__.istr();
string packageKey;
packageKey = is__.readString();
IServices2ICE.Date startDate; // = new IServices2ICE.Date();
startDate.read__(is__);
string classKey;
classKey = is__.readString();
AMD_CommonServices_GetPackagePubDates cb__ = new _AMD_CommonServices_GetPackagePubDates(inS__);
try
{
obj__.GetPackagePubDates_async(cb__, packageKey, startDate, classKey, current__);
}
catch(_System.Exception ex)
{
cb__.ice_exception(ex);
}
return IceInternal.DispatchStatus.DispatchAsync;
}
The type IServices2ICE.Date is a struct, and it should be initialized by calling the default struct constructor, see the comment in the code.
Because of the compile issue I haven't tested your patch yet, although the generated code looks OK for it.
Karl