예제 #1
0
 public WSAddressing10ProblemHeaderQNameFault(ActionMismatchAddressingException e)
 {
     _invalidHeaderName = AddressingStrings.Action;
     _code = FaultCode.CreateSenderFaultCode(
         new FaultCode(Addressing10Strings.ActionMismatch, AddressingVersion.WSAddressing10.Namespace));
     _reason = new FaultReason(new FaultReasonText(e.Message, CultureInfo.CurrentCulture.Name));
     _actor  = "";
     _node   = "";
 }
예제 #2
0
        // protected ActionNotSupportedException(SerializationInfo info, StreamingContext context) : base(info, context) { }

        internal Message ProvideFault(MessageVersion messageVersion)
        {
            Fx.Assert(messageVersion.Addressing != AddressingVersion.None, "");
            FaultCode code   = FaultCode.CreateSenderFaultCode(AddressingStrings.ActionNotSupported, messageVersion.Addressing.Namespace);
            string    reason = Message;

            return(Channels.Message.CreateMessage(
                       messageVersion, code, reason, messageVersion.Addressing.FaultAction));
        }
예제 #3
0
        public WSAddressing10ProblemHeaderQNameFault(MessageHeaderException e)
        {
            _invalidHeaderName = e.HeaderName;

            if (e.IsDuplicate)
            {
                _code = FaultCode.CreateSenderFaultCode(
                    new FaultCode(Addressing10Strings.InvalidAddressingHeader,
                                  AddressingVersion.WSAddressing10.Namespace,
                                  new FaultCode(Addressing10Strings.InvalidCardinality,
                                                AddressingVersion.WSAddressing10.Namespace)));
            }
            else
            {
                _code = FaultCode.CreateSenderFaultCode(
                    new FaultCode(Addressing10Strings.MessageAddressingHeaderRequired,
                                  AddressingVersion.WSAddressing10.Namespace));
            }

            _reason = new FaultReason(new FaultReasonText(e.Message, CultureInfo.CurrentCulture.Name));
            _actor  = "";
            _node   = "";
        }