PC Review


Reply
Thread Tools Rate Thread

ASP.NET Web Service newbie question

 
 
Hitesh Kanwathirtha
Guest
Posts: n/a
 
      9th Mar 2006
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

--

-Hitesh Kanwathirtha ((E-Mail Removed))
 
Reply With Quote
 
 
 
 
Mark
Guest
Posts: n/a
 
      9th Mar 2006
Have you thought of using late binding and just passing in an object instead
of an explicit reference to your tree object?

"Hitesh Kanwathirtha" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
> --
>
> -Hitesh Kanwathirtha ((E-Mail Removed))



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
windows service newbie question David C Microsoft C# .NET 2 29th Sep 2005 05:22 AM
Newbie Web Service question Bryan Dickerson Microsoft VB .NET 4 17th Jun 2005 01:49 PM
Newbie question - Service and NotifyIcon Jim Microsoft VB .NET 3 29th Sep 2004 03:28 PM
Really basic web service newbie question... Mark Rae Microsoft C# .NET 2 12th Jun 2004 11:17 PM
web service newbie dataset question Tim R. Microsoft ASP .NET 1 7th Jan 2004 02:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:37 PM.