コード例 #1
0
        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)), "", ""), ""));
        }
コード例 #2
0
 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);
 }
コード例 #3
0
 protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion)
 {
     writer.WriteValue(messageId);
 }
コード例 #4
0
 protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion)
 {
     writer.WriteString(action);
 }
コード例 #5
0
 protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion)
 {
     replyTo.WriteContentsTo(Version, writer);
 }