Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Putting a Hashtable values into a Queue using a Web Service


Message #1 by "Piyush Prakash" <piyush_prakash@i...> on Thu, 9 Jan 2003 13:59:29 +0530
Hi all,
I have implemented a class which has a property which returns a
Hashtable.

Code is something like this :
	public class OrderInfo
	{
		private Hashtable orderDetails =3D new Hashtable();

		public ICollection Values
		{
			get
			{
				return orderDetails.Values;
			}
		}
	.............
	..............
	}

I have written a Web Service which puts this value (Hashtable) into a
Queue(MSMQ) after formatting it using XmlMessageFormatter. Code for this
is something like this :
	[WebMethod]
		public void SendOrder(OrderInfo tmpOrder)
		{
			MessageQueue OrderQ =3D new
MessageQueue(".\\Private$\\Orders");
=09
((XmlMessageFormatter)OrderQ.Formatter).TargetTypeNames =3D new
String[]{"BPLib.OrderInfo"};
			OrderQ.Send(tmpOrder,"Order Submission");
		}

Am getting the following error.

"You must implement a default accessor on System.Collections.ICollection
because it inherits from ICollection. "

I've tried other formatters like BinaryMessageFormatter As well...

Please help.

Regds,
Piyush
piyush_prakash@i...

  Return to Index