You can change the content type of the response in any method on your WCF web service using the WebOperationContext class.
Just as an example the following code shows how to use this class to set the content-type to application/xml and return a UTF-8 encoded stream:
[ServiceContract]
public interface IPolicyProvider
{
[OperationContract, WebGet(UriTemplate = "/ClientAccessPolicy.xml")]
Stream ProvidePolicy();
}
public sealed class StockService : IPolicyProvider
{
public Stream ProvidePolicy()
{
WebOperationContext.Current.OutgoingResponse.ContentType = "application/xml";
return new MemoryStream( Encoding.UTF8.GetBytes(File.ReadAllText("ClientAccessPolicy.xml")) , false);
}
}
If you're interested this example is for the purpose of enabling cross-domain calls for Silverlight clients in a self-hosted WCF web service, have a look here for more and I have a code download attached to this post.
In your situation, for the response from your WCF service you would set the content type to be application/soap+xml and use UTF-8.
The WebOperationContext class is in the System.ServiceModel.Web assembly and is part of .NET Framework 3.5.
Hope this helps.