WSE306: FramingFormatException

by Geert 9. January 2008 10:41

For one of my clients, I needed to develop a web service inside a windows service. Developing the windows service is fairly simple since I used WSE. I developed the web service so it used a soap.tcp procotol. When using a C# client, everything worked fine.

However, the client already developed a server component (let's call it broker) in C++ and gSOAP. When connecting to the web service via gSOAP (or any other 3rd party non-WSE method). One of the problems I walked into was:

WSE306: The DIME record should have the following version: 1. Instead, the DIME record contained the following version:

There are more people that are having this error, but no one seems to know the solution. So, I decided to convert the protocol to http by using the HTTP.SYS transport developed by Aaron Skonnard. This way, I was able to get more information on the error that occurred since I was able to see the exact data that was sent to the web service.

Now, I noticed that WSE was unable to send the message directly to the service, and therefore generated the exception mentioned above. The exact problem were the addressing headers. WSE requires WS-Addressing headers to be sent, but "normal" soap-messages do not contain these headers.

For gSOAP, the solution is fairly simple: read this article on how to enable WS-Addressing in gSOAP.

Now, I was able to add the required WS-Addressing headers. Finally, I was able to fix the strange (and until now unsolved) exception WSE306: FramingFormatException. It is simply because the WS-Addressing headers are missing!

The only thing for me to do now is to convert the protocol back to soap.tcp instead of http. However, the first results are bad: it seems that other tools are unable to communicatie using soap.tcp.

kick it on DotNetKicks.com

Tags:

C# | Web Services

Comments are closed

About the Author

Geert van Horrik is an independent freelance software developer since January 1st, 2007. Since then he was been working on several projects from C++ to C# (WPF, Silverlight, ASP.NET, etc). Currently he loves to write his software using WPF (or Silverlight if WPF isn't an option).

Lately, Geert is spending a lot of time on Catel, a free open-source MVVM Framework for WPF and Silverlight. Actually, it's more than "just" an MVVM Framework, it's a complete application library!