public CoreWCF.Channels.Message Untyped_Method(CoreWCF.Channels.Message msgIn) { CoreWCF.Channels.MessageVersion mv = OperationContext.Current.IncomingMessageHeaders.MessageVersion; string faultToThrow = "Test fault thrown from a service"; if (msgIn != null) { throw new FaultException <string>(faultToThrow); } return(CoreWCF.Channels.Message.CreateMessage(mv, CoreWCF.Channels.MessageFault.CreateFault(new FaultCode("Sender"), new FaultReason("Unspecified ServiceModel Fault"), "unspecified", new System.Runtime.Serialization.DataContractSerializer(typeof(string)), "", ""), "")); }
protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion) { /* * if ((object)relationship != (object)ReplyRelationshipType) * { * // The RelationshipType attribute has no namespace. * writer.WriteStartAttribute(AddressingStrings.RelationshipType, AddressingStrings.Empty); * writer.WriteString(relationship.AbsoluteUri); * writer.WriteEndAttribute(); * } */ writer.WriteValue(messageId); }
protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion) { writer.WriteValue(messageId); }
protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion) { writer.WriteString(action); }
protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion) { replyTo.WriteContentsTo(Version, writer); }