Click here to Skip to main content
15,890,982 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want detail procedure to Create object of the proxy class of a WCF service whose i have only URL and parameter along with method() name..
Posted
Comments
ashok rathod 16-Jul-14 5:35am    
do u meant generation of proxy class (adding reference of wcf service). ?
Naveen Singh 16-Jul-14 5:52am    
no i have generated proxy class adding web reference but now i have to create the object of the proxy class then use service method using these class.....!!but have no idea so i want a complete beginner guide.

1 solution

Please Follow Below Steps.


1. Add using statement for referencing namespace in the class where you want to add this referenced proxy class.

e.g using myservice1.XYZ;(this is usually a Name which u had provided at the time of adding wcf service)


2. Now you can access the your ServiceClient by doing like this

Myservice1.ServiceClient1 objClient=new MyService1.ServiceClient1();
objClient.YourMethodName(); // here u will get your require method.

Refer below url :

A beginner’s guide for consuming a WCF service in JavaScript using ASP.NET AJAX[^]
 
Share this answer
 
v2
Comments
Naveen Singh 16-Jul-14 6:08am    
can it be implemented without any use of java script..?
ashok rathod 16-Jul-14 6:11am    
yes
Naveen Singh 16-Jul-14 6:26am    
how ? what will be the procedure ?
ashok rathod 16-Jul-14 6:27am    
wiill you please tell me where exactly javascript used in calling your WCF Service ?
Naveen Singh 16-Jul-14 6:41am    
In above suggested procedure JavaScript function is used to call the Service on any specific event.

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