public override Stream ChainStream(Stream stream)
{
oldStream = stream;
newStream = new MemoryStream();
return newStream;
}
我使用soap extension想对soap消息进行操作。
在BeforeDeserialize阶段,oldStream是HTTPInputStream,而且数据接收正常
但是在AfterSerialize阶段,oldStream接受到的stream是下面这种情况stream:{System.Web.Services.Protocols.SoapExtensionStream}
System.MarshalByRefObject:{System.Web.Services.Protocols.SoapExtensionStream} System.MarshalByRefObject
CanRead:<error: an exception of type: {System.InvalidOperationException} occurred> bool
CanSeek:<error: an exception of type: {System.InvalidOperationException} occurred> bool
CanWrite:<error: an exception of type: {System.InvalidOperationException} occurred> bool
Length:<error: an exception of type: {System.InvalidOperationException} occurred> long
Null:{System.IO.Stream.NullStream} System.IO.Stream
Position:<error: an exception of type: {System.InvalidOperationException} occurred> long从而我在AfterSerialize阶段触发的事件中,就无法在oldStream中写入任何数据,请高手指明名路啊!!!!!!!以上都在web service服务段运行!!
如果不是单步执行,则客户端报错:The root element is missing