Custom ServiceObject Question - SoType.File?????

  •  11-20-2007, 9:27 AM

    Custom ServiceObject Question - SoType.File?????

    Hi,

    I've followed Jason Apergis's excellent blog post on creating cutom SmartObject Services (found here).

    In my service I want the ServiceObject to have a property of type File, but I can't seem to figure out which Type to use for the value. Here's what I've got:

                Property propData = new Property();
                propData.Name = "FileData";
                propData.MetaData.DisplayName = "FileData";
                propData.MetaData.Description = "File Data";
                propData.Type = "System.IO.MemoryStream";
                propData.SoType = SoType.File;
                so.Properties.Add(propData);

    With the Type set to System.IO.MemoryStream, it throws an exception stating "Timeouts are not supported on this stream".

    I've tried byte[] and System.Object, but it throws this exception:
    [FormatException: Data format for SmartFileProperty type incorrect. [FileData]] SourceCode.SmartObjects.Client.SmartFileProperty.GetRuntimeData(String value) +550 

    Does anyone know how exactly to use a ServiceObject Property of type SoType.File?

    Thanks.

     

View Complete Thread