H
Hitesh Kanwathirtha
Apologies in advance if this is a stupid question but I'm
just starting to learn ASP.NET.
So I have a bunch of classes that are in a class library.
One of them happens to be a Tree class. Now, I wish to have
a WebMethod (lets call it foo) which takes in this Tree class
as a parameter. I added a reference to the DLL which contains
the class library and just made the parameter for foo.
The WebService project built without any errors.
Now, in the client side code consuming the service, I added a
reference to the exact same DLL. I also added a reference to
the WebService, and did a call to foo, passing in the tree.
However, this code doesn't compile, as it seems to be expecting
a different type of tree. My understanding is it expects an object
of Tree that is defined in the wsdl file generated. Casting
between the two trees doesn't help either.
I'm not sure what to do here. I can't seem to convince the C#
compiler that the Tree type that foo wants is the same as the
one that I'm giving it.
I'm pretty sure I'm in this pickle because of my lack of
understanding of how web services work, so any help would be
greatly appreciated.
Thanks,
Hitesh
just starting to learn ASP.NET.
So I have a bunch of classes that are in a class library.
One of them happens to be a Tree class. Now, I wish to have
a WebMethod (lets call it foo) which takes in this Tree class
as a parameter. I added a reference to the DLL which contains
the class library and just made the parameter for foo.
The WebService project built without any errors.
Now, in the client side code consuming the service, I added a
reference to the exact same DLL. I also added a reference to
the WebService, and did a call to foo, passing in the tree.
However, this code doesn't compile, as it seems to be expecting
a different type of tree. My understanding is it expects an object
of Tree that is defined in the wsdl file generated. Casting
between the two trees doesn't help either.
I'm not sure what to do here. I can't seem to convince the C#
compiler that the Tree type that foo wants is the same as the
one that I'm giving it.
I'm pretty sure I'm in this pickle because of my lack of
understanding of how web services work, so any help would be
greatly appreciated.
Thanks,
Hitesh