Please note that this question pertains to the .NET Core implementation of WCF Connected Services.
I am porting a regular .NET WCF client over to .NET Core, but I ran into this issue:
The content type text/xml; charset="utf-8" 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. The first 1024 bytes of the response were:
'<?xml version='1.0' encoding='UTF-8'?> [...]
The response indeed contains the quotes:
HTTP/1.1 200 Ok
content-type: text/xml; charset="utf-8"
I never did anything special to handle this in WCF proper. Is this a bug in the .NET Core version, or is it just really specific about the content type (utf-8 vs "utf-8")?
How can I change the expected content type to match the service I'm calling? (I have no control over that, but I can copy and alter the WSDL if needed).
I'm using a svcutil-generated client. (Connected Service)