0

Is there a way to enter the url in browser in such a way that it also has the object needed as argument of a wcf webservice? In easy words. I've a webservice's operation contract which receives an object. What url should I type in browser to call that function? Thanks!

Musarrat Saeed
  • 83
  • 1
  • 1
  • 11

1 Answers1

1

I've a webservice's operation contract which receives an object. What url should I type in browser to call that function?

NO, that's wrong way of doing it; instead have your operation accepts the object as argument and pass it while calling it like

[OperationContract]
public void Operation1(Student stu) { ... };

While calling

Student stu = new Student();
wcfproxy.Operation1(stu);

This post may help

Passing complex objects into a WCF Rest Service

Community
  • 1
  • 1
Rahul
  • 76,197
  • 13
  • 71
  • 125