Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Hi
i am trying to pass object of a class into webservice but i need to use only constractor in class no any helper method and my problem is that at service end which is written by myself , i does not find any value at service object . can u tell me how i constract the class which uses or consumer class
Posted

Dear Manoj Sing,

So far I know, you can not use the parameter sent to constructor of class in a web method, you better pass parameters directly to your web method in a web service, sorry if I couldn't understand your question clearly.

Thanks
 
Share this answer
 
Your object has to be derived from ISerializable in order for it to be passed to/from a web service.

Google is your friend.

If you decide that you want to pass parameters, I wrote a tip/trick that shows how to pass any number of params of any type to a web service method.

Pass Dynamic List of Parameters to Web Service.aspx[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900