[Mono-bugs] [Bug 689080] MessageHeader.GetUntypedHeader throw exception
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Apr 22 02:32:02 EDT 2011
https://bugzilla.novell.com/show_bug.cgi?id=689080
https://bugzilla.novell.com/show_bug.cgi?id=689080#c2
Atsushi Enomoto <aenomoto at novell.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Atsushi Enomoto <aenomoto at novell.com> 2011-04-22 06:32:01 UTC ---
I could not reproduce this issue. It is likely already fixed in git master and
mono-2-10 tree. Here is the code with which I verified:
----
using System;
using System.ServiceModel;
using System.ServiceModel.Channels;
public class Test
{
public static void Main ()
{
var b = new BasicHttpBinding ();
var e = new EndpointAddress ("http://localhost:8080");
var host = new ServiceHost (typeof (MyService));
host.AddServiceEndpoint (typeof (IMyService), b,
new Uri ("http://localhsot:8080"));
host.Open ();
try {
var cf = new ChannelFactory<IMyService> (b, e);
var ch = cf.CreateChannel ();
var msg = Message.CreateMessage (MessageVersion.Soap11,
"http://tempuri.org/IMyService/Request", "My Body");
var value = "TestHeader1";
var header = new MessageHeader<string> (value);
var h2 = header.GetUntypedHeader ("HeaderName", "http://tempuri.org/");
msg.Headers.Add (h2);
ch.Request (msg);
} finally {
host.Close ();
}
}
}
[ServiceContract]
public interface IMyService
{
[OperationContract]
void Request(System.ServiceModel.Channels.Message msg);
}
public class MyService : IMyService
{
public void Request (Message msg)
{
Console.WriteLine (msg);
}
}
----
I'm closing this as FIXED. Please reopen with repro test case if this still
happens (with the latest master or mono-2-10 branch).
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list