A DIME for your Country
Monday, April 5th, 2004 | .NET, Development
Lately at work I have been on a project where we needed to implement a web service client. A part of this client is accepting a series of files passed as DIME attachments. Since .NET doesn’t implement this on its own we had to dig forth the Microsoft WSE 1.0 library, which features a series of extensions to the normal web service programming support.
To understand the full conundrum let us back up a bit. Part of the receival of the documents is an enum with the name of the document type. Since we’re in Denmark and the web service is by another Danish company we do, of course, have some localised names with æ, ø and å in them — e.g. Lånebevilling. Now this is all great as long as we just remember to use utf-8
or iso-8859-1
as the charset type… or is it?
Using the DIME classes is fairly straightforward and not overly difficult so we were taken slightly aback when our web service client notified us that it had caught a Deserialization exception from the SOAP message — namely System.InvalidOperationException: ‘??’ is not a valid value for ResponseType.
. With this extremely obvious error message I went spelunking in the badlands of the WSE1.0 implementation. After fruitless hours of looking through the disassembled code of the Microsoft.Web.Services.Dime namespace I sought help with the SOAP 3.0 toolkit and inserted a trace listener to see what actually went across the wire.
After about a days’ work pondering why it just didn’t work I came across an unsuspecting Encoding.ASCII.GetString call in the backlands of the Soap Deserializer. As the client very kindly tells me then å
isn’t an ASCII character. Disappointed we were faced with two options: write our own DIME implementation or get our external partner to stop using locale specific characters. Neither a truly pleasing solution.
So to round all of this off then in this case the implementation doesn’t give a DIME about your country or its letters. Just keep to ASCII and everyone will be happy. Pity.
No comments yet.
Leave a comment
Categories
Archives
- April 2010
- November 2009
- October 2009
- June 2009
- May 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- December 2006
- November 2006
- October 2006
- September 2006
- June 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- June 2004
- April 2004
- February 2004
- November 2003
- January 2003
- November 2002