+2006-12-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * SoapProtocolImporter.cs : since Soap12Binding is derived from
+ SoapBinding, extra care in IsBindingSupported() is needed.
+
2006-12-14 Atsushi Enomoto <atsushi@ximian.com>
* SoapProtocolImporter.cs : if the importer is SOAP12, initialize
protected override bool IsBindingSupported ()
{
+#if NET_2_0
+ object o = Binding.Extensions.Find (typeof(SoapBinding));
+ return o != null && !(o is Soap12Binding);
+#else
return Binding.Extensions.Find (typeof(SoapBinding)) != null;
+#endif
}
[MonoTODO]
public override string ProtocolName {
get { return "Soap12"; }
}
+
+ protected override bool IsBindingSupported ()
+ {
+ return Binding.Extensions.Find (typeof(Soap12Binding)) != null;
+ }
}
#endif
}
+2006-12-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * HttpSoapWebServiceHandler.cs,
+ SoapHttpClientProtocol.cs : support application/soap+xml.
+
2006-12-04 Atsushi Enomoto <atsushi@ximian.com>
* AnyReturnReader.cs : not sure why, but the build must have been
string soapAction = null;
string ctype;
Encoding encoding = WebServiceHelper.GetContentEncoding (request.ContentType, out ctype);
+#if NET_2_0
+ if (ctype != "text/xml" && ctype != "application/soap+xml")
+#else
if (ctype != "text/xml")
+#endif
throw new WebException ("Content is not XML: " + ctype);
object server = CreateServerInstance ();
//
string ctype;
Encoding encoding = WebServiceHelper.GetContentEncoding (response.ContentType, out ctype);
- if (ctype != "text/xml")
+ string expectedCType =
+#if NET_2_0
+ (message.SoapVersion == SoapProtocolVersion.Soap12 ? "application/soap+xml" : "text/xml");
+#else
+ "text/xml";
+#endif
+ if (ctype != expectedCType)
WebServiceHelper.InvalidOperation (
- "Content is not 'text/xml' but '" + response.ContentType + "'",
+ String.Format ("Content is not '{0}' but '{1}'", expectedCType, response.ContentType),
response, encoding);
message.ContentType = ctype;