我无法使用接受 Stream 对象的肥皂 UI 测试 WCF 服务方法。这是服务方法作为输入参数的对象:
[DataContract(Namespace = Constants.NAMESPACE)]
public class RemoteFileInfo : IDisposable
{
[DataMember(IsRequired = true, Order = 1)]
public string FileName { get; set; }
[DataMember(IsRequired = true, Order = 2)]
public long Length { get; set; }
[DataMember(IsRequired = true, Order = 3)]
public System.IO.Stream FileByteStream { get; set; }
public void Dispose()
{
if (FileByteStream != null)
{
FileByteStream.Close();
FileByteStream = null;
}
}
}
在soap UI中生成的请求:
...
<ws:File>
<ws:FileName>?</ws:FileName>
<ws:Length>?</ws:Length>
<ws:FileByteStream>
<sys:__identity>?</sys:__identity>
</ws:FileByteStream>
</ws:File>
我需要在soap UI 中做什么来测试这个方法?