webservice encoding error

  • Thread starter Thread starter Stuart Eastland
  • Start date Start date
S

Stuart Eastland

I am trying to call a webservice method from a CF VB project.
The call returns a System.InvalidOperationException with the following
message:
"Server found request content type to be 'text/html; charset=utf-8',
but expected 'text/xml'."

My web project has the following globalisation setting:
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />

Can anyone tell me how to ensure that the call to the webservice uses
the correct encoding?

Thanks,

Stuart Eastland
 
I probably should have said that my webservice method takes two parameters,
one is a DateTime and one is a Dataset. I guess the serialisation of the
Dataset is causing the problem but I don't know how to correct it.
I have successfully tested the Math Webservice from the GotDotNet samples.
Thanks,
Stuart
 
OK - I was confused by the message test.
This was actually caused by a typo in the webservice url so my call was
never reaching the webserver. It's been a frustrating day but I'm moving
forwards now.

Stuart Eastland
 
Back
Top