Esempio n. 1
0
        static void TestSoapBody(WS.SoapBodyBinding soap, bool soap12, TestLabel label)
        {
            label.EnterScope("soap-body");
            var type = soap12 ? typeof(WS.Soap12BodyBinding) : typeof(WS.SoapBodyBinding);

            Assert.That(soap.GetType(), Is.EqualTo(type), label.Get());
            Assert.That(soap.Encoding, Is.Empty, label.Get());
            Assert.That(soap.Namespace, Is.Empty, label.Get());
            Assert.That(soap.Parts, Is.Null, label.Get());
            Assert.That(soap.Use, Is.EqualTo(WS.SoapBindingUse.Literal), label.Get());
            label.LeaveScope();
        }
 private void Write99_SoapBodyBinding(string n, string ns, SoapBodyBinding o, bool isNullable, bool needType)
 {
     if (o == null)
     {
         if (isNullable)
         {
             base.WriteNullTagLiteral(n, ns);
         }
     }
     else
     {
         if (!needType && !(o.GetType() == typeof(SoapBodyBinding)))
         {
             throw base.CreateUnknownTypeException(o);
         }
         base.WriteStartElement(n, ns, o, false, null);
         if (needType)
         {
             base.WriteXsiType("SoapBodyBinding", "http://schemas.xmlsoap.org/wsdl/soap/");
         }
         if (o.Required)
         {
             base.WriteAttribute("required", "http://schemas.xmlsoap.org/wsdl/", XmlConvert.ToString(o.Required));
         }
         if (o.Use != SoapBindingUse.Default)
         {
             base.WriteAttribute("use", "", this.Write98_SoapBindingUse(o.Use));
         }
         if ((o.Namespace != null) && (o.Namespace.Length != 0))
         {
             base.WriteAttribute("namespace", "", o.Namespace);
         }
         if ((o.Encoding != null) && (o.Encoding.Length != 0))
         {
             base.WriteAttribute("encodingStyle", "", o.Encoding);
         }
         base.WriteAttribute("parts", "", o.PartsString);
         base.WriteEndElement(o);
     }
 }