[en] SoapFormatter for HTTP protocol setups no longer supported

Topics: Announcements
Coordinator
Aug 15, 2011 at 11:16 PM
Edited Aug 16, 2011 at 7:11 PM

Every protocol setup for HTTP configuration had a UseBinaryFormatter property, which was set to true by default. When set to false, the SoapFormatter was used instead of the BinaryFormatter. This property will not be supported anymore in all future Zyan releases (all after version 2.1). The reason is, that the SoapFormatter does not support generics and has other drawbacks. Many features of Zyan won´t work when using SoapFormatter.

I strongly recommend to use BinaryFormatter, but if you want to use the SoapFormatter anyway, please use the new ClientProtocolSetup and ServerProtocolSetup classes to build your own protocol setup and add the SoapFormatter manually.

example

 

// Client
var clientProtocol = new ClientProtocolSetup((settings, clientSinks, serverSinks) => new HttpChannel(settings, clientSinks, serverSinks))
						.AddClientSink(new SoapClientFormatterSinkProvider())
						.AddServerSink(new SoapServerFormatterSinkProvider() { TypeFilterLevel = TypeFilterLevel.Full });

// Server
var serverProtocol = new ServerProtocolSetup((settings, clientSinks, serverSinks) => new HttpChannel(settings, clientSinks, serverSinks))								 
						.AddServerSink(new SoapServerFormatterSinkProvider() { TypeFilterLevel = TypeFilterLevel.Full })
						.AddClientSink(new SoapClientFormatterSinkProvider());