コード例 #1
0
            private static XmlElement ConvertSoapFaultBinding(XmlElement src, EnvelopeVersion version)
            {
                XmlElement element;

                if (src != null)
                {
                    if (version == EnvelopeVersion.Soap12)
                    {
                        if (src.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/soap12/")
                        {
                            return(src);
                        }
                        goto Label_003F;
                    }
                    if (version == EnvelopeVersion.Soap11)
                    {
                        if (src.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/soap/")
                        {
                            return(src);
                        }
                        goto Label_003F;
                    }
                }
                return(null);

Label_003F:
                element = SoapHelper.CreateSoapFaultBinding(version);
                if (src.HasAttributes)
                {
                    foreach (System.Xml.XmlAttribute attribute in src.Attributes)
                    {
                        element.SetAttribute(attribute.Name, attribute.Value);
                    }
                }
                return(element);
            }
コード例 #2
0
 private void ExportFaultBinding(FaultDescription fault, bool isEncoded, OperationBinding operationBinding)
 {
     SoapHelper.CreateSoapFaultBinding(fault.Name, this.endpointContext, this.endpointContext.GetFaultBinding(fault), isEncoded);
 }