Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2006

Tip: Looking for answers? Try searching our database.

Passing an [in] parameter to an asp.net web service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mehdi - 13 Aug 2006 19:22 GMT
Hi,
Consider a class that I need to serialize and send over the wire. On
the receiving end, the serialization bytes have to be re-constructed to
form the object. The mentioned class has got some member variables and
one or more constructors.

[WebMethod()]
public void Test(MyClass c) {}

The question is that is there anyway to control the proxy-generation
for the MyClass class? i.e, how am I supposed to force the
proxy-generator to generate the constuctors? Or should I add the
required constructors on the client side using the partial keyword?
What's the best thing to do when you want to pass a one-way informative
parameter (ie., no functionality embedded except for the constructors)
to a web method?

I would like the client side to create the object normally as follows:

MyWebService.MyClass c = new MyWebService.MyClass(param1, param2);
MyWebService.Test(c);

Is there anyway to achieve such functionality?

TIA,
Mehdi
Lee Franke - 01 Sep 2006 19:02 GMT
I've tried to do what you are doing and it does not seem to work.

The best you can hope for is
MyWebService.MyClass c = new MyWebService.MyClass();
c.param1 = param1;
c.param2 = param2;
MyWebService.Test(c);

> Hi,
> Consider a class that I need to serialize and send over the wire. On
[quoted text clipped - 22 lines]
> TIA,
> Mehdi

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.