> Hi,
> I am new to web service and I have a class called Pair like this:
[quoted text clipped - 21 lines]
>
> Can someone tell me why?
Web services don't process objects - they process XML. The service is
described by a WSDL, and the WSDL uses XML Schema to describe the XML to be
sent and received.
XML Schema has no way to describe generics.
When you "have a web service that returns a Pair<int,DataSet>", .NET will
produce a WSDL that includes an XML Schema that describes an XML complexType
named PairOfInt32DataSet. When you create proxy classes for your client
using Add Web Reference, .NET will create the proxy class PairOfIntDataSet,
as you have seen.
If you were consuming this web service from a platform other than .NET,
things would be even worse, as the .NET class "DataSet" does not exist on
platforms other than .NET.
So, two things:
1) What you see is the expected behavior. Platform-specific types will not
translate across web services
2) It is a bad idea to pass DataSet objects or other platform-specific
types, as they will not translate across platforms.

Signature
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer