/// <summary> /// Specify the details about a fault. /// </summary> /// <param name="code">The fault code. <see cref="Soap11FaultCode"/>.</param> /// <param name="faultString">The fault string.</param> /// <param name="faultActor">The fault actor.</param> /// <param name="detailEntries">A collection of fault detail XML entries.</param> /// <returns>The SOAP 1.1 Envelope Builder.</returns> public ISoap11EnvelopeBuilder SetFault(Soap11FaultCode code, string faultString, string faultActor, IEnumerable <XContainer> detailEntries) { this.ValidateBodyForSettingAFault(); this.BodyElement.Add(Soap11Maker.CreateSoapFault(code, faultString, faultActor, detailEntries)); return(this.envelopeBuilder); }
/// <summary> /// Specify the details about a fault. /// </summary> /// <param name="code">The fault code. <see cref="Soap11FaultCode"/>.</param> /// <param name="faultString">The fault string.</param> /// <param name="faultActor">The fault actor.</param> /// <returns>The SOAP 1.1 Envelope Builder.</returns> public ISoap11EnvelopeBuilder SetFault(Soap11FaultCode code, string faultString, string faultActor) { this.ValidateBodyForSettingAFault(); this.BodyElement.Add(Soap11Maker.CreateSoapFault(code, faultString, faultActor)); return(this.envelopeBuilder); }
public ISoap11EnvelopeBuilder AddAction(string action) { XContainer actionBlock = Soap11Maker.CreateSoapHeaderActionBlock(action); this.HeaderElement.Add(actionBlock); return(this.envelopeBuilder); }
private void ValidateBodyForAddingAnEntry(XContainer entry) { if (Soap11Maker.HasFault(this.bodyElement)) { throw new InvalidOperationException("Cannot add the body entry because a fault has already been specified."); } if (Soap11Maker.HasFault(entry)) { this.ValidateBodyForSettingAFault(); } }
public ISoap11EnvelopeBuilder SetCustomSoapEncoding(string soapEncodingNamespace) { Soap11Maker.SetSoapEncodingAttribute(this.BodyElement, soapEncodingNamespace); return(this.envelopeBuilder); }
public ISoap11EnvelopeBuilder SetStandardSoapEncoding() { Soap11Maker.SetSoapEncodingAttribute(this.BodyElement, Soap11Constants.SoapEncodingStandardNamespace.NamespaceName); return(this.envelopeBuilder); }
public XContainer Build() { return(Soap11Maker.CreateSoapEnvelope(this.headerBuilder?.Build(), this.bodyBuilder?.Build())); }