web service locks up when using an inherited class

Hi, has anyone seen this?

I'm using a basic class such as.

public class a

<XMLElement(type:=gettype(clsTestClass)), _
XMLElement(type:=getType(clsDerivedClass))>_
public a1 as clsTestClass

end class

DerivedClass inherits TestClass
Everything compiles correctly, but when I try to put a clsTestClass object in a1 and then use it to pass to a web service, the soap call freezes up apparently at theaccessorcollection.findaccessor call.

Putting a clsDerivedClass object in works fine.

I'm working around it by getting rid of the derived class and just adding it all to the base class, but it's bad form and a lot of rigamarole.

I.E.
dim aObj as new a
aObj.a1 = new clsTestClass
webservice.callSomeService(aObj) ' This locks Up.

dim aObj as new a
aObj.a1 = new clsDerivedClass
webservice.callSomeService(aObj) ' This Works.
Thanks
Bob

[935 byte] By [BadgerB] at [2007-12-16]
# 1
It is difficult for me to parse the above, but I think that you may be running into an issue that will require [XmlInclude].
douglasp at 2007-9-9 > top of Msdn Tech,.NET Development,ASMX Web Services and XML Serialization...

.NET Development

Site Classified