Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 498999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:56:26+00:00 2026-05-13T05:56:26+00:00

I am trying to call a webservice using WCF that uses the following encoding:

  • 0

I am trying to call a webservice using WCF that uses the following encoding:

<?xml version="1.0" encoding="ISO-8859-1" ?> 

I cannot change the encoding for this webservice. I have generated a wcf proxy and when I try and call the proxy, I get the following error:

FailedSystem.ServiceModel.ProtocolException:
The content type text/xml;
charset=ISO-8859-1 of the response
message does not match the content
type of the binding (text/xml;
charset=utf-8). If using a custom
encoder, be sure that the
IsContentTypeSupported method is
implemented properly.

Has anyone any idea how I call a webservice that is not UTF-8 using wcf?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:56:26+00:00Added an answer on May 13, 2026 at 5:56 am

    You cannot do this out of the box in WCF – unfortunately.

    I faced the same issue, and came up with a custom binding (either in config or in code) that you can use. It’s based on HTTP transport, and if that’s of help to you, I could post the custom config here, or send you a link to the C# code for the binding.

    This MSDN page here shows how to create a “CustomTextEncoder” which can support more than utf-8, utf-16 and unicode encodings. It includes full sample source code and was very useful for me to get things going.

    This blog post here shows some additional things to take into account when trying to get that custom text encoder to work properly.

    Hope that helps.

    Marc

    UPDATE:
    Based on the Microsoft sample I mentioned above for a CustomTextEncoder, you can easily create a custom binding with a ISO-8859-1 text message encoding – just use this snippet of config (assuming you have downloaded and compiled and referenced that Microsoft sample):

      <system.serviceModel>
        <extensions>
          <bindingElementExtensions>
            <add name="customTextMessageEncoding"
                 type="Microsoft.ServiceModel.Samples.CustomTextMessageEncodingElement, 
                       Microsoft.ServiceModel.Samples.CustomTextEncoder"/>
          </bindingElementExtensions>
        </extensions>
        <bindings>
          <customBinding>
            <binding name="ISO8859Binding" >
              <customTextMessageEncoding encoding="ISO-8859-1" />
              <httpTransport />
            </binding>
          </customBinding>
        </bindings>
    
        <client>
          <endpoint name="Test"
                    address="......."
                    binding="customBinding"
                    bindingConfiguration="ISO8859Binding" 
                    contract="IYourContract" />
        </client>
      </system.serviceModel>
    

    You can find that code, plus a ISO88591Binding that basically wraps this whole config into code, on my Skydrive directory WCF ISO 8859-1 Encoding. Watch out, though – this is based on my requirements I had at the time, e.g. my service I needed to talk to required https, and also some other a bit whacky settings, so you might need to tweak those or make them configurable in config, if needed. That ISO88591Binding” project also contains a netHttpBinding that again is a Microsoft-provided sample which I used to get the hang of writing my own custom binding in code.

    Writing a custom binding in WCF is definitely possible – but not really for the faint of heart….

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Calling a webservice that uses ISO-8859-1 encoding from WCF I am trying
I'm trying to call a php webservice using WCF. I googled some public php
I am playing around trying to call a simple SOAP webservice using the following
Hi I am trying to call a webService in titanium using json. That webService
I am trying to call a webservice hosted on the local network using https
I am trying to invoke webservice using jquery ajax call. I am using jasonp
I am trying to send SMS using a webservice call. But am having errors
I am trying to access a WCF web service, that is using two way
I am currently trying to create a webservice in a winform application using WCF,
I've got a WSE 3.0 web service that I'm trying to call using a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.