>I am getting following error:
>
[quoted text clipped - 12 lines]
>
> Is this expected? If so, are there any workarounds?
This is expected. The classes on the client side are proxy classes only -
they are not meant to be the same as the server-side classes. Their only
purpose is to make it easier for you to call the web methods exposed by the
server.
In fact, if you ever get a situation with ASMX web services where you have
the same class on the client and the server, then you've almost certainly
made a very serious mistake.

Signature
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
william - 27 Feb 2008 18:23 GMT
Hi John,
I've went through similar steps as Rahul, which is that I created a class by
using xsd.exe, I have a web service which return this serialized class. I
declared a variable as this class, and assign the return value of my web
service to the variable, I got compiling error "Cannot implicitly convert
type MyWebServiceTest.MyService.GetUserInfoResponseGetUserInfoResult to
User".
How can I get result from my web service?
Thanks.
William
> >I am getting following error:
> >
[quoted text clipped - 21 lines]
> the same class on the client and the server, then you've almost certainly
> made a very serious mistake.
John Saunders [MVP] - 28 Feb 2008 00:11 GMT
> Hi John,
> I've went through similar steps as Rahul, which is that I created a class
[quoted text clipped - 6 lines]
>
> How can I get result from my web service?
William, that error message you posted seems to be cut off. Surely the
message doesn't end with the word "User".

Signature
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
william - 29 Feb 2008 22:00 GMT
Hi John,
Actually my class name is "User", I declares a type as "User" on client
side, and tried to assign the return value of web service to it.Thanks.
William
> > Hi John,
> > I've went through similar steps as Rahul, which is that I created a class
[quoted text clipped - 9 lines]
> William, that error message you posted seems to be cut off. Surely the
> message doesn't end with the word "User".
John Saunders [MVP] - 01 Mar 2008 23:13 GMT
> Hi John,
>
> Actually my class name is "User", I declares a type as "User" on client
> side, and tried to assign the return value of web service to it.Thanks.
Ok, but it looks like the proxy class (on the client) is returning type
MyWebServiceTest.MyService.GetUserInfoResponseGetUserInfoResult. I bet this
type has a property inside of it with the type User.

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