You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
committed by
Jo Shields
parent
aa7da660d6
commit
c042cd0c52
@@ -120,7 +120,7 @@ namespace System.ServiceModel.Channels
|
||||
{
|
||||
VerifyMessageVersion (message);
|
||||
|
||||
using (var xw = XmlDictionaryWriter.CreateBinaryWriter (stream, Constants.SoapDictionary, session ? CurrentWriterSession : null))
|
||||
using (var xw = XmlDictionaryWriter.CreateBinaryWriter (stream, Constants.SoapDictionary, session ? CurrentWriterSession : null, false))
|
||||
message.WriteMessage (xw);
|
||||
}
|
||||
|
||||
|
@@ -125,9 +125,7 @@ namespace System.ServiceModel.Channels
|
||||
//web_request.UseDefaultCredentials = false;
|
||||
}
|
||||
|
||||
#if !NET_2_1 // FIXME: implement this to not depend on Timeout property
|
||||
web_request.Timeout = (int) timeout.TotalMilliseconds;
|
||||
#endif
|
||||
|
||||
// There is no SOAP Action/To header when AddressingVersion is None.
|
||||
if (message.Version.Envelope.Equals (EnvelopeVersion.Soap11) ||
|
||||
@@ -190,6 +188,7 @@ namespace System.ServiceModel.Channels
|
||||
if (hp.SuppressEntityBody)
|
||||
suppressEntityBody = true;
|
||||
}
|
||||
|
||||
#if !NET_2_1
|
||||
if (source.ClientCredentials != null) {
|
||||
var cred = source.ClientCredentials;
|
||||
@@ -205,9 +204,7 @@ namespace System.ServiceModel.Channels
|
||||
if (buffer.Length > int.MaxValue)
|
||||
throw new InvalidOperationException ("The argument message is too large.");
|
||||
|
||||
#if !NET_2_1
|
||||
web_request.ContentLength = (int) buffer.Length;
|
||||
#endif
|
||||
|
||||
web_request.BeginGetRequestStream (delegate (IAsyncResult r) {
|
||||
try {
|
||||
@@ -217,9 +214,7 @@ namespace System.ServiceModel.Channels
|
||||
web_request.BeginGetResponse (GotResponse, result);
|
||||
} catch (WebException ex) {
|
||||
switch (ex.Status) {
|
||||
#if !NET_2_1
|
||||
case WebExceptionStatus.NameResolutionFailure:
|
||||
#endif
|
||||
case WebExceptionStatus.ConnectFailure:
|
||||
result.Complete (new EndpointNotFoundException (new EndpointNotFoundException ().Message, ex));
|
||||
break;
|
||||
|
@@ -31,7 +31,6 @@ using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Xml;
|
||||
using System.Xml.Schema;
|
||||
using Mono.Xml.XPath;
|
||||
|
||||
namespace System.ServiceModel.Channels
|
||||
{
|
||||
@@ -259,9 +258,16 @@ namespace System.ServiceModel.Channels
|
||||
WriteBodyContents (body);
|
||||
}
|
||||
|
||||
var nt = new NameTable ();
|
||||
var nsmgr = new XmlNamespaceManager (nt);
|
||||
nsmgr.AddNamespace ("s", Version.Envelope.Namespace);
|
||||
nsmgr.AddNamespace ("a", Version.Addressing.Namespace);
|
||||
var pc = new XmlParserContext (nt, nsmgr, null, XmlSpace.None);
|
||||
|
||||
var rs = new XmlReaderSettings ();
|
||||
rs.ConformanceLevel = ConformanceLevel.Auto;
|
||||
return XmlDictionaryReader.CreateDictionaryReader (XmlReader.Create (new StringReader (sw.ToString ()), rs));
|
||||
|
||||
return XmlDictionaryReader.CreateDictionaryReader (XmlReader.Create (new StringReader (sw.ToString ()), rs, pc));
|
||||
}
|
||||
|
||||
protected abstract void OnWriteBodyContents (
|
||||
|
Reference in New Issue
Block a user