web reference custom object return type is cast to DataSet in .NET 2.0

Posts   
 
    
mkamoski avatar
mkamoski
User
Posts: 116
Joined: 06-Dec-2005
# Posted on: 23-May-2006 18:54:46   

All--

Please help.

I was dismayed that when I added a web reference custom object return type is cast to DataSet in .NET 2.0.

This was the behaviour in .NET 1.1.

I was told that they fixed this in .NET 2.0 and that WSDL would recognize a custom type and would not simply cast every uknown type to a DataSet when it generates the proxy class.

So... I know that I can fix the proxy class by hand... but then I cannot autogenerate the proxy class because manual changes will be overwritten... so then I will have to manage the proxy class manually which will take a lot of time... and I don't want to return a DataSet... and I don't want to return a String... and I don't want to return an XmlNode... because what I really need to do is return a specific custom object type... so, what is the solution here?

Thoughts?

Please advise.

Thank you.

--Mark Kamoski

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 23-May-2006 20:18:33   

for 1.0.2005.1, download the temporary additional templates from the 3rd party section to get the classes generated. In v2 (now in beta) this is build in.

Frans Bouma | Lead developer LLBLGen Pro
mkamoski avatar
mkamoski
User
Posts: 116
Joined: 06-Dec-2005
# Posted on: 25-May-2006 14:51:07   

All--

FWIW, note the following from MSDN...

Web Services IXmlSerializable Technology Sample

This sample shows how to use IXmlSerializable to control the serialization of custom types in ASP.NET Web Services.

http://msdn2.microsoft.com/en-US/library/h2byscsb.aspx

...so, that is worth checking out, if someone is interested.

I am guessing; but, I think that this is the same sort of thing that the LLBLGen Templates With Web Service Support do in order to solve this issue.

I just thought I would mention it.

HTH.

Thank you.

--Mark Kamoski