Search code examples
c#web-servicestomtom

c# client application can't consume tomtom connect webservice


I have to write a windows application in c# which application is able to consume said webservice. I am using VS2010 with .Net 4

I added the service reference and the code compiles without any error, but when i run it i get a ProtocolException with the text:

The content type "multipart/related; type="application/xop+xml"; boundary="----=_Part_0_159582014.1283501395804"; start=""; start-info="application/soap+xml"" of the response does not match the binding (application/soap+xml; charset=utf-8)

When i try it with a VB sample provided by the developers of the webservice everything works fine.

Im totally lost here, googled since yesterday, came up with nothing... Anyone knows whats the problem there?


Solution

  • Ok finally figured it out.

    You need to manually edit the app.config file of your application and change all occurences of "textMessageEncoding" to "motmMessageEncoding" that will do the trick