I try to use the StreamAccessor method with a WCF service.
public Stream EntityStream(Guid id) {byte[] text = Encoding.UTF8.GetBytes("I love Microsoft");returnnew MemoryStream(text); }
<MethodIsStatic="false"Name="EntityStream"><Parameters><ParameterDirection="In"Name="id"><TypeDescriptorTypeName="System.Guid"IdentifierName="Id"Name="id"/></Parameter><ParameterDirection="Return"Name="EntityStreamParameter"><TypeDescriptorTypeName="System.IO.Stream"Name="EntityStreamDescriptor"/></Parameter></Parameters><MethodInstances><MethodInstanceType="StreamAccessor"ReturnParameterName="EntityStreamParameter"Name="EntityStreamMethodInstance"ReturnTypeDescriptorPath="EntityStreamDescriptor"DefaultDisplayName="Download Entity File"><Properties><PropertyName="MimeType"Type="System.String">text/plain</Property><PropertyName="FileName"Type="System.String">microsoft.txt</Property><PropertyName="MaxFileSizeInKB"Type="System.Int32">1000</Property></Properties></MethodInstance></MethodInstances></Method>
I tested the service with a console app and it worked wonderfully well.
Using the Business Data List WebPart and BCS all I get is "Failed to retrieve data from the External System: 'Error - No content exists for this field.'"
Looks like StreamAccessor is not supported for WCF... is this true, or am I doing something wrong?