To all,
Has anyone had any experience with remoting collections derived from
CollectionBase ?
My server has an exposed method that accepts a collection derived from
CollectionBase. Once I compile the server code, I run the soapsuds tool
over the assembly to extract a proxy that can then be referenced from my
client.
However, the soapsuds tool barfs when it processes the collection with
the following message "Error: Invalid schema data., Value cannot be
null. Parameter name: key"
Note: The CollectionBase base class is marked as serializable.
Any ideas ???
I have included a sample collection and the output of the soapsuds
below.
regards
scott
----SAMPLE COLLECTION----
using System;
using System.Collections;
namespace Test
{
[Serializable]
public class SimpleClass
{
public SimpleClass()
{
// Implementation not shown
}
}
[Serializable]
public class SimpleClassCollection : CollectionBase
{
public SimpleClassCollection()
{
// Implementation not shown
}
// IList implementation
public int Add(SimpleClass element)
{
int index = -1;
// Implementation not shown
return index;
}
new public void Clear()
{
// Implementation not shown
}
public bool Contains(SimpleClass element)
{
bool contains = false;
// Implementation not shown
return contains;
}
public int IndexOf(SimpleClass element)
{
int index = -1;
// Implementation not shown
return index;
}
public void Insert(int index, SimpleClass element)
{
// Implementation not shown
}
public void Remove(SimpleClass element)
{
// Implementation not shown
}
new public void RemoveAt(int index)
{
// Implementation not shown
}
// ICollection implementation
public void CopyTo(Array array, int index)
{
// Implementation not shown
}
// IEnumerable implementation
new public IEnumerator GetEnumerator()
{
IEnumerator enumerator = null;
// Implementation not shown
return enumerator;
}
}
}
----SOAPSUDS OUTPUT----
C:\SoapSuds.exe -types:Test.SimpleClassCollection,Test -oa:Proxy.dll
===========================
LineNum : 17
NodeType : 1
Name : complexType
Namespace : http://www.w3.org/2001/XMLSchema
Prefix :
Hasvalue : False
IsEmpty : True
Depth : 3
AttributeCount: 2
=========================
AttributeName: name
Prefix :
Namespace :
Value : SimpleClassCollection
=========================
AttributeName: base
Prefix :
Namespace :
Value : ns1:CollectionBase
Error: Invalid schema data., Value cannot be null.
Parameter name: key
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.