public ISoap12EnvelopeBuilder SetFault(Soap12FaultCode code, XNamespace subCodeNamespace, string subCode, string reason, string reasonXmlLanguage, string node, string role, IEnumerable <XContainer> detailEntries)
        {
            this.ValidateBodyForSettingAFault();

            this.BodyElement.Add(Soap12Maker.CreateSoapFault(code, subCodeNamespace, subCode, reason, reasonXmlLanguage, node, role, detailEntries));
            return(this.envelopeBuilder);
        }
        public ISoap12EnvelopeBuilder SetFault(Soap12FaultCode code, XNamespace subCodeNamespace, string subCode, string reason, string reasonXmlLanguage, string node)
        {
            this.ValidateBodyForSettingAFault();

            this.BodyElement.Add(Soap12Maker.CreateSoapFault(code, subCodeNamespace, subCode, reason, reasonXmlLanguage, node));
            return(this.envelopeBuilder);
        }
        public ISoap12EnvelopeBuilder SetFault(Soap12FaultCode code, string subCode, string reason)
        {
            this.ValidateBodyForSettingAFault();

            this.BodyElement.Add(Soap12Maker.CreateSoapFault(code, subCode, reason));
            return(this.envelopeBuilder);
        }
        public ISoap12EnvelopeBuilder AddAction(string action)
        {
            XContainer actionBlock = Soap12Maker.CreateSoapHeaderActionBlock(action);

            this.HeaderElement.Add(actionBlock);
            return(this.envelopeBuilder);
        }
        private void ValidateBodyForAddingAnEntry(XContainer entry)
        {
            if (Soap12Maker.HasFault(this.bodyElement))
            {
                throw new InvalidOperationException("Cannot add the body entry because a fault has already been specified.");
            }

            if (Soap12Maker.HasFault(entry))
            {
                this.ValidateBodyForSettingAFault();
            }
        }
 public ISoap12EnvelopeBuilder SetCustomSoapEncoding(string soapEncodingNamespace)
 {
     Soap12Maker.SetSoapEncodingAttribute(this.BodyElement, soapEncodingNamespace);
     return(this.envelopeBuilder);
 }
 public ISoap12EnvelopeBuilder SetStandardSoapEncoding()
 {
     Soap12Maker.SetStandardSoapEncodingAttribute(this.BodyElement);
     return(this.envelopeBuilder);
 }
 public ISoap12EnvelopeBuilder SetStandardSoapEncoding()
 {
     Soap12Maker.SetSoapEncodingAttribute(this.HeaderElement, Soap12Constants.SoapEncodingStandardNamespace.NamespaceName);
     return(this.envelopeBuilder);
 }
 public XContainer Build()
 {
     return(Soap12Maker.CreateSoapEnvelope(this.headerBuilder?.Build(), this.bodyBuilder?.Build()));
 }